Skip to content

Commit

Permalink
Drop support for running with Python 3.7
Browse files Browse the repository at this point in the history
Fixes #15056
  • Loading branch information
hauntsaninja committed Jul 1, 2023
1 parent 19c5d5f commit 87a85d1
Show file tree
Hide file tree
Showing 16 changed files with 151 additions and 310 deletions.
48 changes: 20 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,26 @@ jobs:
fail-fast: false
matrix:
include:
- name: Test suite with py37-windows-64
python: '3.7'
arch: x64
os: windows-latest
toxenv: py37
- name: Test suite with py38-ubuntu
# Make sure to run mypyc compiled unit tests for both
# the oldest and newest supported Python versions
- name: Test suite with py38-ubuntu, mypyc-compiled
python: '3.8'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2"
test_mypyc: true
- name: Test suite with py38-windows-64
python: '3.8'
arch: x64
os: windows-latest
toxenv: py38
- name: Test suite with py39-ubuntu
python: '3.9'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2"
- name: Test suite with py37-ubuntu, mypyc-compiled
python: '3.7'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2"
test_mypyc: true
- name: Test suite with py310-ubuntu, mypyc-compiled
python: '3.10'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2"
test_mypyc: true
- name: Test suite with py310-ubuntu
python: '3.10'
arch: x64
Expand All @@ -70,29 +59,32 @@ jobs:
toxenv: py
tox_extra_args: "-n 2"
test_mypyc: true
- name: mypyc runtime tests with py37-macos
python: '3.7'

- name: mypyc runtime tests with py38-macos
python: '3.8'
arch: x64
os: macos-latest
toxenv: py
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
- name: mypyc runtime tests with py37-debug-build-ubuntu
python: '3.7.13'
- name: mypyc runtime tests with py38-debug-build-ubuntu
python: '3.8'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
debug_build: true
- name: Type check our own code (py37-ubuntu)
python: '3.7'

- name: Type check our own code (py38-ubuntu)
python: '3.8'
arch: x64
os: ubuntu-latest
toxenv: type
- name: Type check our own code (py37-windows-64)
python: '3.7'
- name: Type check our own code (py38-windows-64)
python: '3.8'
arch: x64
os: windows-latest
toxenv: type

# We also run these checks with pre-commit in CI,
# but it's useful to run them with tox too,
# to ensure the tox env works as expected
Expand Down
2 changes: 1 addition & 1 deletion mypy/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Earliest fully supported Python 3.x version. Used as the default Python
# version in tests. Mypy wheels should be built starting with this version,
# and CI tests should be run on this version (and later versions).
PYTHON3_VERSION: Final = (3, 7)
PYTHON3_VERSION: Final = (3, 8)

# Earliest Python 3.x version supported via --python-version 3.x. To run
# mypy, at least version PYTHON3_VERSION is needed.
Expand Down
2 changes: 0 additions & 2 deletions mypy/dmypy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,8 +896,6 @@ def cmd_inspect(
force_reload: bool = False,
) -> dict[str, object]:
"""Locate and inspect expression(s)."""
if sys.version_info < (3, 8):
return {"error": 'Python 3.8 required for "inspect" command'}
if not self.fine_grained_manager:
return {
"error": 'Command "inspect" is only valid after a "check" command'
Expand Down
Loading

0 comments on commit 87a85d1

Please sign in to comment.