Skip to content

fix: support aiokafka 0.13.0 which removed api_version parameter#674

Merged
patkivikram merged 1 commit into
faust-streaming:masterfrom
nightcityblade:fix/issue-672
Mar 30, 2026
Merged

fix: support aiokafka 0.13.0 which removed api_version parameter#674
patkivikram merged 1 commit into
faust-streaming:masterfrom
nightcityblade:fix/issue-672

Conversation

@nightcityblade

Copy link
Copy Markdown
Contributor

Description

aiokafka 0.13.0 removed the api_version parameter from both AIOKafkaConsumer and AIOKafkaProducer. Since faust requires aiokafka>=0.10.0, it needs to handle both old and new versions.

This adds a version check (_AIOKAFKA_HAS_API_VERSION) and conditionally includes api_version in the consumer and producer kwargs only when running with aiokafka < 0.13.0.

Fixes #672

Changes

  • faust/transport/drivers/aiokafka.py: Added version check, conditionally pass api_version to consumer and producer
  • tests/unit/transport/drivers/test_aiokafka.py: Updated tests to handle both aiokafka versions

Testing

All 134 tests pass (23 skipped, including 1 for the api_version parametrized test on aiokafka >= 0.13.0).

aiokafka 0.13.0 removed the `api_version` parameter from both
`AIOKafkaConsumer` and `AIOKafkaProducer`. Since faust requires
`aiokafka>=0.10.0`, it needs to handle both old and new versions.

This adds a version check and conditionally includes `api_version`
only when running with aiokafka < 0.13.0.

Fixes faust-streaming#672
@nightcityblade

Copy link
Copy Markdown
Contributor Author

Gentle ping — this fixes compatibility with aiokafka 0.13.0 which removed the api_version parameter. Let me know if any changes are needed.

@dada-engineer

Copy link
Copy Markdown
Collaborator

Nice one thank you.

dada-engineer
dada-engineer previously approved these changes Mar 30, 2026
@dada-engineer

Copy link
Copy Markdown
Collaborator

@Mopsgeschwindigkeit the test for 3.9 seem to fail. can you check this pls?

@dada-engineer
dada-engineer dismissed their stale review March 30, 2026 07:06

failing 3.9 tests

@patkivikram
patkivikram merged commit 47201a6 into faust-streaming:master Mar 30, 2026
Mopsgeschwindigkeit pushed a commit to smaxtec/faust that referenced this pull request Mar 31, 2026
…st-streaming#674)

aiokafka 0.13.0 removed the `api_version` parameter from both
`AIOKafkaConsumer` and `AIOKafkaProducer`. Since faust requires
`aiokafka>=0.10.0`, it needs to handle both old and new versions.

This adds a version check and conditionally includes `api_version`
only when running with aiokafka < 0.13.0.

Fixes faust-streaming#672

Co-authored-by: nightcityblade <nightcityblade@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Faust Worker Error with aiokafka 0.13.0

3 participants