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

Run self-check on Windows as part of CI #11909

Merged
merged 3 commits into from
Jan 28, 2022

Conversation

AlexWaygood
Copy link
Member

As discussed in #11895, mypy's test suite currently does not pass a mypy self-check when the self-check is run on Windows. This should hopefully be fixed by python/typeshed#6812. However, running a self-check on Windows as part of the CI tests should help avoid this issue in the future, and shouldn't slow down the CI too much, since it's a very fast test.

This new CI test should hopefully fail until #11905 is merged, confirming the diagnosis of the problem that I made in #11895. Once #11905 is merged, it should hopefully then pass, allowing this PR to be merged.

As discussed in python#11895, mypy's test suite currently does not pass a mypy self-check when run on Windows. This should hopefully be fixed by python/typeshed#6812, but running a self-check on Windows as part of the CI tests should help avoid this issue in the future.

This new CI test should hopefully fail until python#11905 is merged, confirming the diagnosis of the problem that I made in python#11895. Once python#11905 is merged, it should hopefully then pass, allowing this PR to be merged.
@AlexWaygood
Copy link
Member Author

The new test is failing, as expected -- I'll leave this as a draft PR until #11905 is merged.

@hauntsaninja hauntsaninja marked this pull request as ready for review January 28, 2022 08:38
@hauntsaninja hauntsaninja reopened this Jan 28, 2022
@hauntsaninja
Copy link
Collaborator

I synced typeshed, but it looks like we still have a number of failures. Probably fixable with some assert sys.platform == 'win32'

@AlexWaygood
Copy link
Member Author

Aaaand the Windows self-check is finally green 🥳🥳

Comment on lines +520 to +521
if sys.platform == "win32":
assert False, "curses is not available on Windows"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if sys.platform == "win32":
assert False, "curses is not available on Windows"
assert sys.platform != "win32", "curses is not available on Windows"

This should work, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried that first, doesn't seem to work unfortunately

Copy link
Member Author

Choose a reason for hiding this comment

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

Ironically the only reason why curses is causing the self-check to fail is because of my own PR to typeshed python/typeshed#6749

@JelleZijlstra JelleZijlstra merged commit 8f9ebf0 into python:master Jan 28, 2022
@AlexWaygood AlexWaygood deleted the windows-self-check branch January 28, 2022 20:37
@AlexWaygood
Copy link
Member Author

Thanks @JelleZijlstra!

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