Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
331 commits
Select commit Hold shift + click to select a range
3aa55a6
Improve too-large timeout handling in client poll
dpkp Mar 4, 2025
6137aed
2.0.6 changelog
dpkp Mar 4, 2025
feb3cae
Fixup fetch request forgotten_topics_data encoding
dpkp Mar 4, 2025
d036034
Fix subprocess log warning; specify timeout_ms kwarg in consumer.poll…
dpkp Mar 4, 2025
ad8d1c4
Implement client-side connection throttling / KIP-219 (#2510)
dpkp Mar 4, 2025
f465adb
Add baseline leader_epoch support for ListOffsets v4 / FetchRequest v…
dpkp Mar 5, 2025
5141d01
1.1 broker_api_versions
dpkp Mar 6, 2025
760f741
Call ApiVersionsRequest during connection, prior to Sasl Handshake (#…
dpkp Mar 8, 2025
f046b0c
Use thread-specific client_id in test_group
dpkp Mar 11, 2025
8320cc8
Refactor Sasl authentication with SaslMechanism abstract base class; …
dpkp Mar 11, 2025
6e1b9e5
Cleanup sasl mechanism configuration checks; fix gssapi bugs; add sas…
dpkp Mar 11, 2025
7e9b86b
Document api_version_auto_timeout_ms default; override in group tests
dpkp Mar 11, 2025
ef73192
Remove tox.ini; update testing docs
dpkp Mar 11, 2025
0ae708a
Make the "mock" dependency optional (only used in Python < 3.3). (#2518)
Romain-Geissler-1A Mar 11, 2025
02dd98f
Support AWS_MSK_IAM authentication (#2519)
dpkp Mar 12, 2025
57f1782
Fix lint issues via ruff check (#2522)
dpkp Mar 12, 2025
7f1bbb9
feat: Add SSPI (Kerberos for Windows) authentication mechanism (#2521)
dpkp Mar 12, 2025
8770049
socket.setblocking for eventlet/gevent compatibility
dpkp Mar 12, 2025
e6b7d31
Attempt to fix metadata race condition when partitioning in producer.…
dpkp Mar 12, 2025
09462d0
fixup TopicAuthorizationFailedError construction
dpkp Mar 12, 2025
6f8de58
mask unused afi var
dpkp Mar 12, 2025
5c7fc8b
Remove unused partial KIP-467 implementation (ProduceResponse batch e…
dpkp Mar 12, 2025
e905143
Move kafka.oauth.AbstractTokenProvider -> kafka.sasl.oauth.AbstractTo…
dpkp Mar 12, 2025
227a312
Improve ClusterMetadata docs re: node_id/broker_id str/int types
dpkp Mar 12, 2025
efb554d
Cache servers/dist in github actions workflow (#2527)
dpkp Mar 12, 2025
36287cb
Timeout coordinator poll / ensure_coordinator_ready / ensure_active_g…
dpkp Mar 12, 2025
a621bdf
Only mark coordinator dead if connection_delay > 0 (#2530)
dpkp Mar 13, 2025
fdf9b22
Add inner_timeout_ms handler to fetcher; add fallback (#2529)
dpkp Mar 13, 2025
693b210
Move inner_timeout_ms def to kafka.util timeout_ms_fn
dpkp Mar 13, 2025
913eddc
reset rejoin_needed after _on_join_complete
dpkp Mar 13, 2025
b1ff0d8
Check for coordinator.poll failure in KafkaConsumer
dpkp Mar 13, 2025
034b4bd
test_group: shorter timeout, more logging, more sleep
dpkp Mar 13, 2025
215b626
Support client.poll with future and timeout_ms
dpkp Mar 13, 2025
1c87c82
KAFKA-4160: Ensure rebalance listener not called with coordinator loc…
dpkp Mar 13, 2025
7827889
Set default pytest log level to debug
dpkp Mar 14, 2025
a5d4611
Disable zookeeper admin server to avoid port conflicts
dpkp Mar 14, 2025
747a1c1
Debug log when skipping api_versions request with pre-configured api_…
dpkp Mar 14, 2025
5a09dab
Fix external kafka/zk fixtures for testing (#2533)
dpkp Mar 14, 2025
17abc60
Limit test duration to 5mins w/ pytest-timeout
dpkp Mar 14, 2025
c03dd33
Improve test_consumer_group::test_group logging before group stabiliz…
dpkp Mar 14, 2025
b1d2d2c
Update pytest log_format: use logger instead of filename; add thread id
dpkp Mar 14, 2025
99b04a5
Add heartbeat thread id to debug logs on start
dpkp Mar 14, 2025
4b3405d
Use NullLogger in producer atexit cleanup
dpkp Mar 14, 2025
7e6f8b1
Debug log if check_version connection attempt fails
dpkp Mar 14, 2025
a25ffae
Include request_timeout_ms in request debug log
dpkp Mar 14, 2025
f7c234d
Support connections through SOCKS5 proxies
hnousiainen Sep 29, 2020
837df1e
AdminClient: support delete_records (#2535)
dpkp Mar 14, 2025
a1b3299
Admin - Implement perform leader election (#2536)
dpkp Mar 14, 2025
de17b9f
Signal close to metrics expire_loop
dpkp Mar 14, 2025
5360d79
Limit producer close timeout to 1sec in __del__; use context managers…
dpkp Mar 14, 2025
ccd44ce
Only refresh metadata if connection fails all dns records (#2532)
dpkp Mar 14, 2025
d5c4348
KafkaProducer: Flush pending records before close() (#2537)
dpkp Mar 14, 2025
c3c20cb
Fix OverflowError when connection_max_idle_ms is 0 or inf (#2538)
dpkp Mar 14, 2025
febfdac
Delay group coordinator until after bootstrap (#2539)
dpkp Mar 14, 2025
0117ace
Log warning when attempting to list offsets for unknown topic/partiti…
dpkp Mar 14, 2025
ed4ecee
Bump default python to 3.13 in CI tests (#2541)
dpkp Mar 14, 2025
b60a266
Raise immediate error on producer.send after close (#2542)
dpkp Mar 15, 2025
1bd6573
Remove legacy/v1 consumer message iterator (#2543)
dpkp Mar 15, 2025
3493380
Add optional timeout_ms kwarg to remaining consumer/coordinator metho…
dpkp Mar 15, 2025
a96bc9c
Call default_offset_commit_callback after _maybe_auto_commit_offsets_…
dpkp Mar 16, 2025
4b89741
Release 2.1.0
dpkp Mar 16, 2025
cebfed2
Bump version for development / fix release date
dpkp Mar 16, 2025
e247776
Add lock synchronization to Future success/failure (#2549)
dpkp Mar 16, 2025
da4329e
Improve connection error handling when try_api_versions_check fails a…
dpkp Mar 16, 2025
406f16c
Fix packaging of 2.1.0 in Fedora: testing requires "pytest-timeout". …
Romain-Geissler-1A Mar 16, 2025
2eab4ee
Fix StickyPartitionAssignor encode
dpkp Mar 16, 2025
1ed5b16
Patch Release 2.1.1
dpkp Mar 16, 2025
ca5592f
Bump version for development
dpkp Mar 16, 2025
b406824
Use six.add_metaclass for py2/py3 compatible abc (#2551)
dpkp Mar 17, 2025
d4a6a05
Fix Fetcher retriable error handling (#2554)
dpkp Mar 17, 2025
44eb48d
Add magic property to ABCRecord and implement for LegacyRecord
dpkp Mar 17, 2025
83fed59
Add size_in_bytes to ABCRecordBatch and implement for Legacy and Default
dpkp Mar 17, 2025
df12982
remove fetcher message_generator / iterator interface
dpkp Mar 17, 2025
c763939
Add record.validate_crc() for v0/v1 crc checks
dpkp Mar 18, 2025
585a111
MemoryRecordsBuilder: support arbitrary offset, skipping offsets
dpkp Mar 18, 2025
8be2568
DefaultRecordsBatchBuilder: support empty batch
dpkp Mar 18, 2025
b75248e
Add FetchMetrics class; move topic_fetch_metrics inside aggregator
dpkp Mar 18, 2025
cab08df
revert last_offset_from_record_batch
dpkp Mar 18, 2025
36f7a0c
Debug log fetch records return; separate offsets update log
dpkp Mar 18, 2025
a0b96ec
Lazy _unpack_records in PartitionRecords
dpkp Mar 18, 2025
a441ef3
Validate crcs in fetcher
dpkp Mar 18, 2025
14643ca
simplify consumer.poll send fetches logic
dpkp Mar 18, 2025
bea9d46
Patch Release 2.1.2
dpkp Mar 18, 2025
39f2a6d
Bump version for development
dpkp Mar 18, 2025
9afaa41
Return empty set from consumer.partitions_for_topic when topic not fo…
dpkp Mar 18, 2025
e6fa9f3
Add python 3.13 to compatibility list
dpkp Mar 19, 2025
4995e9b
KIP-511: Use ApiVersions v4 on initial connect w/ client_software_nam…
dpkp Mar 21, 2025
3bd280a
Support KRaft / 4.0 brokers in tests (#2559)
dpkp Mar 21, 2025
301828a
Update kafka broker compatibility docs
dpkp Mar 21, 2025
3f3314c
Use get_open_port for KRaft controller port
dpkp Mar 21, 2025
cd4830a
Test older pythons against 4.0 broker
dpkp Mar 21, 2025
d214321
Move ensure_valid_topic_name to kafka.util; use in client and produce…
dpkp Mar 24, 2025
0720a52
Fix maximum version to send an OffsetFetchRequest (#2563)
garnaud Mar 24, 2025
3f3c424
KIP-70: Auto-commit offsets on consumer.unsubscribe(), defer assignme…
dpkp Mar 24, 2025
70ca6d7
Add optional timeout_ms kwarg to consumer.close() / fix potential han…
dpkp Mar 24, 2025
23d21f5
timeout on consumer_factory in test_producer
dpkp Mar 24, 2025
bd24486
More timeout_ms args in coordinator + heartbeat close
dpkp Mar 24, 2025
70574d1
KIP-74: Manage assigned partition order in consumer (#2562)
dpkp Mar 24, 2025
6c2c25d
Use SubscriptionType to track topics/pattern/user assignment (#2565)
dpkp Mar 24, 2025
9dd1714
Also update config api_version to closest compatible (#2567)
dpkp Mar 25, 2025
9c7aed4
Patch Release 2.1.3
dpkp Mar 25, 2025
a46f3d8
Try import new Sequence before old to avoid DeprecationWarning
dpkp Mar 27, 2025
70ec261
Reset SASL state on disconnect (#2571)
dpkp Mar 27, 2025
d39dd3b
Update Makefile default to 4.0 broker; add make fixture
dpkp Mar 27, 2025
e21fe99
Send final error byte x01 on Sasl OAuth failure (#2572)
dpkp Mar 27, 2025
c75b85b
Fix MetadataRequest for no topics (#2573)
dpkp Mar 28, 2025
a520232
Improve connection state logging (#2574)
dpkp Mar 28, 2025
c15a7ff
Dont block pending FetchRequests when Metadata update requested (#2576)
dpkp Mar 28, 2025
8af0dd7
Patch Release 2.1.4
dpkp Mar 28, 2025
2966a8e
Bump version for development
dpkp Mar 28, 2025
f7b3133
Fix python2.7 errors (#2578)
dpkp Apr 3, 2025
0024227
Raise UnsupportedVersionError from coordinator (#2579)
dpkp Apr 3, 2025
56eb39d
Drop unused kafka.producer.buffer / SimpleBufferPool (#2580)
dpkp Apr 4, 2025
c52f25a
Pass metrics_enabled=False to disable metrics (#2581)
dpkp Apr 4, 2025
6b9076b
Use __slots__ for metrics (#2583)
dpkp Apr 4, 2025
37576e8
Move benchmark scripts to kafka.benchmarks module (#2584)
dpkp Apr 4, 2025
c1a5517
Patch Release 2.1.5
dpkp Apr 4, 2025
ef6d336
Bump version for development
dpkp Apr 4, 2025
28cbad6
KIP-98: Add idempotent producer support (#2569)
dpkp Apr 6, 2025
103025f
fixup Sender._fail_batch
dpkp Apr 7, 2025
c2fe7c3
KIP-98: Add Consumer support for READ_COMMITTED (#2582)
dpkp Apr 7, 2025
d2d1cdd
Rename Coordinator errors to generic not group (#2585)
dpkp Apr 7, 2025
98d7137
Rename CorruptRecordException -> CorruptRecordError
dpkp Apr 8, 2025
c964f8f
Dont raise KeyError on incomplete.remove(batch)
dpkp Apr 8, 2025
cf1a999
Cluster.add_group_coordinator -> add_coordinator + support txn type
dpkp Apr 5, 2025
f5e4fa6
Use SaslAuthenticationFailedError in kafka.conn connection failure
dpkp Apr 7, 2025
3962d67
Add protocol defs for AddPartitionsToTxn, EndTxn, and AddOffsetsToTxn
dpkp Apr 5, 2025
9c2dfab
Expand Sender test coverage (#2586)
dpkp Apr 8, 2025
614b059
Move integration tests and fixtures to test/integration/; simplify un…
dpkp Apr 15, 2025
4122c1f
KIP-98: Transactional Producer (#2587)
dpkp Apr 15, 2025
7a0e9f6
py2 test fixups
dpkp Apr 16, 2025
e2c3b80
Resolve datetime deprecation warnings (#2589)
emmanuel-ferdman Apr 16, 2025
369478a
Remove old/unused errors; reorder; KafkaTimeout -> retriable
dpkp Apr 16, 2025
315f9d8
Fixup retry/sleep after successful init producer id in idempotent pro…
dpkp Apr 16, 2025
a87f922
KIP-98: Add offsets support to transactional KafkaProducer (#2590)
dpkp Apr 16, 2025
c5cbe84
fixup reset_producer_id is_transactional() check
dpkp Apr 17, 2025
99c08e6
Prefix producer logs w/ client id and transactional id (#2591)
dpkp Apr 17, 2025
a2f8c58
Avoid self refcount in log messages; test thread close on all pythons
dpkp Apr 17, 2025
e92defe
Fix client.wakeup() race from producer/sender close
dpkp Apr 17, 2025
2f262b9
KAFKA-4547: Avoid resetting paused partitions to committed offsets
dpkp Apr 17, 2025
d166668
KAFKA-4937: Batch offset fetches in the Consumer
dpkp Apr 17, 2025
2513d55
KAFKA-5075 - Defer consumer fetcher exception if fetch position has a…
dpkp Apr 17, 2025
9300bcb
KAFKA-5078 - defer fetch record exception if iterator has already mov…
dpkp Apr 17, 2025
1b53598
Drop unused KafkaClient import from test_fetcher
dpkp Apr 17, 2025
39aa421
fixup exception message
dpkp Apr 23, 2025
be9dd7c
KAFKA-6397: Consumer should not block setting positions of unavailabl…
dpkp Apr 23, 2025
9188385
Fix ElectionNotNeededError handling in admin client
dpkp Apr 23, 2025
92037ce
Do not include log_start_offset in producer RecordMetadata
dpkp Apr 24, 2025
186d480
KAFKA-5429 - Ignore produce response if batch was previously aborted
dpkp Apr 24, 2025
17ba216
from __future__ import division for produce batch time calcs
dpkp Apr 24, 2025
3ee0419
DefaultRecordsBuilder.size_in_bytes classmethod
dpkp Apr 27, 2025
1f63514
MemoryRecords iterator; MemoryRecordsBuilder records() helper
dpkp Apr 27, 2025
3b766e2
KIP-91: KafkaProducer delivery_timeout_ms
dpkp Apr 27, 2025
4f87a87
Default retries -> infinite
dpkp Apr 27, 2025
707913f
Expand KafkaProducer docstring w/ idempotent and transactional notes
dpkp Apr 27, 2025
b1dae2e
RecordAccumulator: Use helper method to get/set _tp_locks; get dq wit…
dpkp Apr 27, 2025
fb04626
KIP-394: handle MEMBER_ID_REQUIRED error w/ second join group request…
dpkp Apr 27, 2025
603e10e
Release 2.2.0
dpkp Apr 28, 2025
0f481e0
Bump version for development
dpkp Apr 28, 2025
284c8a7
Add transactional examples to docs
dpkp Apr 28, 2025
c35c161
Fix SubscriptionState AttributeError in KafkaConsumer (#2599)
zcc0077 Apr 29, 2025
842f398
Always try ApiVersionsRequest v0, even on broker disconnect (#2603)
dpkp Apr 29, 2025
8c39733
Patch Release 2.2.1
dpkp Apr 29, 2025
cb2868f
Bump version for development
dpkp Apr 29, 2025
998efc2
Fix lint errors
dpkp Apr 29, 2025
3d31c14
Patch Release 2.2.2
dpkp Apr 30, 2025
26fbd2e
Bump version for development
dpkp Apr 30, 2025
b6036f2
Only create fetch requests for ready nodes (#2607)
dpkp May 1, 2025
cef0ea6
Ignore leading SECURITY_PROTOCOL:// in bootstrap_servers (#2608)
dpkp May 1, 2025
2767d14
Patch Release 2.2.3
dpkp May 1, 2025
827832a
Update changes w/ 2.1.6 backport release
dpkp May 2, 2025
4100319
Fix Fetch._reset_offsets_async() KeyError when fetching from multiple…
dpkp May 4, 2025
2f282eb
Fix KafkaConsumer.poll() with zero timeout (#2613)
dpkp May 4, 2025
d9c2009
Do not reset_generation after RebalanceInProgressError; improve Commi…
dpkp May 4, 2025
d8c9bb1
Patch Release 2.2.4
dpkp May 4, 2025
fef828f
Bump version for development
dpkp May 4, 2025
590ef93
Fix producer busy loop with no pending batches (#2616)
dpkp May 8, 2025
7536bcb
Fixup py27 fetcher test failure
dpkp May 8, 2025
bf77e9a
Patch Release 2.2.5
dpkp May 8, 2025
32a9285
Only disable heartbeat thread once at beginning of join-group (#2617)
dpkp May 8, 2025
be22ee5
Patch Release 2.2.6
dpkp May 8, 2025
71c10f4
Minor Heartbeat updates: catch more exceptions / log configuration / …
dpkp May 13, 2025
00a5e6c
Patch Release 2.2.7
dpkp May 13, 2025
8a424e9
Acquire client lock in heartbeat thread before sending requests (#2620)
dpkp May 15, 2025
2f95590
Wait for next heartbeat in thread loop; check for connected coordinat…
dpkp May 15, 2025
8f77cc8
Update offset commit error handling; use RebalanceInProgressError if …
dpkp May 15, 2025
5de666a
More coordinator / heartbeat logging (#2621)
dpkp May 15, 2025
452e354
Log all SyncGroupResponse errors as info+
dpkp May 15, 2025
62a7d80
Fix timeout seconds error message in KafkaProducer (#2627)
dpkp May 21, 2025
95c2f3a
Dont mark coordinator dead on ThrottlingQuotaExceededError
dpkp May 21, 2025
bcbd1b7
Patch Release 2.2.8
dpkp May 21, 2025
3463f59
Do not reset fetch positions if offset commit fetch times out (#2629)
dpkp May 21, 2025
bd21713
More / updated debug logging for coordinator / consumer (#2630)
dpkp May 21, 2025
48dd596
Patch Release 2.2.9
dpkp May 21, 2025
7b7f3af
Fix sasl gssapi plugin: do not rely on client_ctx.complete in auth_by…
dpkp May 22, 2025
e2b6693
Set the current host in the SASL configs (#2633)
SeppMe May 22, 2025
7fceb1b
Pass host as kwarg to get_sasl_mechanism
dpkp May 22, 2025
6583460
Patch Release 2.2.10
dpkp May 22, 2025
5957c1b
Update build links in documentation (#2634)
boidolr May 24, 2025
e6abbbf
Add synchronized decorator; add lock to subscription state (#2636)
dpkp Jun 1, 2025
9f7384c
Fix decoding bug in AWS_MSK_IAM mechanism (#2639)
dpkp Jun 4, 2025
e93ab64
Do not ignore metadata response for single topic with error (#2640)
dpkp Jun 5, 2025
3542e01
Patch Release 2.2.11
dpkp Jun 5, 2025
5c7cd2f
Throw exception on invalid bucket type (#2642)
emmanuel-ferdman Jun 10, 2025
5d83941
Avoid RuntimeError on mutated _completed_fetches deque in consumer fe…
dpkp Jun 18, 2025
0245352
Fix construction of final GSSAPI authentication message (#2647)
dpkp Jun 18, 2025
e22e41e
Patch Release 2.2.12
dpkp Jun 18, 2025
e4e6fcf
update README kafka version badge to include 4.0
dpkp Jun 18, 2025
cf1cd10
Use client.await_ready() to simplify blocking wait and add timeout to…
dpkp Jun 19, 2025
0735a7c
Fixup import style in example.py
dpkp Jun 19, 2025
f6eb0b4
Patch Release 2.2.13
dpkp Jun 20, 2025
179c8ed
Add send_request() and send_requests() to KafkaAdminClient (#2649)
dpkp Jun 23, 2025
6f6a696
python -m cli interfaces for kafka.admin, kafka.consumer, kafka.produ…
dpkp Jun 23, 2025
7b565ae
Drop unused imports (#2651)
dpkp Jun 23, 2025
c95dad9
Fix coordinator lock contention during close() (#2652)
dpkp Jun 23, 2025
8d75d9a
KIP-345 Consumer group static membership (#2625)
dpkp Jun 23, 2025
46319a3
cli fixups: producer py2 compat; consumer no stacktrace on KafkaError
dpkp Jun 23, 2025
c8d6cda
cli fixups: producer stdin/eof support; consumer unused e var
dpkp Jun 23, 2025
8c6c9da
Switch protocol code to getattr/setattr from __dict__ (#2654)
dpkp Jun 24, 2025
223c320
Remove old/unused kafka.protocol.pickle (#2653)
dpkp Jun 24, 2025
8fb3f96
python2 fixups (#2655)
dpkp Jun 26, 2025
93bcdde
KIP-430: Return Authorized Operations in Describe Responses (#2656)
dpkp Jun 27, 2025
2abf2cd
KIP-207: Add ListOffsetsRequest v5 / handle OffsetNotAvailableError (…
dpkp Jun 29, 2025
2297fa1
Fix spelling mistake in KafkaConsumer docs (#2659)
Xeus-CC Jul 1, 2025
e91b036
Fix KafkaProducer broken method names (#2660)
llk89 Jul 1, 2025
0a87130
Update changelog for 2.2 patch releases + bump version for 2.3.x rele…
dpkp Jul 1, 2025
9227674
KIP-467: Augment ProduceResponse error messaging for specific culprit…
dpkp Jul 3, 2025
ee5436f
KafkaProducer: Handle UnknownProducerIdError (#2663)
dpkp Jul 3, 2025
20e2d52
KIP-654: Abort transaction with pending data with TransactionAbortedE…
dpkp Jul 3, 2025
512d0a0
Fetcher: Add missing argument in debug log (#2665)
afeblot Jul 19, 2025
f0fc1f2
NixOS helpers
dpkp Nov 18, 2025
1784b1c
Ensure timeout is checked after each fetch position update in `Consum…
k61n Nov 18, 2025
625a9d7
Fix thread not waking up when there is still data to be sent (#2670)
gqmelo Nov 18, 2025
de55dde
Fixup new conn test
dpkp Nov 18, 2025
a75edb7
Bump actions/checkout from 4 to 5 (#2669)
dependabot[bot] Nov 18, 2025
e967331
Bump actions/setup-java from 4 to 5 (#2673)
dependabot[bot] Nov 18, 2025
edd7455
Add transactional_id to KafkaProducer Keyword Arguments docstring
dpkp Nov 18, 2025
894ad8e
Bump actions/setup-python from 5 to 6 (#2674)
dependabot[bot] Nov 18, 2025
befd181
Bump github/codeql-action from 3 to 4 (#2678)
dependabot[bot] Nov 19, 2025
38a105b
Changelog updates
dpkp Nov 19, 2025
7e38cf2
Bump actions/checkout from 5 to 6 (#2694)
dependabot[bot] Nov 20, 2025
8d38aa7
Initiate Coordinator Reconnect w/ Backoff from Heartbeat Thread (#2695)
dpkp Nov 20, 2025
4197302
Add internal poll to consumer.position() (#2696)
dpkp Nov 20, 2025
c75f97c
SOCKS5: support looking up names remotely (#2666)
jschwartzenberg Nov 20, 2025
dc470da
Update changelog
dpkp Nov 20, 2025
84d1394
Add cli modules to docs/; add top level kafka.__main__ with help message
dpkp Nov 20, 2025
5904e5d
minor api docs formatting cleanups
dpkp Nov 20, 2025
1569334
Add ProducerBatch.__lt__ for heapq (#2698)
dpkp Nov 21, 2025
63d9634
Release 2.3.0
dpkp Nov 21, 2025
b2d581c
Merge upstream v2.3.0 into aiven/main
tvainika Feb 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -51,7 +51,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
218 changes: 56 additions & 162 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,198 +1,92 @@
name: CI/CD
# Derived from https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml
#
name: Python Package

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
release:
types: [created]
branches:
- 'master'
workflow_dispatch:

env:
FORCE_COLOR: "1" # Make tools pretty.
PIP_DISABLE_PIP_VERSION_CHECK: "1"
PIP_NO_PYTHON_VERSION_WARNING: "1"
PYTHON_LATEST: "3.12"
KAFKA_LATEST: "2.6.0"

# For re-actors/checkout-python-sdist
sdist-artifact: python-package-distributions

jobs:
build:

build-sdist:
name: 📦 Build the source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_LATEST }}
cache: pip
- run: python -m pip install build
name: Install core libraries for build and install
- name: Build artifacts
run: python -m build
- name: Upload built artifacts for testing
uses: actions/upload-artifact@v3
with:
name: ${{ env.sdist-artifact }}
# NOTE: Exact expected file names are specified here
# NOTE: as a safety measure — if anything weird ends
# NOTE: up being in this dir or not all dists will be
# NOTE: produced, this will fail the workflow.
path: dist/${{ env.sdist-name }}
retention-days: 15

test-python:
name: Tests on ${{ matrix.python-version }}
needs:
- build-sdist
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
name: "Test: python ${{ matrix.python }} / kafka ${{ matrix.kafka }}"
continue-on-error: ${{ matrix.experimental || false }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
experimental: [ false ]
include:
- python-version: "pypy3.9"
experimental: true
- python-version: "~3.13.0-0"
experimental: true
steps:
- name: Checkout the source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
requirements-dev.txt
- name: Check Java installation
run: source travis_java_install.sh
- name: Pull Kafka releases
run: ./build_integration.sh
env:
PLATFORM: ${{ matrix.platform }}
KAFKA_VERSION: ${{ env.KAFKA_LATEST }}
# TODO: Cache releases to expedite testing
- name: Install dependencies
run: |
sudo apt install -y libsnappy-dev libzstd-dev
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
pip install .
pip install -r requirements-dev.txt
- name: Test with tox
run: tox
env:
PLATFORM: ${{ matrix.platform }}
KAFKA_VERSION: ${{ env.KAFKA_LATEST }}

test-kafka:
name: Tests for Kafka ${{ matrix.kafka-version }}
needs:
- build-sdist
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kafka-version:
kafka:
- "0.8.2.2"
- "0.9.0.1"
- "0.10.2.2"
- "0.11.0.2"
- "0.11.0.3"
- "1.1.1"
- "2.4.0"
- "2.5.0"
- "2.6.0"
- "2.8.2"
- "3.0.2"
- "3.5.2"
- "3.9.0"
- "4.0.0"
python:
- "3.13"
include:
#- python: "pypy3.9"
# kafka: "2.6.0"
# experimental: true
- python: "3.8"
kafka: "4.0.0"
- python: "3.9"
kafka: "4.0.0"
- python: "3.10"
kafka: "4.0.0"
- python: "3.11"
kafka: "4.0.0"
- python: "3.12"
kafka: "4.0.0"

steps:
- name: Checkout the source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
- name: Set up Python
uses: actions/setup-python@v5
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_LATEST }}
python-version: ${{ matrix.python }}
cache: pip
cache-dependency-path: |
requirements-dev.txt
- name: Pull Kafka releases
run: ./build_integration.sh
env:
# This is fast enough as long as you pull only one release at a time,
# no need to worry about caching
PLATFORM: ${{ matrix.platform }}
KAFKA_VERSION: ${{ matrix.kafka-version }}
- name: Install dependencies
run: |
sudo apt install -y libsnappy-dev libzstd-dev
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
pip install .
pip install -r requirements-dev.txt
- name: Test with tox
run: tox
env:
PLATFORM: ${{ matrix.platform }}
KAFKA_VERSION: ${{ matrix.kafka-version }}

check: # This job does nothing and is only used for the branch protection
name: ✅ Ensure the required checks passing
if: always()
needs:
- build-sdist
- test-python
- test-kafka
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
publish:
name: 📦 Publish to PyPI
runs-on: ubuntu-latest
needs: [build-sdist]
permissions:
id-token: write
environment: pypi
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: Download the sdist artifact
uses: actions/download-artifact@v3
- name: Pylint
run: pylint --recursive=y --errors-only --exit-zero kafka test
- name: Setup java
uses: actions/setup-java@v5
with:
name: artifact
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
distribution: temurin
java-version: 23
- name: Restore cached kafka releases
id: cache-servers-dist-restore
uses: actions/cache/restore@v4
with:
password: ${{ secrets.PYPI_API_TOKEN }}
path: servers/dist
key: servers-dist-${{ matrix.kafka }}
- name: Install Kafka release
run: make servers/${{ matrix.kafka }}/kafka-bin
- name: Update kafka release cache
id: cache-servers-dist-save
uses: actions/cache/save@v4
with:
path: servers/dist
key: ${{ steps.cache-servers-dist-restore.outputs.cache-primary-key }}
- name: Pytest
run: make test
env:
KAFKA_VERSION: ${{ matrix.kafka }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ docs/_build
integration-test/
tests-env/
.pytest_cache/
.envrc
shell.nix
35 changes: 35 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

Loading