Skip to content

Commit 98f24f4

Browse files
committed
Revert "Use Python 3.7 as default in tests, drop 3.6 in CI (#13101)"
This reverts commit d22899f.
1 parent d22899f commit 98f24f4

File tree

6 files changed

+23
-31
lines changed

6 files changed

+23
-31
lines changed

.github/workflows/test.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,27 @@ jobs:
3131
arch: x64
3232
os: windows-latest
3333
toxenv: py37
34-
- name: Test suite with py38-ubuntu
35-
python: '3.8'
34+
- name: Test suite with py37-ubuntu
35+
python: '3.7'
3636
arch: x64
3737
os: ubuntu-latest
3838
toxenv: py
3939
tox_extra_args: "-n 2"
40-
- name: Test suite with py39-ubuntu
41-
python: '3.9'
40+
- name: Test suite with py38-ubuntu
41+
python: '3.8'
4242
arch: x64
4343
os: ubuntu-latest
4444
toxenv: py
4545
tox_extra_args: "-n 2"
46-
- name: Test suite with py37-ubuntu, mypyc-compiled
47-
python: '3.7'
46+
- name: Test suite with py36-ubuntu, mypyc-compiled
47+
python: '3.6'
4848
arch: x64
4949
os: ubuntu-latest
5050
toxenv: py
5151
tox_extra_args: "-n 2"
5252
test_mypyc: true
53-
- name: Test suite with py310-ubuntu, mypyc-compiled
54-
python: '3.10'
53+
- name: Test suite with py39-ubuntu, mypyc-compiled
54+
python: '3.9'
5555
arch: x64
5656
os: ubuntu-latest
5757
toxenv: py
@@ -63,17 +63,17 @@ jobs:
6363
os: ubuntu-latest
6464
toxenv: py
6565
tox_extra_args: "-n 2"
66-
- name: mypyc runtime tests with py37-macos
67-
python: '3.7'
66+
- name: mypyc runtime tests with py36-macos
67+
python: '3.6'
6868
arch: x64
6969
os: macos-latest
7070
toxenv: py
7171
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
72-
- name: mypyc runtime tests with py37-debug-build-ubuntu
73-
python: '3.7.13'
72+
- name: mypyc runtime tests with py36-debug-build-ubuntu
73+
python: '3.6.8'
7474
arch: x64
7575
os: ubuntu-latest
76-
toxenv: py
76+
toxenv: py36
7777
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
7878
debug_build: true
7979
- name: Type check our own code (py37-ubuntu)

mypy/defaults.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,8 @@
33
from typing_extensions import Final
44

55
PYTHON2_VERSION: Final = (2, 7)
6-
7-
# Earliest fully supported Python 3.x version. Used as the default Python
8-
# version in tests. Mypy wheels should be built starting with this version,
9-
# and CI tests should be run on this version (and later versions).
10-
PYTHON3_VERSION: Final = (3, 7)
11-
12-
# Earliest Python 3.x version supported via --python-version 3.x. To run
13-
# mypy, at least version PYTHON3_VERSION is needed.
6+
PYTHON3_VERSION: Final = (3, 6)
147
PYTHON3_VERSION_MIN: Final = (3, 4)
15-
168
CACHE_DIR: Final = ".mypy_cache"
179
CONFIG_FILE: Final = ["mypy.ini", ".mypy.ini"]
1810
PYPROJECT_CONFIG_FILES: Final = [

test-data/unit/check-incremental.test

+2-2
Original file line numberDiff line numberDiff line change
@@ -3744,7 +3744,7 @@ import b
37443744
[file b.py]
37453745
-- This is a heinous hack, but we simulate having a invalid cache by clobbering
37463746
-- the proto deps file with something with mtime mismatches.
3747-
[file ../.mypy_cache/3.7/@deps.meta.json.2]
3747+
[file ../.mypy_cache/3.6/@deps.meta.json.2]
37483748
{"snapshot": {"__main__": "a7c958b001a45bd6a2a320f4e53c4c16", "a": "d41d8cd98f00b204e9800998ecf8427e", "b": "d41d8cd98f00b204e9800998ecf8427e", "builtins": "c532c89da517a4b779bcf7a964478d67"}, "deps_meta": {"@root": {"path": "@root.deps.json", "mtime": 0}, "__main__": {"path": "__main__.deps.json", "mtime": 0}, "a": {"path": "a.deps.json", "mtime": 0}, "b": {"path": "b.deps.json", "mtime": 0}, "builtins": {"path": "builtins.deps.json", "mtime": 0}}}
37493749
[file ../.mypy_cache/.gitignore]
37503750
# Another hack to not trigger a .gitignore creation failure "false positive"
@@ -3779,7 +3779,7 @@ import b
37793779
[file b.py]
37803780
-- This is a heinous hack, but we simulate having a invalid cache by deleting
37813781
-- the proto deps file.
3782-
[delete ../.mypy_cache/3.7/@deps.meta.json.2]
3782+
[delete ../.mypy_cache/3.6/@deps.meta.json.2]
37833783
[file b.py.2]
37843784
# uh
37853785
-- Every file should get reloaded, since the cache was invalidated

test-data/unit/fine-grained-cache-incremental.test

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ a.py:8: note: x: expected "int", got "str"
202202
[file b.py]
203203
-- This is a heinous hack, but we simulate having a invalid cache by clobbering
204204
-- the proto deps file with something with mtime mismatches.
205-
[file ../.mypy_cache/3.7/@deps.meta.json.2]
205+
[file ../.mypy_cache/3.6/@deps.meta.json.2]
206206
{"snapshot": {"__main__": "a7c958b001a45bd6a2a320f4e53c4c16", "a": "d41d8cd98f00b204e9800998ecf8427e", "b": "d41d8cd98f00b204e9800998ecf8427e", "builtins": "c532c89da517a4b779bcf7a964478d67"}, "deps_meta": {"@root": {"path": "@root.deps.json", "mtime": 0}, "__main__": {"path": "__main__.deps.json", "mtime": 0}, "a": {"path": "a.deps.json", "mtime": 0}, "b": {"path": "b.deps.json", "mtime": 0}, "builtins": {"path": "builtins.deps.json", "mtime": 0}}}
207207

208208
[file b.py.2]
@@ -234,8 +234,8 @@ x = 10
234234
[file p/c.py]
235235
class C: pass
236236

237-
[delete ../.mypy_cache/3.7/b.meta.json.2]
238-
[delete ../.mypy_cache/3.7/p/c.meta.json.2]
237+
[delete ../.mypy_cache/3.6/b.meta.json.2]
238+
[delete ../.mypy_cache/3.6/p/c.meta.json.2]
239239

240240
[out]
241241
==

test-data/unit/fine-grained-modules.test

+2-2
Original file line numberDiff line numberDiff line change
@@ -2198,11 +2198,11 @@ import waitress
21982198
[file a.py.3]
21992199
import requests
22002200
[out]
2201-
a.py:1: error: Library stubs not installed for "waitress" (or incompatible with Python 3.7)
2201+
a.py:1: error: Library stubs not installed for "waitress" (or incompatible with Python 3.6)
22022202
a.py:1: note: Hint: "python3 -m pip install types-waitress"
22032203
a.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
22042204
==
22052205
==
2206-
a.py:1: error: Library stubs not installed for "requests" (or incompatible with Python 3.7)
2206+
a.py:1: error: Library stubs not installed for "requests" (or incompatible with Python 3.6)
22072207
a.py:1: note: Hint: "python3 -m pip install types-requests"
22082208
a.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

test-data/unit/pythoneval.test

+2-2
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ from scribe import x
15531553
import maxminddb # Python 3 stubs available for maxminddb
15541554
import foobar_asdf
15551555
[out]
1556-
_testIgnoreImportIfNoPython3StubAvailable.py:4: error: Library stubs not installed for "maxminddb" (or incompatible with Python 3.7)
1556+
_testIgnoreImportIfNoPython3StubAvailable.py:4: error: Library stubs not installed for "maxminddb" (or incompatible with Python 3.6)
15571557
_testIgnoreImportIfNoPython3StubAvailable.py:4: note: Hint: "python3 -m pip install types-maxminddb"
15581558
_testIgnoreImportIfNoPython3StubAvailable.py:4: note: (or run "mypy --install-types" to install all missing stub packages)
15591559
_testIgnoreImportIfNoPython3StubAvailable.py:4: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
@@ -1565,7 +1565,7 @@ import maxminddb
15651565
[out]
15661566
_testNoPython3StubAvailable.py:1: error: Cannot find implementation or library stub for module named "scribe"
15671567
_testNoPython3StubAvailable.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
1568-
_testNoPython3StubAvailable.py:3: error: Library stubs not installed for "maxminddb" (or incompatible with Python 3.7)
1568+
_testNoPython3StubAvailable.py:3: error: Library stubs not installed for "maxminddb" (or incompatible with Python 3.6)
15691569
_testNoPython3StubAvailable.py:3: note: Hint: "python3 -m pip install types-maxminddb"
15701570
_testNoPython3StubAvailable.py:3: note: (or run "mypy --install-types" to install all missing stub packages)
15711571

0 commit comments

Comments
 (0)