Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.0.3 #2434

Merged
merged 9 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
52 changes: 52 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
# 2.0.3 (Feb 12, 2025)

Improvements
* Add optional compression libs to extras_require (#2123, #2387)
* KafkaConsumer: Exit poll if consumer is closed (#2152)
* Support configuration of custom kafka client for Admin/Consumer/Producer (#2144)
* Core Protocol: Add support for flexible versions (#2151)
* (Internal) Allow disabling thread wakeup in _send_request_to_node (#2335)
* Change loglevel of cancelled errors to info (#2467)
* Strip trailing dot off hostname for SSL validation. (#2472)
* Log connection close(error) at ERROR level (#2473)
* Support DescribeLogDirs admin api (#2475)

Compatibility
* Support for python 3.12 (#2379, #2382)
* Kafka 2.5 / 2.6 (#2162)
* Try collections.abc imports in vendored selectors34 (#2394)
* Catch OSError when checking for gssapi import for windows compatibility (#2407)
* Update vendored six to 1.16.0 (#2398)

Documentation
* Update usage.rst (#2308, #2334)
* Fix typos (#2319, #2207, #2178)
* Fix links to the compatibility page (#2295, #2226)
* Cleanup install instructions for optional libs (#2139)
* Update license_file to license_files (#2462)
* Update some RST documentation syntax (#2463)
* Add .readthedocs.yaml; update copyright date (#2474)

Fixes
* Use isinstance in builtin crc32 (#2329)
* Use six.viewitems instead of six.iteritems to avoid encoding problems in StickyPartitionAssignor (#2154)
* Fix array encoding TypeError: object of type 'dict_itemiterator' has no len() (#2167)
* Only try to update sensors fetch lag if the unpacked list contains elements (#2158)
* Avoid logging errors during test fixture cleanup (#2458)
* Release coordinator lock before calling maybe_leave_group (#2460)
* Dont raise RuntimeError for dead process in SpawnedService.wait_for() (#2461)
* Cast the size of a MemoryRecordsBuilder object (#2438)
* Fix DescribeConfigsResponse_v1 config_source (#2464)
* Fix base class of DescribeClientQuotasResponse_v0 (#2465)
* Update socketpair w/ CVE-2024-3219 fix (#2468)

Testing
* Transition CI/CD to GitHub Workflows (#2378, #2392, #2381, #2406, #2419, #2418, #2417, #2456)
* Refactor Makefile (#2457)
* Use assert_called_with in client_async tests (#2375)
* Cover sticky assignor's metadata method with tests (#2161)
* Update fixtures.py to check "127.0.0.1" for auto port assignment (#2384)
* Use -Djava.security.manager=allow for Java 23 sasl tests (#2469)
* Test with Java 23 (#2470)
* Update kafka properties template; disable group rebalance delay (#2471)

# 2.0.2 (Sep 29, 2020)

Consumer
Expand Down
65 changes: 62 additions & 3 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,65 @@ Changelog
=========


2.0.3 (Feb 12, 2025)
####################

Improvements
------------
* Add optional compression libs to extras_require (#2123, #2387)
* KafkaConsumer: Exit poll if consumer is closed (#2152)
* Support configuration of custom kafka client for Admin/Consumer/Producer (#2144)
* Core Protocol: Add support for flexible versions (#2151)
* (Internal) Allow disabling thread wakeup in _send_request_to_node (#2335)
* Change loglevel of cancelled errors to info (#2467)
* Strip trailing dot off hostname for SSL validation. (#2472)
* Log connection close(error) at ERROR level (#2473)
* Support DescribeLogDirs admin api (#2475)

Compatibility
-------------
* Support for python 3.12 (#2379, #2382)
* Kafka 2.5 / 2.6 (#2162)
* Try collections.abc imports in vendored selectors34 (#2394)
* Catch OSError when checking for gssapi import for windows compatibility (#2407)
* Update vendored six to 1.16.0 (#2398)

Documentation
-------------
* Update usage.rst (#2308, #2334)
* Fix typos (#2319, #2207, #2178)
* Fix links to the compatibility page (#2295, #2226)
* Cleanup install instructions for optional libs (#2139)
* Update license_file to license_files (#2462)
* Update some RST documentation syntax (#2463)
* Add .readthedocs.yaml; update copyright date (#2474)

Fixes
-----
* Use isinstance in builtin crc32 (#2329)
* Use six.viewitems instead of six.iteritems to avoid encoding problems in StickyPartitionAssignor (#2154)
* Fix array encoding TypeError: object of type 'dict_itemiterator' has no len() (#2167)
* Only try to update sensors fetch lag if the unpacked list contains elements (#2158)
* Avoid logging errors during test fixture cleanup (#2458)
* Release coordinator lock before calling maybe_leave_group (#2460)
* Dont raise RuntimeError for dead process in SpawnedService.wait_for() (#2461)
* Cast the size of a MemoryRecordsBuilder object (#2438)
* Fix DescribeConfigsResponse_v1 config_source (#2464)
* Fix base class of DescribeClientQuotasResponse_v0 (#2465)
* Update socketpair w/ CVE-2024-3219 fix (#2468)

Testing
-------
* Transition CI/CD to GitHub Workflows (#2378, #2392, #2381, #2406, #2419, #2418, #2417, #2456)
* Refactor Makefile (#2457)
* Use assert_called_with in client_async tests (#2375)
* Cover sticky assignor's metadata method with tests (#2161)
* Update fixtures.py to check "127.0.0.1" for auto port assignment (#2384)
* Use -Djava.security.manager=allow for Java 23 sasl tests (#2469)
* Test with Java 23 (#2470)
* Update kafka properties template; disable group rebalance delay (#2471)


2.0.2 (Sep 29, 2020)
####################

Expand Down Expand Up @@ -1243,7 +1302,7 @@ Consumers
* Improve FailedPayloadsError handling in KafkaConsumer (dpkp PR 398)
* KafkaConsumer: avoid raising KeyError in task_done (dpkp PR 389)
* MultiProcessConsumer -- support configured partitions list (dpkp PR 380)
* Fix SimpleConsumer leadership change handling (dpkp PR 393)
* Fix SimpleConsumer leadership change handling (dpkp PR 393)
* Fix SimpleConsumer connection error handling (reAsOn2010 PR 392)
* Improve Consumer handling of 'falsy' partition values (wting PR 342)
* Fix _offsets call error in KafkaConsumer (hellais PR 376)
Expand Down Expand Up @@ -1348,7 +1407,7 @@ Internals
* Add test timers via nose-timer plugin; list 10 slowest timings by default (dpkp)
* Move fetching last known offset logic to a stand alone function (zever - PR 177)
* Improve KafkaConnection and add more tests (dpkp - PR 196)
* Raise TypeError if necessary when encoding strings (mdaniel - PR 204)
* Raise TypeError if necessary when encoding strings (mdaniel - PR 204)
* Use Travis-CI to publish tagged releases to pypi (tkuhlman / mumrah)
* Use official binary tarballs for integration tests and parallelize travis tests (dpkp - PR 193)
* Improve new-topic creation handling (wizzat - PR 174)
Expand All @@ -1362,7 +1421,7 @@ Internals
* Fix connection error timeout and improve tests (wizzat - PR 158)
* SimpleProducer randomization of initial round robin ordering (alexcb - PR 139)
* Fix connection timeout in KafkaClient and KafkaConnection (maciejkula - PR 161)
* Fix seek + commit behavior (wizzat - PR 148)
* Fix seek + commit behavior (wizzat - PR 148)


0.9.0 (Mar 21, 2014)
Expand Down
16 changes: 8 additions & 8 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ KafkaConsumer
# consume json messages
KafkaConsumer(value_deserializer=lambda m: json.loads(m.decode('ascii')))

# consume msgpack
# consume msgpack
KafkaConsumer(value_deserializer=msgpack.unpackb)

# StopIteration if no message after 1sec
Expand Down Expand Up @@ -104,16 +104,16 @@ KafkaProducer
log.error('I am an errback', exc_info=excp)
# handle exception

# produce asynchronously with callbacks
# produce asynchronously with callbacks
producer.send('my-topic', b'raw_bytes').add_callback(on_send_success).add_errback(on_send_error)

# block until all async messages are sent
producer.flush()

# configure multiple retries
producer = KafkaProducer(retries=5)


ClusterMetadata
=============
.. code:: python
Expand All @@ -131,7 +131,7 @@ ClusterMetadata
# get all partitions of a topic
print(clusterMetadata.partitions_for_topic("topic"))

# list topics
# list topics
print(clusterMetadata.topics())


Expand All @@ -140,9 +140,9 @@ KafkaAdminClient
.. code:: python
from kafka import KafkaAdminClient
from kafka.admin import NewTopic

admin = KafkaAdminClient(bootstrap_servers=['broker1:1234'])

# create a new topic
topics_list = []
topics_list.append(NewTopic(name="testtopic", num_partitions=1, replication_factor=1))
Expand All @@ -160,4 +160,4 @@ KafkaAdminClient
# get consumer group offset
print(admin.list_consumer_group_offsets('cft-plt-qa.connect'))


2 changes: 1 addition & 1 deletion kafka/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.3-dev'
__version__ = '2.0.3'