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

Add back workaround to avoid confusing mypy.types and types in pyinfo #13176

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jul 18, 2022

We run mypy/pyinfo.py as a script, and this means that mypy/types.py
could be picked up instead of the stdlib types module, which clearly
doesn't work. This seems to happen at least on macOS, and it broke
PEP 561 tests.

The workaround was accidentally removed as part of #13161.

This should fix #13174 and help with the wheel builds.

We run mypy/pyinfo.py as a script, and this means that mypy/types.py
could be picked up instead of the stdlib `types` module, which clearly
doesn't work. This seems to happen at least on macOS, and it broke
PEP 561 tests.

The workaround was accidentally removed as part of #13161.

This should fix #13174 and help with the wheel builds.
@github-actions
Copy link
Contributor

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

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks, and sorry for the trouble.

I'm a little confused why this broke wheels but not the test suite / what the connection with macOS is

edit: Okay, I see the second. There's a delayed import _osx_support in sysconfig that triggers things

@JukkaL
Copy link
Collaborator Author

JukkaL commented Jul 18, 2022

Thanks, and sorry for the trouble.

No problem, the issue was super obscure and the original comment wasn't clear.

@JukkaL JukkaL merged commit 1a1091e into master Jul 18, 2022
@JukkaL JukkaL deleted the fix-pep561-macos branch July 18, 2022 16:23
JukkaL added a commit that referenced this pull request Jul 18, 2022
…#13176)

We run mypy/pyinfo.py as a script, and this means that mypy/types.py
could be picked up instead of the stdlib `types` module, which clearly
doesn't work. This seems to happen at least on macOS, and it broke
PEP 561 tests.

The workaround was accidentally removed as part of #13161.

This should fix #13174 and help with the wheel builds.
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.

PEP 561 test failures due to pyinfo break wheel builds on macOS
2 participants