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

gh-92128: Add __class_getitem__ to logging.LoggerAdapter and logging.StreamHandler #92129

Merged
merged 4 commits into from
May 2, 2022

Conversation

AlexWaygood
Copy link
Member

Closes #92128

@AlexWaygood AlexWaygood requested a review from vsajip as a code owner May 1, 2022 21:38
@AlexWaygood AlexWaygood requested a review from JelleZijlstra May 1, 2022 21:38
@AlexWaygood AlexWaygood added type-feature A feature request or enhancement stdlib Python modules in the Lib dir labels May 1, 2022
@AlexWaygood
Copy link
Member Author

AlexWaygood commented May 1, 2022

Previous changes like this have not made changes to the docs to note the addition of __class_getitem__, but I'm happy to do so here if it's desirable.

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Looks good, I checked the stubs and it makes sense that these classes are generic.

I do think we should document that these classes are generic and say how many type arguments to expect and what they mean. We should do that more broadly for generic classes, though, and I'd rather get the runtime change in before the feature freeze.

@JelleZijlstra JelleZijlstra merged commit ab616d3 into python:main May 2, 2022
@AlexWaygood AlexWaygood deleted the logging branch May 2, 2022 16:33
@AlexWaygood
Copy link
Member Author

Thanks all for the speedy reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-typing type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add __class_getitem__ to logging.LoggerAdapter and logging.StreamHandler
5 participants