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 3 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
1 change: 0 additions & 1 deletion build-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
-r mypy-requirements.txt
types-psutil
types-setuptools
types-typed-ast>=1.5.8.5,<1.6.0
7 changes: 3 additions & 4 deletions docs/source/additional_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ of the previous sections.
Dataclasses
***********

In Python 3.7, a new :py:mod:`dataclasses` module has been added to the standard library.
This module allows defining and customizing simple boilerplate-free classes.
They can be defined using the :py:func:`@dataclasses.dataclass
<python:dataclasses.dataclass>` decorator:
The :py:mod:`dataclasses` module allows defining and customizing simple
boilerplate-free classes. They can be defined using the
:py:func:`@dataclasses.dataclass <python:dataclasses.dataclass>` decorator:

.. code-block:: python

Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ may not make much sense otherwise.
Installing and running mypy
***************************

Mypy requires Python 3.7 or later to run. You can install mypy using pip:
Mypy requires Python 3.8 or later to run. You can install mypy using pip:

.. code-block:: shell

Expand Down
2 changes: 0 additions & 2 deletions mypy-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# NOTE: this needs to be kept in sync with the "requires" list in pyproject.toml
typing_extensions>=4.1.0; python_version >= '3.8'
hauntsaninja marked this conversation as resolved.
Show resolved Hide resolved
typing_extensions>=4.7.0; python_version < '3.8'
mypy_extensions>=1.0.0
typed_ast>=1.4.0,<2; python_version<'3.8'
tomli>=1.1.0; python_version<'3.11'
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ requires = [
"wheel >= 0.30.0",
# the following is from mypy-requirements.txt
"typing_extensions>=4.1.0; python_version >= '3.8'",
hauntsaninja marked this conversation as resolved.
Show resolved Hide resolved
"typing_extensions>=4.7.0; python_version < '3.8'",
"mypy_extensions>=1.0.0",
"typed_ast>=1.4.0,<2; python_version<'3.8'",
"tomli>=1.1.0; python_version<'3.11'",
# the following is from build-requirements.txt
"types-psutil",
"types-setuptools",
"types-typed-ast>=1.5.8.5,<1.6.0",
]
build-backend = "setuptools.build_meta"

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def run(self):
# Same here.
extras_require={
"dmypy": "psutil >= 4.0",
"python2": "typed_ast >= 1.4.0, < 2",
"python2": "",
"reports": "lxml",
"install-types": "pip",
},
Expand Down
8 changes: 4 additions & 4 deletions test-data/unit/daemon.test
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def bar() -> None:
x = foo('abc') # type: str
foo(arg='xyz')

[case testDaemonGetType_python38]
[case testDaemonGetType]
$ dmypy start --log-file log.txt -- --follow-imports=error --no-error-summary --python-version 3.8
Daemon started
$ dmypy inspect foo:1:2:3:4
Expand Down Expand Up @@ -423,7 +423,7 @@ def unreachable(x: int) -> None:
return
x # line 17

[case testDaemonGetTypeInexact_python38]
[case testDaemonGetTypeInexact]
$ dmypy start --log-file log.txt -- --follow-imports=error --no-error-summary
Daemon started
$ dmypy check foo.py --export-types
Expand Down Expand Up @@ -478,7 +478,7 @@ def unreachable(x: int, y: int) -> None:
return
x and y # line 11

[case testDaemonGetAttrs_python38]
[case testDaemonGetAttrs]
$ dmypy start --log-file log.txt -- --follow-imports=error --no-error-summary
Daemon started
$ dmypy check foo.py bar.py --export-types
Expand Down Expand Up @@ -520,7 +520,7 @@ class B:
var: Union[A, B]
var # line 10

[case testDaemonGetDefinition_python38]
[case testDaemonGetDefinition]
$ dmypy start --log-file log.txt -- --follow-imports=error --no-error-summary
Daemon started
$ dmypy check foo.py bar/baz.py bar/__init__.py --export-types
Expand Down