Skip to content

[kafka-python] KafkaConsumer.subscription() can return None - #16739

Merged
srittau merged 1 commit into
python:mainfrom
aidxhxr:kafka-subscription-none
Nov 16, 2026
Merged

srittau merged 1 commit into
python:mainfrom
aidxhxr:kafka-subscription-none

Conversation

@aidxhxr

@aidxhxr aidxhxr commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

KafkaConsumer.subscription() returns None while the consumer has no subscription, i.e. before subscribe() and after unsubscribe(): https://github.com/dpkp/kafka-python/blob/3.0.13/kafka/consumer/group.py#L1136-L1144

This adds None to the return type.

Agent: Claude Code

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit 9ad0e54 into python:main Nov 16, 2026
74 checks passed
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.

2 participants