Skip to content

Commit d58bf6d

Browse files
committed
Drop support for running with Python 3.7
Fixes #15056
1 parent 19c5d5f commit d58bf6d

16 files changed

+142
-311
lines changed

.github/workflows/test.yml

+20-28
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,26 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
include:
29-
- name: Test suite with py37-windows-64
30-
python: '3.7'
31-
arch: x64
32-
os: windows-latest
33-
toxenv: py37
34-
- name: Test suite with py38-ubuntu
29+
# Make sure to run mypyc compiled unit tests for both
30+
# the oldest and newest supported Python versions
31+
- name: Test suite with py38-ubuntu, mypyc-compiled
3532
python: '3.8'
3633
arch: x64
3734
os: ubuntu-latest
3835
toxenv: py
3936
tox_extra_args: "-n 2"
37+
test_mypyc: true
38+
- name: Test suite with py38-windows-64
39+
python: '3.8'
40+
arch: x64
41+
os: windows-latest
42+
toxenv: py38
4043
- name: Test suite with py39-ubuntu
4144
python: '3.9'
4245
arch: x64
4346
os: ubuntu-latest
4447
toxenv: py
4548
tox_extra_args: "-n 2"
46-
- name: Test suite with py37-ubuntu, mypyc-compiled
47-
python: '3.7'
48-
arch: x64
49-
os: ubuntu-latest
50-
toxenv: py
51-
tox_extra_args: "-n 2"
52-
test_mypyc: true
53-
- name: Test suite with py310-ubuntu, mypyc-compiled
54-
python: '3.10'
55-
arch: x64
56-
os: ubuntu-latest
57-
toxenv: py
58-
tox_extra_args: "-n 2"
59-
test_mypyc: true
6049
- name: Test suite with py310-ubuntu
6150
python: '3.10'
6251
arch: x64
@@ -70,29 +59,32 @@ jobs:
7059
toxenv: py
7160
tox_extra_args: "-n 2"
7261
test_mypyc: true
73-
- name: mypyc runtime tests with py37-macos
74-
python: '3.7'
62+
63+
- name: mypyc runtime tests with py38-macos
64+
python: '3.8.17'
7565
arch: x64
7666
os: macos-latest
7767
toxenv: py
7868
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
79-
- name: mypyc runtime tests with py37-debug-build-ubuntu
80-
python: '3.7.13'
69+
- name: mypyc runtime tests with py38-debug-build-ubuntu
70+
python: '3.8'
8171
arch: x64
8272
os: ubuntu-latest
8373
toxenv: py
8474
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
8575
debug_build: true
86-
- name: Type check our own code (py37-ubuntu)
87-
python: '3.7'
76+
77+
- name: Type check our own code (py38-ubuntu)
78+
python: '3.8'
8879
arch: x64
8980
os: ubuntu-latest
9081
toxenv: type
91-
- name: Type check our own code (py37-windows-64)
92-
python: '3.7'
82+
- name: Type check our own code (py38-windows-64)
83+
python: '3.8'
9384
arch: x64
9485
os: windows-latest
9586
toxenv: type
87+
9688
# We also run these checks with pre-commit in CI,
9789
# but it's useful to run them with tox too,
9890
# to ensure the tox env works as expected

mypy/defaults.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Earliest fully supported Python 3.x version. Used as the default Python
99
# version in tests. Mypy wheels should be built starting with this version,
1010
# and CI tests should be run on this version (and later versions).
11-
PYTHON3_VERSION: Final = (3, 7)
11+
PYTHON3_VERSION: Final = (3, 8)
1212

1313
# Earliest Python 3.x version supported via --python-version 3.x. To run
1414
# mypy, at least version PYTHON3_VERSION is needed.

mypy/dmypy_server.py

-2
Original file line numberDiff line numberDiff line change
@@ -896,8 +896,6 @@ def cmd_inspect(
896896
force_reload: bool = False,
897897
) -> dict[str, object]:
898898
"""Locate and inspect expression(s)."""
899-
if sys.version_info < (3, 8):
900-
return {"error": 'Python 3.8 required for "inspect" command'}
901899
if not self.fine_grained_manager:
902900
return {
903901
"error": 'Command "inspect" is only valid after a "check" command'

0 commit comments

Comments
 (0)