Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Use typing.NamedTuple instead of collections.namedtuple for ConsumerRecord #204

Open
widow-tamar opened this issue Nov 18, 2024 · 0 comments

Comments

@widow-tamar
Copy link

It would be helpful to have type annotations (and possibly default values) for a fundamental datatype of this library.
I'm requesting typing.NamedTuple because it is a first-party alternative that should effectively be a drop-in replacement, and therefore have minimal risk.
I've sketched this out here, with the understanding that this is not a complete or final version of the actual data types.

Per the python docs, typing.NamedTuple supports annotations, default values, and docstrings as of 3.6.1; the repo readme banner indicates 3.8 as the earliest supported version, so I'm assuming this change is safe.

If there's additional work I can do to support this change, please let me know.

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

No branches or pull requests

1 participant