Don't error unnecessarily about new syntax in dependencies where we ignore errors anyways - #21883
Open
A5rocks wants to merge 2 commits into
Open
Don't error unnecessarily about new syntax in dependencies where we ignore errors anyways#21883A5rocks wants to merge 2 commits into
A5rocks wants to merge 2 commits into
Conversation
A5rocks
force-pushed
the
ignore-new-features
branch
from
August 22, 2026 04:52
dd534bf to
0a7f41f
Compare
Collaborator
Author
|
I would be happy to explain more about the root cause, especially since I never actually made an issue particular to it, but essentially Trio has a lockfile (https://github.com/python-trio/trio/blob/main/test-requirements.txt) that conditionally has newer Sphinx versions that use new typing features. In particular, when I develop locally with my 3.14 Python, after a and this has bothered me forever :-) |
This comment has been minimized.
This comment has been minimized.
A5rocks
force-pushed
the
ignore-new-features
branch
from
August 22, 2026 05:24
0a7f41f to
8187c82
Compare
for more information, see https://pre-commit.ci
Contributor
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
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 fixes #21178 (at least my own root cause for it). This is actually a bit trickier than I thought (you can read that issue to see what I thought would work, which was naive!). However, even though we use the
astmodule and cannot make the errors nonblocking, we can work around the root cause of that issue i.e. that new features in dependencies can cause mypy to fail.