Skip to content

Commit 155909a

Browse files
cdce8pjhance
andauthoredFeb 10, 2024
[Release 1.9] Unsupport targetting 3.7. (#16883) (#16900)
This syncs up this constant to the actual minimum version that typeshed is now targetting. Co-authored-by: Marc Mueller <[email protected]> (cherry picked from commit d8e3d59) Co-authored-by: jhance <[email protected]>
1 parent 6615cab commit 155909a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
 

‎mypy/defaults.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# Earliest Python 3.x version supported via --python-version 3.x. To run
1212
# mypy, at least version PYTHON3_VERSION is needed.
13-
PYTHON3_VERSION_MIN: Final = (3, 7) # Keep in sync with typeshed's python support
13+
PYTHON3_VERSION_MIN: Final = (3, 8) # Keep in sync with typeshed's python support
1414

1515
CACHE_DIR: Final = ".mypy_cache"
1616
CONFIG_FILE: Final = ["mypy.ini", ".mypy.ini"]

‎test-data/unit/cmdline.test

+6-6
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ main.py:1: error: Cannot find implementation or library stub for module named "a
592592
\[tool.mypy]
593593
python_version = 3.10
594594
[out]
595-
pyproject.toml: [mypy]: python_version: Python 3.1 is not supported (must be 3.7 or higher). You may need to put quotes around your Python version
595+
pyproject.toml: [mypy]: python_version: Python 3.1 is not supported (must be 3.8 or higher). You may need to put quotes around your Python version
596596
== Return code: 0
597597

598598
[case testPythonVersionTooOld10]
@@ -604,13 +604,13 @@ python_version = 1.0
604604
mypy.ini: [mypy]: python_version: Python major version '1' out of range (must be 3)
605605
== Return code: 0
606606

607-
[case testPythonVersionTooOld36]
607+
[case testPythonVersionTooOld37]
608608
# cmd: mypy -c pass
609609
[file mypy.ini]
610610
\[mypy]
611-
python_version = 3.6
611+
python_version = 3.7
612612
[out]
613-
mypy.ini: [mypy]: python_version: Python 3.6 is not supported (must be 3.7 or higher)
613+
mypy.ini: [mypy]: python_version: Python 3.7 is not supported (must be 3.8 or higher)
614614
== Return code: 0
615615

616616
[case testPythonVersionTooNew40]
@@ -633,11 +633,11 @@ usage: mypy [-h] [-v] [-V] [more options; see below]
633633
mypy: error: Mypy no longer supports checking Python 2 code. Consider pinning to mypy<0.980 if you need to check Python 2 code.
634634
== Return code: 2
635635

636-
[case testPythonVersionAccepted37]
636+
[case testPythonVersionAccepted38]
637637
# cmd: mypy -c pass
638638
[file mypy.ini]
639639
\[mypy]
640-
python_version = 3.7
640+
python_version = 3.8
641641
[out]
642642

643643
[case testPythonVersionAccepted311]

0 commit comments

Comments
 (0)
Please sign in to comment.