Skip to content

io.IOBase: correct metaclass #8468

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

Merged
merged 1 commit into from
Aug 2, 2022
Merged

io.IOBase: correct metaclass #8468

merged 1 commit into from
Aug 2, 2022

Conversation

AlexWaygood
Copy link
Member

io.IOBase has ABCMeta as the metaclass at runtime: https://github.com/python/cpython/blob/75a6441718dcbc65d993c9544e67e25bef120e82/Lib/io.py#L71

But not currently in the stub. This is causing an unexpected stubtest failure for a urllib3 PR here: https://github.com/python/typeshed/runs/7633083101?check_suite_focus=true

`io.IOBase` has `ABCMeta` as the metaclass at runtime: https://github.com/python/cpython/blob/75a6441718dcbc65d993c9544e67e25bef120e82/Lib/io.py#L71

But not currently in the stub. This is causing an unexpected stubtest failure for a `urllib3` PR here: https://github.com/python/typeshed/runs/7633083101?check_suite_focus=true
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2022

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

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

I would have expected our tests to explode. Let's wait for a third opinion, but LGTM.

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.

This isn't part of the hierarchy for typing.IO, so makes sense for it to be relatively harmless.

@JelleZijlstra JelleZijlstra merged commit 1dc1c91 into master Aug 2, 2022
@JelleZijlstra JelleZijlstra deleted the AlexWaygood-patch-1 branch August 2, 2022 16:20
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.

3 participants