Repository navigation
Bump mypy to 2.4 - #5365
Merged
Merged
Bump mypy to 2.4#5365
Conversation
- Update mypy pin in pyproject.toml - Add targeted type: ignore[misc] for Distribution.global_options (mypy cannot resolve the ClassVar since _distutils is excluded)
2 tasks done
Some new typing features are only available on latest versions of mypy, which don't seem to be installable on Cygwin.
abravalheri
force-pushed
the
mypy-cygwin
branch
from
October 27, 2026 11:05
d5bdbcd to
b66bb6f
Compare
Contributor
Author
|
According to python/mypy#21460 (comment), the advice is to skip it for now. |
abravalheri
commented
Oct 27, 2026
This reverts commit b66bb6f.
Contributor
Similar as PyPy, there's no need to run on cygwin in the first place. Just disable permanently: jaraco/skeleton#187 |
Contributor
Author
|
Thank you very much Avasam. I remember seeing in some PR that Jason wanted to wait for Python 3.15 to be fixed before more features in setuptools, but I think I will go ahead and merge this one...then go back to the bug fix in #5343. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a spin-off of #5343, isolating the mypy version bump so the original PR isn't polluted with extra side quests.
Context: newer typing features used in #5343, such as PEP 661 sentinels in unions like
str | _RESET, are only recognised by recent mypy. mypy 2.4.0 is the first release that accepts them; older pins report them as invalid type expressions.The problem however is that the CI is failing to install them on Cygwin.
According to the discussion in the thread python/mypy#21460 (comment) there is a chance it could work, so the idea behind this PR is further investigation.
(Since Cygwin is a platform that is not broadly available, I will have to rely on the CI to run the tests step by step on each change, so expect some follow up commits...)