Skip to content

Commit

Permalink
Bump kafka deps versions & fix integration test failures (#1818)
Browse files Browse the repository at this point in the history
* Bump kafka deps versions

* adjust import

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added missing tox python 3.12 env for kafka

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
auvipy and pre-commit-ci[bot] authored Nov 6, 2023
1 parent c75c2a0 commit 85abaa6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions kombu/transport/confluentkafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@

try:
import confluent_kafka
from confluent_kafka import Consumer, Producer, TopicPartition
from confluent_kafka import (Consumer, KafkaException, Producer,
TopicPartition)
from confluent_kafka.admin import AdminClient, NewTopic

KAFKA_CONNECTION_ERRORS = ()
Expand All @@ -86,7 +87,7 @@
DEFAULT_PORT = 9092


class NoBrokersAvailable(confluent_kafka.KafkaException):
class NoBrokersAvailable(KafkaException):
"""Kafka broker is not available exception."""

retriable = True
Expand Down
2 changes: 1 addition & 1 deletion requirements/extras/confluentkafka.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
confluent-kafka==2.1.1
confluent-kafka>=2.2.0
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ envlist =
{pypy3.9,3.8,3.9,3.10,3.11,3.12}-linux-integration-py-amqp
{pypy3.9,3.8,3.9,3.10,3.11}-linux-integration-redis
{pypy3.9,3.8,3.9,3.10,3.11}-linux-integration-mongodb
{3.8,3.9,3.10,3.11}-linux-integration-kafka
{3.8,3.9,3.10,3.11,3.12}-linux-integration-kafka
flake8
apicheck
pydocstyle
Expand All @@ -29,7 +29,7 @@ deps=
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/default.txt
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test.txt
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test-ci.txt
apicheck,3.8-linux,3.9-linux,3.10-linux,3.11-linux: -r{toxinidir}/requirements/extras/confluentkafka.txt
apicheck,3.8-linux,3.9-linux,3.10-linux,3.11-linux,3.12-linux: -r{toxinidir}/requirements/extras/confluentkafka.txt
apicheck,linkcheck: -r{toxinidir}/requirements/docs.txt
flake8,pydocstyle,mypy: -r{toxinidir}/requirements/pkgutils.txt

Expand Down Expand Up @@ -99,7 +99,7 @@ healthcheck_start_period = 5
environment = ALLOW_ANONYMOUS_LOGIN=yes

[docker:kafka]
image = bitnami/kafka:3.4.0-debian-11-r21
image = bitnami/kafka:latest
ports =
9092:9092/tcp
healthcheck_cmd = /bin/bash -c 'kafka-topics.sh --list --bootstrap-server 127.0.0.1:9092'
Expand Down

0 comments on commit 85abaa6

Please sign in to comment.