Skip to content

Commit 3898741

Browse files
authored
Merge pull request #11944 from hugovk/rm-3.7
Drop support for EOL Python 3.7
2 parents 76554a4 + cac5359 commit 3898741

37 files changed

+63
-204
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ jobs:
104104
matrix:
105105
os: [Ubuntu, MacOS]
106106
python:
107-
- "3.7"
108107
- "3.8"
109108
- "3.9"
110109
- "3.10"
@@ -155,9 +154,8 @@ jobs:
155154
matrix:
156155
os: [Windows]
157156
python:
158-
- "3.7"
157+
- "3.8"
159158
# Commented out, since Windows tests are expensively slow.
160-
# - "3.8"
161159
# - "3.9"
162160
# - "3.10"
163161
- "3.11"

docs/html/development/ci.rst

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Supported interpreters
1818

1919
pip support a variety of Python interpreters:
2020

21-
- CPython 3.7
2221
- CPython 3.8
2322
- CPython 3.9
2423
- CPython 3.10
@@ -90,9 +89,7 @@ Actual testing
9089
+------------------------------+---------------+-----------------+
9190
| **interpreter** | **unit** | **integration** |
9291
+-----------+----------+-------+---------------+-----------------+
93-
| | x86 | CP3.7 | | |
94-
| | +-------+---------------+-----------------+
95-
| | | CP3.8 | | |
92+
| | x86 | CP3.8 | | |
9693
| | +-------+---------------+-----------------+
9794
| | | CP3.9 | | |
9895
| | +-------+---------------+-----------------+
@@ -104,9 +101,7 @@ Actual testing
104101
| | +-------+---------------+-----------------+
105102
| | | PyPy3 | | |
106103
| Windows +----------+-------+---------------+-----------------+
107-
| | x64 | CP3.7 | GitHub | GitHub |
108-
| | +-------+---------------+-----------------+
109-
| | | CP3.8 | | |
104+
| | x64 | CP3.8 | GitHub | GitHub |
110105
| | +-------+---------------+-----------------+
111106
| | | CP3.9 | | |
112107
| | +-------+---------------+-----------------+
@@ -118,9 +113,7 @@ Actual testing
118113
| | +-------+---------------+-----------------+
119114
| | | PyPy3 | | |
120115
+-----------+----------+-------+---------------+-----------------+
121-
| | x86 | CP3.7 | | |
122-
| | +-------+---------------+-----------------+
123-
| | | CP3.8 | | |
116+
| | x86 | CP3.8 | | |
124117
| | +-------+---------------+-----------------+
125118
| | | CP3.9 | | |
126119
| | +-------+---------------+-----------------+
@@ -132,9 +125,7 @@ Actual testing
132125
| | +-------+---------------+-----------------+
133126
| | | PyPy3 | | |
134127
| Linux +----------+-------+---------------+-----------------+
135-
| | x64 | CP3.7 | GitHub | GitHub |
136-
| | +-------+---------------+-----------------+
137-
| | | CP3.8 | GitHub | GitHub |
128+
| | x64 | CP3.8 | GitHub | GitHub |
138129
| | +-------+---------------+-----------------+
139130
| | | CP3.9 | GitHub | GitHub |
140131
| | +-------+---------------+-----------------+
@@ -146,9 +137,7 @@ Actual testing
146137
| | +-------+---------------+-----------------+
147138
| | | PyPy3 | | |
148139
+-----------+----------+-------+---------------+-----------------+
149-
| | arm64 | CP3.7 | | |
150-
| | +-------+---------------+-----------------+
151-
| | | CP3.8 | | |
140+
| | arm64 | CP3.8 | | |
152141
| | +-------+---------------+-----------------+
153142
| | | CP3.9 | | |
154143
| | +-------+---------------+-----------------+
@@ -160,9 +149,7 @@ Actual testing
160149
| | +-------+---------------+-----------------+
161150
| | | PyPy3 | | |
162151
| macOS +----------+-------+---------------+-----------------+
163-
| | x64 | CP3.7 | GitHub | GitHub |
164-
| | +-------+---------------+-----------------+
165-
| | | CP3.8 | GitHub | GitHub |
152+
| | x64 | CP3.8 | GitHub | GitHub |
166153
| | +-------+---------------+-----------------+
167154
| | | CP3.9 | GitHub | GitHub |
168155
| | +-------+---------------+-----------------+

docs/html/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ $ pip install --upgrade pip
102102

103103
The current version of pip works on:
104104

105-
- Windows, Linux and MacOS.
106-
- CPython 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, and latest PyPy3.
105+
- Windows, Linux and macOS.
106+
- CPython 3.8, 3.9, 3.10, 3.11, 3.12, and latest PyPy3.
107107

108108
pip is tested to work on the latest patch version of the Python interpreter,
109109
for each of the minor versions listed above. Previous patch versions are

news/11934.removal.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Drop support for EOL Python 3.7.

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def should_update_common_wheels() -> bool:
6767
# -----------------------------------------------------------------------------
6868
# Development Commands
6969
# -----------------------------------------------------------------------------
70-
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3"])
70+
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3"])
7171
def test(session: nox.Session) -> None:
7272
# Get the common wheels.
7373
if should_update_common_wheels():

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ classifiers = [
1313
"Programming Language :: Python",
1414
"Programming Language :: Python :: 3",
1515
"Programming Language :: Python :: 3 :: Only",
16-
"Programming Language :: Python :: 3.7",
1716
"Programming Language :: Python :: 3.8",
1817
"Programming Language :: Python :: 3.9",
1918
"Programming Language :: Python :: 3.10",
@@ -28,7 +27,7 @@ authors = [
2827

2928
# NOTE: requires-python is duplicated in __pip-runner__.py.
3029
# When changing this value, please change the other copy as well.
31-
requires-python = ">=3.7"
30+
requires-python = ">=3.8"
3231

3332
[project.urls]
3433
Homepage = "https://pip.pypa.io/"
@@ -139,7 +138,7 @@ webencodings = "https://github.com/SimonSapin/python-webencodings/raw/master/LIC
139138

140139
[tool.ruff]
141140
src = ["src"]
142-
target-version = "py37"
141+
target-version = "py38"
143142
line-length = 88
144143
extend-exclude = [
145144
"_vendor",

src/pip/__pip-runner__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
import sys
1010

11-
# Copied from setup.py
12-
PYTHON_REQUIRES = (3, 7)
11+
# Copied from pyproject.toml
12+
PYTHON_REQUIRES = (3, 8)
1313

1414

1515
def version_str(version): # type: ignore

src/pip/_internal/commands/search.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import xmlrpc.client
66
from collections import OrderedDict
77
from optparse import Values
8-
from typing import TYPE_CHECKING, Dict, List, Optional
8+
from typing import TYPE_CHECKING, Dict, List, Optional, TypedDict
99

1010
from pip._vendor.packaging.version import parse as parse_version
1111

@@ -20,7 +20,6 @@
2020
from pip._internal.utils.misc import write_output
2121

2222
if TYPE_CHECKING:
23-
from typing import TypedDict
2423

2524
class TransformedHit(TypedDict):
2625
name: str

src/pip/_internal/distributions/sdist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def _install_build_reqs(self, finder: PackageFinder) -> None:
117117
if (
118118
self.req.editable
119119
and self.req.permit_editable_wheels
120-
and self.req.supports_pyproject_editable()
120+
and self.req.supports_pyproject_editable
121121
):
122122
build_reqs = self._get_build_requires_editable()
123123
else:

src/pip/_internal/exceptions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import re
1414
import sys
1515
from itertools import chain, groupby, repeat
16-
from typing import TYPE_CHECKING, Dict, Iterator, List, Optional, Union
16+
from typing import TYPE_CHECKING, Dict, Iterator, List, Literal, Optional, Union
1717

1818
from pip._vendor.requests.models import Request, Response
1919
from pip._vendor.rich.console import Console, ConsoleOptions, RenderResult
@@ -22,7 +22,6 @@
2222

2323
if TYPE_CHECKING:
2424
from hashlib import _Hash
25-
from typing import Literal
2625

2726
from pip._internal.metadata import BaseDistribution
2827
from pip._internal.req.req_install import InstallRequirement

0 commit comments

Comments
 (0)