Skip to content

Commit 1e41691

Browse files
committed
Address feedback
1 parent 48208f4 commit 1e41691

10 files changed

Lines changed: 121 additions & 133 deletions

File tree

.semaphore/semaphore.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ global_job_config:
99
env_vars:
1010
- name: LIBRDKAFKA_VERSION
1111
value: v2.13.2
12+
# TODO KIP-932: Remove LIBRDKAFKA_BRANCH once LIBRDKAFKA_VERSION includes share consumer support
1213
- name: LIBRDKAFKA_BRANCH
1314
value: dev_kip-932_queues-for-kafka
1415
prologue:
@@ -35,6 +36,7 @@ blocks:
3536
commands:
3637
- sem-version python 3.11
3738
- pip install uv
39+
# TODO KIP-932: Add LIBRDKAFKA_BRANCH fallback for share consumer support
3840
- PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse 2.16.2
3941
- tar -czf wheelhouse-macOS-${ARCH}.tgz wheelhouse
4042
- artifact push workflow wheelhouse-macOS-${ARCH}.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}.tgz/
@@ -61,6 +63,7 @@ blocks:
6163
commands:
6264
- sem-version python 3.13
6365
- pip install uv
66+
# TODO KIP-932: Add LIBRDKAFKA_BRANCH fallback for share consumer support
6467
- PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse
6568
- tar -czf wheelhouse-macOS-${ARCH}-py313-plus.tgz wheelhouse
6669
- artifact push workflow wheelhouse-macOS-${ARCH}-py313-plus.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}-py313-plus.tgz/
@@ -85,6 +88,7 @@ blocks:
8588
commands:
8689
- sem-version python 3.11
8790
- pip install uv
91+
# TODO KIP-932: Add LIBRDKAFKA_BRANCH fallback for share consumer support
8892
- PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse 2.16.2
8993
- tar -czf wheelhouse-macOS-${ARCH}.tgz wheelhouse
9094
- artifact push workflow wheelhouse-macOS-${ARCH}.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}.tgz/
@@ -113,6 +117,7 @@ blocks:
113117
commands:
114118
- sem-version python 3.13
115119
- pip install uv
120+
# TODO KIP-932: Add LIBRDKAFKA_BRANCH fallback for share consumer support
116121
- PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse
117122
- tar -czf wheelhouse-macOS-${ARCH}-py313-plus.tgz wheelhouse
118123
- artifact push workflow wheelhouse-macOS-${ARCH}-py313-plus.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}-py313-plus.tgz/
@@ -135,6 +140,7 @@ blocks:
135140
commands:
136141
- sem-version python 3.13
137142
- pip install uv
143+
# TODO KIP-932: Add LIBRDKAFKA_BRANCH fallback for share consumer support
138144
- ./tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse
139145
- tar -czf wheelhouse-linux-${ARCH}.tgz wheelhouse
140146
- artifact push workflow wheelhouse-linux-${ARCH}.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}.tgz/
@@ -157,6 +163,7 @@ blocks:
157163
commands:
158164
- sem-version python 3.11
159165
- pip install uv
166+
# TODO KIP-932: Add LIBRDKAFKA_BRANCH fallback for share consumer support
160167
- ./tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse
161168
- tar -czf wheelhouse-linux-${ARCH}.tgz wheelhouse
162169
- artifact push workflow wheelhouse-linux-${ARCH}.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}.tgz/
@@ -189,6 +196,7 @@ blocks:
189196
commands:
190197
- sem-version python 3.11.9
191198
- bash tools/mingw-w64/semaphore_commands.sh
199+
# TODO KIP-932: Add LIBRDKAFKA_BRANCH fallback for share consumer support
192200
- bash tools/wheels/install-librdkafka.sh $env:LIBRDKAFKA_VERSION.TrimStart("v") dest
193201
- tools/wheels/build-wheels.bat x64 win_amd64 dest wheelhouse
194202
- tar -czf wheelhouse-windows-${Env:ARCH}.tgz wheelhouse
@@ -332,11 +340,11 @@ blocks:
332340
# Install existing test requirements
333341
- uv pip install -r requirements/requirements-tests-install.txt
334342

343+
# TODO KIP-932: Remove LIBRDKAFKA_BRANCH fallback once LIBRDKAFKA_VERSION includes share consumer support
335344
# Build and install confluent-kafka from source
336345
- lib_dir=dest/runtimes/$OS_NAME-$ARCH/native
337346
- |
338347
if [[ -n $LIBRDKAFKA_BRANCH ]]; then
339-
sudo apt-get install -y -qq libssl-dev libsasl2-dev liblz4-dev libzstd-dev
340348
tools/wheels/build-librdkafka-branch.sh "$LIBRDKAFKA_BRANCH" dest
341349
else
342350
tools/wheels/install-librdkafka.sh "${LIBRDKAFKA_VERSION#v}" dest

src/confluent_kafka/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
TIMESTAMP_LOG_APPEND_TIME,
3838
TIMESTAMP_NOT_AVAILABLE,
3939
Consumer,
40+
ShareConsumer,
4041
Message,
4142
Producer,
42-
ShareConsumer,
4343
TopicPartition,
4444
Uuid,
4545
consistent,
@@ -57,6 +57,7 @@
5757
"Consumer",
5858
"ShareConsumer",
5959
"aio",
60+
6061
"KafkaError",
6162
"KafkaException",
6263
"kafkatest",

src/confluent_kafka/cimpl.pyi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,12 @@ class Consumer:
554554

555555
class ShareConsumer:
556556
"""Share Consumer for queue-like message consumption (KIP-932)."""
557-
def __init__(self, config: Dict[str, Union[str, int, float, bool]]) -> None: ...
557+
@overload
558+
def __init__(self, config: Dict[str, Any]) -> None: ...
559+
@overload
560+
def __init__(self, config: Dict[str, Any], /, **kwargs: Any) -> None: ...
561+
@overload
562+
def __init__(self, **config: Any) -> None: ...
558563
def subscribe(self, topics: List[str]) -> None: ...
559564
def unsubscribe(self) -> None: ...
560565
def subscription(self) -> List[str]: ...

src/confluent_kafka/src/Admin.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ struct Admin_options {
9999
* Make sure this is kept up to date with Admin_options above. */
100100
#define Admin_options_INITIALIZER \
101101
{ \
102-
Admin_options_def_int, Admin_options_def_float, \
103-
Admin_options_def_float, Admin_options_def_int, \
104-
Admin_options_def_int, Admin_options_def_int, \
105-
Admin_options_def_int, Admin_options_def_ptr, \
106-
Admin_options_def_cnt, Admin_options_def_ptr, \
107-
Admin_options_def_cnt, \
102+
Admin_options_def_int, Admin_options_def_float, \
103+
Admin_options_def_float, Admin_options_def_int, \
104+
Admin_options_def_int, Admin_options_def_int, \
105+
Admin_options_def_int, Admin_options_def_ptr, \
106+
Admin_options_def_cnt, Admin_options_def_ptr, \
107+
Admin_options_def_cnt, \
108108
}
109109

110110
#define Admin_options_is_set_int(v) ((v) != Admin_options_def_int)

0 commit comments

Comments
 (0)