@@ -11,6 +11,11 @@ This is a major release with significant changes to kafka-python internals to si
1111* KIP-679: Update Producer defaults -- enable_idempotence=True, acks='all' (#3013 )
1212* KIP-735: Increase default consumer session_timeout_ms from 10s to 45s (#3030 )
1313* Rename api_version_auto_timeout_ms -> bootstrap_timeout_ms; default 30s (#3028 )
14+ * Producer: Remove deprecation warning for buffer_memory config (now raises) (#3047 )
15+
16+ ### Abstract Interface Changes
17+ * Serializer/Deserializer: Pass headers to serialize/deserialize (#3046 )
18+ * Partitioner: pass both key/value, serialized and unserialized, to partition() (#3045 )
1419
1520### Admin API Changes
1621* Admin: change response shapes to simple dicts (#2883 )
@@ -25,6 +30,7 @@ This is a major release with significant changes to kafka-python internals to si
2530* Make IncompatibleBrokerVersion a subclass of UnsupportedVersionError (#2924 )
2631* Eliminate NoBrokersAvailableError (#2942 )
2732* KafkaProtocolError is not retriable (#2941 )
33+ * Prefer raised Exceptions to assert / AssertionError (#3042 )
2834
2935### Old Networking Stack Removal
3036* Remove kafka.client_async / kafka.conn legacy modules (#2918 )
@@ -42,6 +48,7 @@ Complete refactor of the networking layer using a bespoke event-loop supporting
4248* kafka.net.manager: Add call_soon(coro) and run(coro) for sync/async bridge (#2862 )
4349* kafka.net.manager: Bootstrap is sync/blocking (#2919 )
4450* connection: short-circuit send/recv when closed (#2967 )
51+ * Clamp broker_version to user-supplied api_version (#3052 )
4552
4653### Transports and Proxies
4754* Default SSLContext -> PROTOCOL_TLS_CLIENT; minimum version TLS 1.2 (#2807 )
@@ -72,20 +79,20 @@ Defensive checks throughout the kafka.net event loop and transport stack: improv
7279* kafka.net.selector: Use threading.Lock() to detect concurrent access to poll() (#2945 )
7380* kafka.net.selector: Track pending tasks to prevent gc before completion (#2950 )
7481* kafka.net.selector: Support reschedule(when, task); idempotent unschedule (#2939 )
75- * kafka.net: Raise RuntimeError on concurrent access to net.poll or wakeup() (#2938 )
76- * kafka.net: Raise RuntimeError on run/call_at/call_soon_threadsafe after closed (#2971 )
77- * kafka.net: Catch unhandled exceptions in IO thread (#2970 )
78- * kafka.net: Improve error handling on sock read/write (#2995 )
82+ * kafka.net.selector: Raise RuntimeError on concurrent access to net.poll or wakeup() (#2938 )
83+ * kafka.net.selector: Raise RuntimeError on run/call_at/call_soon_threadsafe after closed (#2971 )
84+ * kafka.net.selector: Catch unhandled exceptions in IO thread (#2970 )
85+ * kafka.net.selector: Improve error handling on sock read/write (#2995 )
86+ * kafka.net.selector: Check locks in ` _poll_once ` ; add net.drain() (#2949 )
7987* kafka.net.transport: Close connection on socket write error (#2973 )
80- * kafka.net: Check locks in _ poll_once; add net.drain() (#2949 )
8188
8289## Protocol
8390
8491A new JSON-schema-based dynamic protocol generator now replaces the legacy hand-written protocol classes (moved to ` kafka.protocol.old ` ).
8592
8693### Dynamic Protocol Classes
8794Protocol classes are now generated from the upstream Apache Kafka JSON schemas.
88- * Dynamic protocol classes using upstream json schemas (#2727 , #2745 , #2779 , #2782 , #2787 , #2810 )
95+ * Dynamic protocol classes using upstream json schemas (#2727 , #2745 , #2779 , #2782 , #2787 , #2810 , # 3037 )
8996* Add .pyi type annotation stubs for generated protocol classes (#2784 )
9097* Migrate all internal usage to new protocol classes (#2764 , #2765 , #2766 , #2767 , #2768 , #2772 )
9198* Refactor treatment of versioned ApiMessage classes (#2739 )
@@ -117,6 +124,7 @@ Protocol classes are now generated from the upstream Apache Kafka JSON schemas.
117124* Store in-flight request headers only for protocol parser (#2723 )
118125* Debug log send/recv bytes from protocol parser (#2707 )
119126* Adjust protocol debug logging; add KAFKA_PYTHON_PROTOCOL_DEBUG_LOG (#2719 )
127+ * CoordinatorType enum (GROUP/TRANSACTION/SHARE) (#3049 )
120128
121129## Broker Version Check
122130
@@ -153,6 +161,7 @@ All consumer network I/O now flows through the shared kafka.net IO thread; `cons
153161* Consumer: use background thread for all network io; drop HeartbeatThread (#2965 )
154162* Consumer: send all requests from net io thread (#2980 )
155163* Consumer: simplify poll() with fetcher.fetch_records (#2960 )
164+ * Consumer: sleep in poll() if timeout, no records, and no fetchable partitions (#3039 )
156165* Consumer: drop poll loop optimizations for pending offset resets and rejoins (#2959 )
157166* Consumer: ` _update_fetch_positions ` -> ` _refresh_committed_offsets ` ; dont poll in position() (#2958 )
158167* Consumer: convert fetcher reset_offsets/send_list_offsets_requests to async def
@@ -227,16 +236,16 @@ Split KafkaAdminClient into focused mixin classes (cluster, topics, configs, gro
227236### Refactor and Async Migration
228237The admin client interface remains sync but wraps a fully-async internal api (does not support asyncio yet). Adds cached coordinator lookups and a mixin structure to separate logical resource groups.
229238* Admin: split into functional mixin classes (#2873 , #2877 , #2882 )
230- * Admin: convert request paths to async; cache coordinator_ids (#2851 , #2862 , #2863 , #2866 , #2867 , #2870 , #2871 )
239+ * Admin: convert request paths to async; cache coordinator_ids (#2851 , #2862 , #2863 , #2866 , #2867 , #2870 , #2871 , # 3050 )
231240* Admin: refactor ` _send_request_to_controller ` error handling (#2751 )
232241
233- ### KIP Support
242+ ### Batch Protocol Support
234243* KIP-699: FindCoordinatorRequest v4 -- multi-group support (#3025 )
235244* KIP-709: OffsetFetch v8 -- use batch interface when available (#3024 )
236245
237246### New Cluster and Quorum APIs
238247* Admin: describe_metadata_quorum (#2914 )
239- * Admin: cluster features describe/update (#2908 )
248+ * Admin: cluster features describe/update (#2908 , # 3053 )
240249* Admin: cluster get_broker_version_data / api_versions (#2903 )
241250
242251### Configs
@@ -252,13 +261,15 @@ The admin client interface remains sync but wraps a fully-async internal api (do
252261* Admin: Expand partitions api support (#2890 )
253262* Admin: Cleanup alter_partition_reassignments (#3002 )
254263
255-
256264### Groups
257265* Admin: include latest offsets and lag in list_group_offsets; add reset_group_offsets (#2897 )
258266* Admin: support group state/type filters for list_groups (#2910 )
259267* Admin: add extended group reset options (#2911 )
260268* Admin: Dont return MemberToRemove as key in remove_group_members dict result (#2893 )
261269
270+ ### Transactions
271+ * Admin: implement KIP-664 hanging-transaction tooling (#3051 )
272+
262273### Log Dirs
263274* Admin: alter_log_dirs (#2912 )
264275* Admin: Fix describe_log_dirs, accept optional topics/brokers (#2881 )
@@ -286,13 +297,18 @@ The CLI adds shared parser config, SASL/SSL connection support across all subcom
286297* admin cli: catch AttributeError and print_help() (#2880 )
287298* admin cli: fix describe_configs (#2875 )
288299
300+ ### Consumer CLI
301+ * consumer cli does not require group_id (#3044 )
302+
289303## Compatibility / Misc
290304
291305Small quality-of-life additions to the public API surface.
292306
293307* Support context manager interface for consumer/producer/admin (#2969 )
294308* Make IncompatibleBrokerVersion a subclass of UnsupportedVersionError (#2924 )
295309* Add OffsetSpec / IsolationLevel to kafka imports (#2898 )
310+ * Errors: subclasses for RetriableError and InvalidMetadataError (#3041 )
311+ * Helper classes: DefaultSerializer and JsonSerializer (#3046 )
296312
297313## Fixes
298314
0 commit comments