-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Drop support for running with Python 3.7 #15566
Conversation
PY_MINOR_VERSION: Final = sys.version_info[1] | ||
|
||
# Check if we can use the stdlib ast module instead of typed_ast. | ||
import ast as ast3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we don't need this alias anymore, now that typed-ast is gone and we no longer support Python 2
import ast as ast3 | |
import ast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review, addressed the other comments! I'm not going to touch this one in this PR. The alias is used a lot in this file and would make this PR harder to review / the one character isn't really hurting anyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, makes sense!
Co-authored-by: Alex Waygood <[email protected]>
While at it, look for [out]
-old stuff
-[out version>=3.8]
new stuff |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Yikes, what on earth is going on here https://github.com/python/mypy/actions/runs/5435243387/jobs/9884211218?pr=15566 ? Is it python/cpython#79325 ? Can anyone with a Windows system reproduce? |
This comment has been minimized.
This comment has been minimized.
The mypy tests pass on my machine (Windows 11, Python 3.8.10 same version as CI, 16GB RAM, Intel Core i7-8850H) > tox run -e py38 --skip-pkg-install -- mypy/
py38: skip building and installing the package
py38: commands[0]> python -m pytest mypy/
======================================== test session starts ========================================
platform win32 -- Python 3.8.10, pytest-7.3.2, pluggy-1.2.0
cachedir: .tox\py38\.pytest_cache
rootdir: *******
configfile: pyproject.toml
plugins: cov-4.1.0, xdist-3.3.1
created: 6/6 workers
6 workers [10273 items]
...
===================== 10002 passed, 263 skipped, 8 xfailed in 723.44s (0:12:03) =====================
py38: OK (724.12=setup[0.03]+cmd[724.09] seconds)
congratulations :) (724.34 seconds) I couldn't run mypyc tests as I don't have a compiler installed but the tests failing in CI pass here. |
This comment has been minimized.
This comment has been minimized.
This reverts commit c3e4e25.
os: ubuntu-latest | ||
toxenv: py | ||
os: windows-latest | ||
toxenv: py38 | ||
tox_extra_args: "-n 2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if my previous suggestion might have been bad; maybe this might be the thing that's breaking things? Maybe there's a reason that the windows py37 job was the only job that didn't have -n 2
passed to it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't work :-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i saw :(
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Possible this is what #7964 and some of the other stubgen windows skips in that file was about |
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Follow up to #15430 — would've made #15566 (comment) unnecessary.
@hauntsaninja Were the tests with Here is one: mypy/test-data/unit/check-namedtuple.test Lines 133 to 135 in 27c4b46
I feel like these tests should probably not be removed, since they sometimes contain relevant tests that are otherwise not tested. I feel like at the moment these tests are not really run at all, which is kind of a shame. I might be wrong though. |
Running with Python 3.7 is different from type checking targeting Python 3.7. This PR was about the former. |
Some follow on from #15566. Also add 3.12 to tox.ini.
They dropped support for 3.7 in aug/2023, see: python/mypy#15566
Fixes #15056