Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for running with Python 3.7 #15566

Merged
merged 24 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 21 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,27 @@ 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"
- 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'
test_mypyc: true
- name: Test suite with py38-windows-64
python: '3.8'
arch: x64
os: ubuntu-latest
toxenv: py
os: windows-latest
toxenv: py38
hauntsaninja marked this conversation as resolved.
Show resolved Hide resolved
tox_extra_args: "-n 2"
Copy link
Member

@AlexWaygood AlexWaygood Jul 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if my previous suggestion might have been bad; maybe this might be the thing that's breaking things? Maybe there's a reason that the windows py37 job was the only job that didn't have -n 2 passed to it...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't work :-/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i saw :(

test_mypyc: true
- name: Test suite with py310-ubuntu, mypyc-compiled
python: '3.10'
- name: Test suite with py39-ubuntu
python: '3.9'
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 +60,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.17'
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.17'
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 misc/build-debug-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fi
curl -O https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz
tar zxf Python-$VERSION.tgz
cd Python-$VERSION
CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" ./configure CFLAGS="-DPy_DEBUG -DPy_TRACE_REFS -DPYMALLOC_DEBUG" --with-pydebug --prefix=$PREFIX
CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" ./configure CFLAGS="-DPy_DEBUG -DPy_TRACE_REFS -DPYMALLOC_DEBUG" --with-pydebug --prefix=$PREFIX --with-trace-refs
make -j4
make install
$PREFIX/bin/python3 -m pip install virtualenv
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