From 5cec89cb57e283db18f52a8f80e9d282860e5923 Mon Sep 17 00:00:00 2001 From: "riseproject-dev[bot]" <330740410+riseproject-dev[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 08:32:21 +0000 Subject: [PATCH 1/3] confluent-kafka: Add version 2.16.0 Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> --- docs/packages/confluent-kafka.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/confluent-kafka.yaml b/docs/packages/confluent-kafka.yaml index ede36bf23d6..7eb1c87fb12 100644 --- a/docs/packages/confluent-kafka.yaml +++ b/docs/packages/confluent-kafka.yaml @@ -28,3 +28,4 @@ versions: - filename: confluent_kafka-2.15.1-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl sha256: fecab5f49cd9b62859d71c85039d7969a133d6356f3301668f09faf34c850c5e requires-python: '>=3.8' +- version: 2.16.0 From 8cc1e5e0deb276a084a14b0d2cc15344d0cb4239 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 9 Oct 2026 16:32:50 +0000 Subject: [PATCH 2/3] confluent-kafka: carry forward riscv64 patches to 2.16.0 Nightly version bump omitted the patches/confluent-kafka/ directory for 2.16.0, so the build's unconditional `git apply .../*.patch` step failed with "No such file or directory" before any build/test ran. Copied forward the same patch set from 2.15.1 (unchanged since then). --- ...url-s-licences-to-the-binary-wheel-s.patch | 101 ++++++++++++++++++ ...aising-callbacks-in-test_callback_ex.patch | 56 ++++++++++ 2 files changed, 157 insertions(+) create mode 100644 patches/confluent-kafka/2.16.0/0001-add-zstd-s-and-curl-s-licences-to-the-binary-wheel-s.patch create mode 100644 patches/confluent-kafka/2.16.0/0002-tests-make-the-raising-callbacks-in-test_callback_ex.patch diff --git a/patches/confluent-kafka/2.16.0/0001-add-zstd-s-and-curl-s-licences-to-the-binary-wheel-s.patch b/patches/confluent-kafka/2.16.0/0001-add-zstd-s-and-curl-s-licences-to-the-binary-wheel-s.patch new file mode 100644 index 00000000000..6da8911b340 --- /dev/null +++ b/patches/confluent-kafka/2.16.0/0001-add-zstd-s-and-curl-s-licences-to-the-binary-wheel-s.patch @@ -0,0 +1,101 @@ +From 1194a46dfeff375d6e936f0da262b82638c7eacc Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Wed, 26 Aug 2026 02:29:29 +0200 +Subject: [PATCH] add zstd's and curl's licences to the binary wheel's LICENSE + +Upstream-Status: To upstream [not submitted yet: confluentinc requires a signed CLA before a pull request can be accepted] + +The Linux and macOS wheels statically link libzstd and libcurl into +librdkafka (`STATIC_LINKING ... ZSTD CURL` in the shipped +librdkafka-*.so.1, zstd 1.5.7 and curl 8.20.0 as pinned by librdkafka's +mklove source-deps). LICENSE already carries the extra notices the binary +wheel needs -- a dedicated "The binary wheel distribution of +confluent-kafka-python contains additional software with the following +licenses" section covering OpenSSL, zlib and librdkafka -- but zstd and +curl are missing from it. + +Both licences require their copyright notice to travel with binary +redistributions, so add them beside the ones already listed. +--- + LICENSE | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 68 insertions(+) + +diff --git a/LICENSE b/LICENSE +index 02f2aa0..266a23f 100644 +--- a/LICENSE ++++ b/LICENSE +@@ -364,6 +364,74 @@ OpenSSL License + + + ++############################################################################## ++# zstd # ++############################################################################## ++ ++BSD License ++ ++For Zstandard software ++ ++Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without modification, ++are permitted provided that the following conditions are met: ++ ++ * Redistributions of source code must retain the above copyright notice, this ++ list of conditions and the following disclaimer. ++ ++ * Redistributions in binary form must reproduce the above copyright notice, ++ this list of conditions and the following disclaimer in the documentation ++ and/or other materials provided with the distribution. ++ ++ * Neither the name Facebook, nor Meta, nor the names of its contributors may ++ be used to endorse or promote products derived from this software without ++ specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ++ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++ ++ ++ ++############################################################################## ++# curl # ++############################################################################## ++ ++COPYRIGHT AND PERMISSION NOTICE ++ ++Copyright (c) 1996 - 2026, Daniel Stenberg, , and many ++contributors, see the THANKS file. ++ ++All rights reserved. ++ ++Permission to use, copy, modify, and distribute this software for any purpose ++with or without fee is hereby granted, provided that the above copyright ++notice and this permission notice appear in all copies. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN ++NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, ++DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR ++OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE ++OR OTHER DEALINGS IN THE SOFTWARE. ++ ++Except as contained in this notice, the name of a copyright holder shall not ++be used in advertising or otherwise to promote the sale, use or other dealings ++in this Software without prior written authorization of the copyright holder. ++ ++ ++ ++ + ############################################################################## + # librdkafka licenses # + ############################################################################## diff --git a/patches/confluent-kafka/2.16.0/0002-tests-make-the-raising-callbacks-in-test_callback_ex.patch b/patches/confluent-kafka/2.16.0/0002-tests-make-the-raising-callbacks-in-test_callback_ex.patch new file mode 100644 index 00000000000..ef36b9c4454 --- /dev/null +++ b/patches/confluent-kafka/2.16.0/0002-tests-make-the-raising-callbacks-in-test_callback_ex.patch @@ -0,0 +1,56 @@ +From cb64de7e55aee89ed02dbc19084344270df53720 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Wed, 26 Aug 2026 12:54:40 +0200 +Subject: [PATCH] tests: make the raising callbacks in + test_callback_exception_no_system_error raise once + +test_callback_exception_no_system_error installs an error_cb and a +stats_cb that raise unconditionally, asserts the exception surfaces out +of consume(), and then calls close() with the callback still armed. +librdkafka keeps delivering both events for the lifetime of the consumer +-- stats every statistics.interval.ms (100ms here), the broker-resolve +failure on its retry backoff -- and close() dispatches whatever is queued, +so if more than one interval elapses between the assertions and close() +the callback fires again and the RuntimeError escapes close(), failing the +test. + +It is a race, not an architecture problem: on a slower CI runner the few +statements between the assertion and close() are enough. Reproduced on +macOS/arm64 by inserting time.sleep(1.2) before each close() -- the test +fails there unmodified and passes with this change. + +Raise only on the first invocation. The assertions are unchanged +(each callback still runs, still appends, still raises out of consume()); +only the redundant later raises during close() go away. + +Upstream-Status: To upstream [not submitted yet: confluentinc requires a signed CLA before a pull request can be accepted] +--- + tests/test_Consumer.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/tests/test_Consumer.py b/tests/test_Consumer.py +index 74b3120..ad42828 100644 +--- a/tests/test_Consumer.py ++++ b/tests/test_Consumer.py +@@ -440,7 +440,9 @@ def test_callback_exception_no_system_error(): + error_called = [] + + def error_cb_that_raises(error): +- """Error callback that raises an exception""" ++ """Error callback that raises an exception, once""" ++ if error_called: ++ return + error_called.append(error) + raise RuntimeError("Test exception from error_cb") + +@@ -469,7 +471,9 @@ def test_callback_exception_no_system_error(): + stats_called = [] + + def stats_cb_that_raises(stats_json): +- """Stats callback that raises an exception""" ++ """Stats callback that raises an exception, once""" ++ if stats_called: ++ return + stats_called.append(stats_json) + raise RuntimeError("Test exception from stats_cb") + From e729769a05a9b123888df20c0c2d7ac28d47dfa0 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Sat, 10 Oct 2026 07:45:36 +0000 Subject: [PATCH 3/3] confluent-kafka: drop the upstreamed callback-test patch for 2.16.0 0002-tests-make-the-raising-callbacks-in-test_callback_ex.patch no longer applies to v2.16.0 (tests/test_Consumer.py:440), failing every build leg at the "Patch confluent-kafka source" step. Upstream fixed the same race itself in 4170247 ("[NOGIL] Add Free Threading Support (#2347)"): error_cb_that_raises and stats_cb_that_raises in test_callback_exception_no_system_error now raise only on the first invocation, so close() no longer re-raises from a queued stats/error event, and the single consume() is replaced by a bounded call_until_callback_raises(poll) loop. The patch is redundant, so drop it as was done for the delete_records backport in 2.15.1. The licence patch still applies unchanged. --- ...aising-callbacks-in-test_callback_ex.patch | 56 ------------------- 1 file changed, 56 deletions(-) delete mode 100644 patches/confluent-kafka/2.16.0/0002-tests-make-the-raising-callbacks-in-test_callback_ex.patch diff --git a/patches/confluent-kafka/2.16.0/0002-tests-make-the-raising-callbacks-in-test_callback_ex.patch b/patches/confluent-kafka/2.16.0/0002-tests-make-the-raising-callbacks-in-test_callback_ex.patch deleted file mode 100644 index ef36b9c4454..00000000000 --- a/patches/confluent-kafka/2.16.0/0002-tests-make-the-raising-callbacks-in-test_callback_ex.patch +++ /dev/null @@ -1,56 +0,0 @@ -From cb64de7e55aee89ed02dbc19084344270df53720 Mon Sep 17 00:00:00 2001 -From: Ludovic Henry -Date: Wed, 26 Aug 2026 12:54:40 +0200 -Subject: [PATCH] tests: make the raising callbacks in - test_callback_exception_no_system_error raise once - -test_callback_exception_no_system_error installs an error_cb and a -stats_cb that raise unconditionally, asserts the exception surfaces out -of consume(), and then calls close() with the callback still armed. -librdkafka keeps delivering both events for the lifetime of the consumer --- stats every statistics.interval.ms (100ms here), the broker-resolve -failure on its retry backoff -- and close() dispatches whatever is queued, -so if more than one interval elapses between the assertions and close() -the callback fires again and the RuntimeError escapes close(), failing the -test. - -It is a race, not an architecture problem: on a slower CI runner the few -statements between the assertion and close() are enough. Reproduced on -macOS/arm64 by inserting time.sleep(1.2) before each close() -- the test -fails there unmodified and passes with this change. - -Raise only on the first invocation. The assertions are unchanged -(each callback still runs, still appends, still raises out of consume()); -only the redundant later raises during close() go away. - -Upstream-Status: To upstream [not submitted yet: confluentinc requires a signed CLA before a pull request can be accepted] ---- - tests/test_Consumer.py | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/tests/test_Consumer.py b/tests/test_Consumer.py -index 74b3120..ad42828 100644 ---- a/tests/test_Consumer.py -+++ b/tests/test_Consumer.py -@@ -440,7 +440,9 @@ def test_callback_exception_no_system_error(): - error_called = [] - - def error_cb_that_raises(error): -- """Error callback that raises an exception""" -+ """Error callback that raises an exception, once""" -+ if error_called: -+ return - error_called.append(error) - raise RuntimeError("Test exception from error_cb") - -@@ -469,7 +471,9 @@ def test_callback_exception_no_system_error(): - stats_called = [] - - def stats_cb_that_raises(stats_json): -- """Stats callback that raises an exception""" -+ """Stats callback that raises an exception, once""" -+ if stats_called: -+ return - stats_called.append(stats_json) - raise RuntimeError("Test exception from stats_cb") -