Skip to content

Commit 90bbd62

Browse files
committed
Drop support for running with Python 3.8
1 parent 6069718 commit 90bbd62

18 files changed

+40
-44
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- uses: actions/checkout@v4
3737
- uses: actions/setup-python@v5
3838
with:
39-
python-version: '3.8'
39+
python-version: '3.9'
4040
- name: Install tox
4141
run: pip install --upgrade 'setuptools!=50' tox==4.11.0
4242
- name: Setup tox environment

.github/workflows/test.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,18 @@ jobs:
3131
include:
3232
# Make sure to run mypyc compiled unit tests for both
3333
# the oldest and newest supported Python versions
34-
- name: Test suite with py38-ubuntu, mypyc-compiled
35-
python: '3.8'
34+
- name: Test suite with py39-ubuntu, mypyc-compiled
35+
python: '3.9'
3636
arch: x64
3737
os: ubuntu-latest
3838
toxenv: py
3939
tox_extra_args: "-n 4"
4040
test_mypyc: true
41-
- name: Test suite with py38-windows-64
42-
python: '3.8'
43-
arch: x64
44-
os: windows-latest
45-
toxenv: py38
46-
tox_extra_args: "-n 4"
47-
- name: Test suite with py39-ubuntu
41+
- name: Test suite with py39-windows-64
4842
python: '3.9'
4943
arch: x64
50-
os: ubuntu-latest
51-
toxenv: py
44+
os: windows-latest
45+
toxenv: py39
5246
tox_extra_args: "-n 4"
5347
- name: Test suite with py310-ubuntu
5448
python: '3.10'
@@ -72,27 +66,27 @@ jobs:
7266
test_mypyc: true
7367

7468
- name: mypyc runtime tests with py39-macos
75-
python: '3.9.18'
69+
python: '3.9.19'
7670
arch: x64
7771
# TODO: macos-13 is the last one to support Python 3.9, change it to macos-latest when updating the Python version
7872
os: macos-13
7973
toxenv: py
8074
tox_extra_args: "-n 3 mypyc/test/test_run.py mypyc/test/test_external.py"
81-
- name: mypyc runtime tests with py38-debug-build-ubuntu
82-
python: '3.8.17'
75+
- name: mypyc runtime tests with py39-debug-build-ubuntu
76+
python: '3.9.19'
8377
arch: x64
8478
os: ubuntu-latest
8579
toxenv: py
8680
tox_extra_args: "-n 4 mypyc/test/test_run.py mypyc/test/test_external.py"
8781
debug_build: true
8882

89-
- name: Type check our own code (py38-ubuntu)
90-
python: '3.8'
83+
- name: Type check our own code (py39-ubuntu)
84+
python: '3.9'
9185
arch: x64
9286
os: ubuntu-latest
9387
toxenv: type
94-
- name: Type check our own code (py38-windows-64)
95-
python: '3.8'
88+
- name: Type check our own code (py39-windows-64)
89+
python: '3.9'
9690
arch: x64
9791
os: windows-latest
9892
toxenv: type

.github/workflows/test_stubgenc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929

3030
- uses: actions/checkout@v4
3131

32-
- name: Setup 🐍 3.8
32+
- name: Setup 🐍 3.9
3333
uses: actions/setup-python@v5
3434
with:
35-
python-version: 3.8
35+
python-version: 3.9
3636

3737
- name: Test stubgenc
3838
run: misc/test-stubgenc.sh

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ hash -r # This resets shell PATH cache, not necessary on Windows
5151
```
5252

5353
> **Note**
54-
> You'll need Python 3.8 or higher to install all requirements listed in
54+
> You'll need Python 3.9 or higher to install all requirements listed in
5555
> test-requirements.txt
5656
5757
### Running tests

mypy/defaults.py

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

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

mypy/test/meta/test_parse_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ def test_bad_ge_version_check(self) -> None:
5050
"""
5151
[case abc]
5252
s: str
53-
[out version>=3.8]
53+
[out version>=3.9]
5454
abc
5555
"""
5656
)
5757

5858
# Assert
59-
assert "version>=3.8 always true since minimum runtime version is (3, 8)" in actual.stdout
59+
assert "version>=3.9 always true since minimum runtime version is (3, 9)" in actual.stdout
6060

6161
def test_bad_eq_version_check(self) -> None:
6262
# Act
@@ -70,4 +70,4 @@ def test_bad_eq_version_check(self) -> None:
7070
)
7171

7272
# Assert
73-
assert "version==3.7 always false since minimum runtime version is (3, 8)" in actual.stdout
73+
assert "version==3.7 always false since minimum runtime version is (3, 9)" in actual.stdout

mypy/util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,10 @@ def get_unique_redefinition_name(name: str, existing: Container[str]) -> str:
451451
def check_python_version(program: str) -> None:
452452
"""Report issues with the Python used to run mypy, dmypy, or stubgen"""
453453
# Check for known bad Python versions.
454-
if sys.version_info[:2] < (3, 8): # noqa: UP036
454+
if sys.version_info[:2] < (3, 9):
455455
sys.exit(
456-
"Running {name} with Python 3.7 or lower is not supported; "
457-
"please upgrade to 3.8 or newer".format(name=program)
456+
"Running {name} with Python 3.8 or lower is not supported; "
457+
"please upgrade to 3.9 or newer".format(name=program)
458458
)
459459

460460

mypy_self_check.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ show_traceback = True
66
pretty = True
77
always_false = MYPYC
88
plugins = mypy.plugins.proper_plugin
9-
python_version = 3.8
9+
python_version = 3.9
1010
exclude = mypy/typeshed/|mypyc/test-data/|mypyc/lib-rt/
1111
enable_error_code = ignore-without-code,redundant-expr
1212
enable_incomplete_feature = PreciseTupleTypes

mypyc/doc/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Installation
3838
------------
3939

4040
Mypyc is shipped as part of the mypy distribution. Install mypy like
41-
this (you need Python 3.8 or later):
41+
this (you need Python 3.9 or later):
4242

4343
.. code-block::
4444

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import sys
99
from typing import TYPE_CHECKING, Any
1010

11-
if sys.version_info < (3, 8, 0): # noqa: UP036
12-
sys.stderr.write("ERROR: You need Python 3.8 or later to use mypy.\n")
11+
if sys.version_info < (3, 9, 0):
12+
sys.stderr.write("ERROR: You need Python 3.9 or later to use mypy.\n")
1313
exit(1)
1414

1515
# we'll import stuff from the source tree, let's ensure is on the sys path
@@ -185,7 +185,6 @@ def run(self):
185185
"Intended Audience :: Developers",
186186
"License :: OSI Approved :: MIT License",
187187
"Programming Language :: Python :: 3",
188-
"Programming Language :: Python :: 3.8",
189188
"Programming Language :: Python :: 3.9",
190189
"Programming Language :: Python :: 3.10",
191190
"Programming Language :: Python :: 3.11",
@@ -232,7 +231,7 @@ def run(self):
232231
"reports": "lxml",
233232
"install-types": "pip",
234233
},
235-
python_requires=">=3.8",
234+
python_requires=">=3.9",
236235
include_package_data=True,
237236
project_urls={
238237
"Documentation": "https://mypy.readthedocs.io/en/stable/index.html",

0 commit comments

Comments
 (0)