Skip to content

Commit 0be7ddb

Browse files
authored
librdkafka and confluent-kafka-python v2.3.0rc3 (confluentinc#1656)
1 parent 6dd1e57 commit 0be7ddb

File tree

10 files changed

+20
-20
lines changed

10 files changed

+20
-20
lines changed

.semaphore/semaphore.yml

Lines changed: 1 addition & 1 deletion
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.2.0
11+
value: v2.3.0-RC3
1212
prologue:
1313
commands:
1414
- checkout

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# built documents.
3636
#
3737
# The short X.Y version.
38-
version = '2.2.0'
38+
version = '2.3.0rc3'
3939
# The full version, including alpha/beta/rc tags.
4040
release = version
4141
######################################################################

examples/docker/Dockerfile.alpine

Lines changed: 1 addition & 1 deletion
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.2.0
33+
ENV LIBRDKAFKA_VERSION v2.3.0-RC3
3434
ENV KAFKACAT_VERSION master
3535

3636

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def get_install_requirements(path):
7575
setup(name='confluent-kafka',
7676
# Make sure to bump CFL_VERSION* in confluent_kafka/src/confluent_kafka.h
7777
# and version in docs/conf.py.
78-
version='2.2.0',
78+
version='2.3.0rc3',
7979
description='Confluent\'s Python client for Apache Kafka',
8080
author='Confluent Inc',
8181
author_email='support@confluent.io',

src/confluent_kafka/_util/conversion_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ def convert_to_enum(val, enum_clazz):
2121
if type(enum_clazz) is not type(Enum):
2222
raise TypeError("'enum_clazz' must be of type Enum")
2323

24-
if type(val) == str:
24+
if isinstance(val, str):
2525
# Allow it to be specified as case-insensitive string, for convenience.
2626
try:
2727
val = enum_clazz[val.upper()]
2828
except KeyError:
2929
raise ValueError("Unknown value \"%s\": should be a %s" % (val, enum_clazz.__name__))
3030

31-
elif type(val) == int:
31+
elif isinstance(val, int):
3232
# The C-code passes restype as an int, convert to enum.
3333
val = enum_clazz(val)
3434

35-
elif type(val) != enum_clazz:
35+
elif not isinstance(val, enum_clazz):
3636
raise TypeError("Unknown value \"%s\": should be a %s" % (val, enum_clazz.__name__))
3737

3838
return val

src/confluent_kafka/admin/_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ def __init__(self, restype, name,
146146
if name is None:
147147
raise ValueError("Expected resource name to be a string")
148148

149-
if type(restype) == str:
149+
if isinstance(restype, str):
150150
# Allow resource type to be specified as case-insensitive string, for convenience.
151151
try:
152152
restype = ConfigResource.Type[restype.upper()]
153153
except KeyError:
154154
raise ValueError("Unknown resource type \"%s\": should be a ConfigResource.Type" % restype)
155155

156-
elif type(restype) == int:
156+
elif isinstance(restype, int):
157157
# The C-code passes restype as an int, convert to Type.
158158
restype = ConfigResource.Type(restype)
159159

src/confluent_kafka/src/confluent_kafka.h

Lines changed: 7 additions & 7 deletions
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 0x02020000
46-
#define CFL_VERSION_STR "2.2.0"
45+
#define CFL_VERSION 0x02030000
46+
#define CFL_VERSION_STR "2.3.0rc3"
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 0x020200ff
54+
#define MIN_RD_KAFKA_VERSION 0x020300ff
5555

5656
#ifdef __APPLE__
57-
#define MIN_VER_ERRSTR "confluent-kafka-python requires librdkafka v2.2.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.3.0 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.2.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.3.0 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.2.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.3.0 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.2.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.3.0 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/integration/admin/test_incremental_alter_configs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from confluent_kafka.admin import ConfigResource,\
2-
ConfigEntry, ResourceType,\
1+
from confluent_kafka.admin import ConfigResource, \
2+
ConfigEntry, ResourceType, \
33
AlterConfigOpType
44

55

tests/test_Consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def commit_cb(cs, err, ps):
185185
def test_subclassing():
186186
class SubConsumer(Consumer):
187187
def poll(self, somearg):
188-
assert type(somearg) == str
188+
assert isinstance(somearg, str)
189189
super(SubConsumer, self).poll(timeout=0.0001)
190190

191191
sc = SubConsumer({"group.id": "test", "session.timeout.ms": "90"})

tests/test_Producer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def produce_hi(self):
134134
super(SubProducer, self).produce(self.topic, value='hi')
135135

136136
sp = SubProducer(dict(), 'atopic')
137-
assert type(sp) == SubProducer
137+
assert isinstance(sp, SubProducer)
138138

139139
# Invalid config should fail
140140
with pytest.raises(KafkaException):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy