Skip to content

Commit a29ecb9

Browse files
authored
Release v2.6.1rc2 (#1854)
1 parent a596680 commit a29ecb9

File tree

14 files changed

+65
-38
lines changed

14 files changed

+65
-38
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ tmp-KafkaCluster
2929
.venv
3030
venv_test
3131
venv_examples
32+
*Zone.Identifier

.semaphore/semaphore.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ execution_time_limit:
88
global_job_config:
99
env_vars:
1010
- name: LIBRDKAFKA_VERSION
11-
value: v2.6.0
11+
value: v2.6.1-RC2
1212
prologue:
1313
commands:
1414
- checkout

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
v2.6.1 is a maintenance release with the following fixes and enhancements:
66

7-
- Migrated build system from `setup.py` to `pyproject.toml` in accordance with `PEP 517` and `PEP 518`, improving project configuration, build system requirements management, and compatibility with modern Python packaging tools like `pip` and `build`.
7+
- Migrated build system from `setup.py` to `pyproject.toml` in accordance with `PEP 517` and `PEP 518`, improving project configuration, build system requirements management, and compatibility with modern Python packaging tools like `pip` and `build`. (#1592)
8+
- Removed python 3.6 support. (#1592)
89
- Added an example for OAUTH OIDC producer with support for confluent cloud (#1769, @sarwarbhuiyan)
910

1011
confluent-kafka-python is based on librdkafka v2.6.1, see the

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# built documents.
2828
#
2929
# The short X.Y version.
30-
version = '2.6.0'
30+
version = '2.6.1rc2'
3131
# The full version, including alpha/beta/rc tags.
3232
release = version
3333
######################################################################

examples/docker/Dockerfile.alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ FROM alpine:3.12
3030

3131
COPY . /usr/src/confluent-kafka-python
3232

33-
ENV LIBRDKAFKA_VERSION v2.6.0
33+
ENV LIBRDKAFKA_VERSION v2.6.1-RC2
3434
ENV KAFKACAT_VERSION master
3535

3636

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "confluent-kafka"
7-
version = "2.6.0.post1.dev1"
7+
version = "2.6.1rc2"
88
description = "Confluent's Python client for Apache Kafka"
99
classifiers = [
1010
"Development Status :: 5 - Production/Stable",

src/confluent_kafka/src/confluent_kafka.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,28 @@
4242
* 0xMMmmRRPP
4343
* MM=major, mm=minor, RR=revision, PP=patchlevel (not used)
4444
*/
45-
#define CFL_VERSION 0x02060000
46-
#define CFL_VERSION_STR "2.6.0"
45+
#define CFL_VERSION 0x02060100
46+
#define CFL_VERSION_STR "2.6.1rc2"
4747

4848
/**
4949
* Minimum required librdkafka version. This is checked both during
5050
* build-time (just below) and runtime (see confluent_kafka.c).
5151
* Make sure to keep the MIN_RD_KAFKA_VERSION, MIN_VER_ERRSTR and #error
5252
* defines and strings in sync.
5353
*/
54-
#define MIN_RD_KAFKA_VERSION 0x020600ff
54+
#define MIN_RD_KAFKA_VERSION 0x020601ff
5555

5656
#ifdef __APPLE__
57-
#define MIN_VER_ERRSTR "confluent-kafka-python requires librdkafka v2.6.0 or later. Install the latest version of librdkafka from Homebrew by running `brew install librdkafka` or `brew upgrade librdkafka`"
57+
#define MIN_VER_ERRSTR "confluent-kafka-python requires librdkafka v2.6.1 or later. Install the latest version of librdkafka from Homebrew by running `brew install librdkafka` or `brew upgrade librdkafka`"
5858
#else
59-
#define MIN_VER_ERRSTR "confluent-kafka-python requires librdkafka v2.6.0 or later. Install the latest version of librdkafka from the Confluent repositories, see http://docs.confluent.io/current/installation.html"
59+
#define MIN_VER_ERRSTR "confluent-kafka-python requires librdkafka v2.6.1 or later. Install the latest version of librdkafka from the Confluent repositories, see http://docs.confluent.io/current/installation.html"
6060
#endif
6161

6262
#if RD_KAFKA_VERSION < MIN_RD_KAFKA_VERSION
6363
#ifdef __APPLE__
64-
#error "confluent-kafka-python requires librdkafka v2.6.0 or later. Install the latest version of librdkafka from Homebrew by running `brew install librdkafka` or `brew upgrade librdkafka`"
64+
#error "confluent-kafka-python requires librdkafka v2.6.1 or later. Install the latest version of librdkafka from Homebrew by running `brew install librdkafka` or `brew upgrade librdkafka`"
6565
#else
66-
#error "confluent-kafka-python requires librdkafka v2.6.0 or later. Install the latest version of librdkafka from the Confluent repositories, see http://docs.confluent.io/current/installation.html"
66+
#error "confluent-kafka-python requires librdkafka v2.6.1 or later. Install the latest version of librdkafka from the Confluent repositories, see http://docs.confluent.io/current/installation.html"
6767
#endif
6868
#endif
6969

tests/common/__init__.py

+7-20
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,12 @@
1717
#
1818

1919
import os
20-
from confluent_kafka import Consumer, DeserializingConsumer
21-
from confluent_kafka.avro import AvroConsumer
20+
from confluent_kafka import Consumer
2221

2322
_GROUP_PROTOCOL_ENV = 'TEST_CONSUMER_GROUP_PROTOCOL'
2423
_TRIVUP_CLUSTER_TYPE_ENV = 'TEST_TRIVUP_CLUSTER_TYPE'
2524

2625

27-
def _update_conf_group_protocol(conf=None):
28-
if conf is not None and 'group.id' in conf and TestUtils.use_group_protocol_consumer():
29-
conf['group.protocol'] = 'consumer'
30-
31-
3226
def _trivup_cluster_type_kraft():
3327
return _TRIVUP_CLUSTER_TYPE_ENV in os.environ and os.environ[_TRIVUP_CLUSTER_TYPE_ENV] == 'kraft'
3428

@@ -42,20 +36,13 @@ def use_kraft():
4236
def use_group_protocol_consumer():
4337
return _GROUP_PROTOCOL_ENV in os.environ and os.environ[_GROUP_PROTOCOL_ENV] == 'consumer'
4438

39+
@staticmethod
40+
def update_conf_group_protocol(conf=None):
41+
if conf is not None and 'group.id' in conf and TestUtils.use_group_protocol_consumer():
42+
conf['group.protocol'] = 'consumer'
43+
4544

4645
class TestConsumer(Consumer):
4746
def __init__(self, conf=None, **kwargs):
48-
_update_conf_group_protocol(conf)
47+
TestUtils.update_conf_group_protocol(conf)
4948
super(TestConsumer, self).__init__(conf, **kwargs)
50-
51-
52-
class TestDeserializingConsumer(DeserializingConsumer):
53-
def __init__(self, conf=None, **kwargs):
54-
_update_conf_group_protocol(conf)
55-
super(TestDeserializingConsumer, self).__init__(conf, **kwargs)
56-
57-
58-
class TestAvroConsumer(AvroConsumer):
59-
def __init__(self, conf=None, **kwargs):
60-
_update_conf_group_protocol(conf)
61-
super(TestAvroConsumer, self).__init__(conf, **kwargs)
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
#
4+
# Copyright 2024 Confluent Inc.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
from confluent_kafka import DeserializingConsumer
20+
from confluent_kafka.avro import AvroConsumer
21+
from tests.common import TestUtils
22+
23+
24+
class TestDeserializingConsumer(DeserializingConsumer):
25+
def __init__(self, conf=None, **kwargs):
26+
TestUtils.update_conf_group_protocol(conf)
27+
super(TestDeserializingConsumer, self).__init__(conf, **kwargs)
28+
29+
30+
class TestAvroConsumer(AvroConsumer):
31+
def __init__(self, conf=None, **kwargs):
32+
TestUtils.update_conf_group_protocol(conf)
33+
super(TestAvroConsumer, self).__init__(conf, **kwargs)

tests/integration/admin/__init__.py

Whitespace-only changes.

tests/integration/cluster_fixture.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
from confluent_kafka.admin import AdminClient, NewTopic
2626
from confluent_kafka.schema_registry.schema_registry_client import SchemaRegistryClient
2727

28-
from tests.common import TestDeserializingConsumer, TestConsumer
28+
from tests.common import TestConsumer
29+
from tests.common.schema_registry import TestDeserializingConsumer
2930

3031

3132
class KafkaClusterFixture(object):

tests/integration/integration_test.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131

3232
import confluent_kafka
3333

34-
from tests.common import TestConsumer, TestAvroConsumer
34+
from tests.common import TestConsumer
35+
from tests.common.schema_registry import TestAvroConsumer
3536

3637
try:
3738
# Memory tracker

tests/test_log.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
import confluent_kafka.avro
88
import confluent_kafka.admin
99

10-
from tests.common import TestConsumer, TestAvroConsumer
10+
from tests.common import TestConsumer
11+
from tests.common.schema_registry import TestAvroConsumer
1112

1213

1314
class CountingFilter(logging.Filter):

tools/smoketest.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,13 @@ for py in 3.9 ; do
8585
# Copy unit tests to temporary directory to avoid any conflicting __pycache__
8686
# directories from the source tree.
8787
testdir=$(mktemp -d /tmp/_testdirXXXXXX)
88-
cp tests/*.py $testdir/
88+
mkdir -p $testdir/tests
89+
cp tests/*.py $testdir/tests/
90+
cp -r tests/common $testdir/tests/
8991

9092
# Change to a neutral path where there is no confluent_kafka sub-directory
9193
# that might interfere with module load.
92-
pushd $testdir
94+
pushd $testdir/tests
9395
echo "$0: Running unit tests"
9496
pytest
9597

@@ -123,7 +125,7 @@ c = Consumer({"group.id": "test-linux", "plugin.library.paths": "monitoring-inte
123125
all_fails="$all_fails \[py$py: $fails\]"
124126
fi
125127

126-
popd # $testdir
128+
popd # $testdir/tests
127129
done
128130

129131
if [[ -z $pyvers_tested ]]; then

0 commit comments

Comments
 (0)