Repository navigation
Name the arguments of describe_consumer_groups() and describe_topics() in order - #2437
Closed
Pierre-Yves Le Borgne (pylaterreur) wants to merge 1 commit into
Closed
Pierre-Yves Le Borgne (pylaterreur) wants to merge 1 commit into
Pierre-Yves Le Borgne (pylaterreur) wants to merge 1 commit into
Conversation
…) in order The C methods describe_consumer_groups() and describe_topics() of _AdminClientImpl take the group ids or topic names first and the future second, but their keyword list named them in the opposite order: called with keywords, as in describe_consumer_groups(group_ids=..., future=...), the group ids went to the future and the call failed with "Expected non-empty list of group_ids". AdminClient passes them by position, so only direct callers were affected. Name them in the order they are parsed, fix the order in both doc strings and in the describe_topics() stub, and drop the type: ignore that the stub made necessary in AdminClient.describe_topics(). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
Pierre-Yves Le Borgne (pylaterreur)
requested review from
a team and
Matthew Seal (MSeal)
as code owners
November 13, 2026 23:44
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
Member
|
Thanks for finding this. I'm closing it because it doesn't affect users. The reversed keyword names are only in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The C methods
describe_consumer_groups()anddescribe_topics()of_AdminClientImpltake the group ids or topic names first and the future second, but their keyword list names them in the opposite order. Called with keywords, as indescribe_consumer_groups(group_ids=..., future=...), the group ids go to the future and the call fails with "Expected non-empty list of group_ids";describe_topics(topic_names=..., future=...)fails with "Expected a list of topics".AdminClientpasses them by position, so only direct callers are affected.The keyword lists now name the arguments in the order they are parsed. Both doc strings and the
describe_topics()stub incimpl.pyihad the same reversed order and are fixed too, which makes the# type: ignore[arg-type]inAdminClient.describe_topics()unnecessary.Checklist
_AdminClientImplmethods directly with keywords, which the doc strings say not to use. No CHANGELOG entry.test_describe_consumer_groups_and_topics_keyword_argumentsintests/test_Admin.pycalls both with keywords.References
Test & Review
ValueError: Expected non-empty list of group_ids) and passes on this branch.tests/test_Admin.py: 35 passed on both.python3 -m mypy src/confluent_kafka(as in CI): no issues, also without the removedtype: ignore.tools/style-format.shon the changed Python files andflake8pass. clang-format 18.1.8 and 20.1.8 report no new differences inAdmin.c.🤖 Generated with Claude Code
https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN