Skip to content

[kafka-python] Add header and sticky assignor attributes - #16925

Open
Asimmimx wants to merge 1 commit into
python:mainfrom
Asimmimx:kafka-header-attributes
Open

Asimmimx wants to merge 1 commit into
python:mainfrom
Asimmimx:kafka-header-attributes

Conversation

@Asimmimx

Copy link
Copy Markdown

Replaces the incomplete __getattr__ in RequestHeader, ResponseHeader and StickyAssignorUserData with the attributes generated at runtime from the JSON schemas, and removes the matching allowlist entries.

Upstream:

Agent: Claude Code (Claude Opus 5.5)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

Comment on lines +5 to +10
class TopicPartition(DataContainer):
topic: str
partitions: list[int]

previous_assignment: list[TopicPartition]
generation: int

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do the nested class and attributes come from? This warrants at least a short comment.

Comment on lines +19 to +22
request_api_key: int
request_api_version: int
correlation_id: int
client_id: str | None

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

class ResponseHeader(ApiHeader):
# TODO: Reflect correlation_id attribute
def __getattr__(self, name: str): ... # incomplete class
correlation_id: int

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

This branch has not been deployed

No deployments
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