Skip to content

Commit 99d1322

Browse files
committed
Drop support for EOL Python 3.7
1 parent aebc0c5 commit 99d1322

31 files changed

+59
-180
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"
@@ -153,9 +152,8 @@ jobs:
153152
matrix:
154153
os: [Windows]
155154
python:
156-
- "3.7"
155+
- "3.8"
157156
# Commented out, since Windows tests are expensively slow.
158-
# - "3.8"
159157
# - "3.9"
160158
# - "3.10"
161159
- "3.11"

docs/html/development/ci.rst

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ 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
24+
- CPython 3.11
2525
- Latest PyPy3
2626

2727
on different operating systems:
@@ -88,61 +88,63 @@ Actual testing
8888
+------------------------------+---------------+-----------------+
8989
| **interpreter** | **unit** | **integration** |
9090
+-----------+----------+-------+---------------+-----------------+
91-
| | x86 | CP3.7 | | |
92-
| | +-------+---------------+-----------------+
93-
| | | CP3.8 | | |
91+
| | x86 | CP3.8 | | |
9492
| | +-------+---------------+-----------------+
9593
| | | CP3.9 | | |
9694
| | +-------+---------------+-----------------+
9795
| | | CP3.10| | |
9896
| | +-------+---------------+-----------------+
97+
| | | CP3.11| | |
98+
| | +-------+---------------+-----------------+
9999
| | | PyPy3 | | |
100100
| Windows +----------+-------+---------------+-----------------+
101-
| | x64 | CP3.7 | GitHub | GitHub |
102-
| | +-------+---------------+-----------------+
103-
| | | CP3.8 | | |
101+
| | x64 | CP3.8 | GitHub | GitHub |
104102
| | +-------+---------------+-----------------+
105103
| | | CP3.9 | | |
106104
| | +-------+---------------+-----------------+
107-
| | | CP3.10| GitHub | GitHub |
105+
| | | CP3.10| | |
106+
| | +-------+---------------+-----------------+
107+
| | | CP3.11| GitHub | GitHub |
108108
| | +-------+---------------+-----------------+
109109
| | | PyPy3 | | |
110110
+-----------+----------+-------+---------------+-----------------+
111-
| | x86 | CP3.7 | | |
112-
| | +-------+---------------+-----------------+
113-
| | | CP3.8 | | |
111+
| | x86 | CP3.8 | | |
114112
| | +-------+---------------+-----------------+
115113
| | | CP3.9 | | |
116114
| | +-------+---------------+-----------------+
115+
| | | CP3.10| | |
116+
| | +-------+---------------+-----------------+
117+
| | | CP3.11| | |
118+
| | +-------+---------------+-----------------+
117119
| | | PyPy3 | | |
118120
| Linux +----------+-------+---------------+-----------------+
119-
| | x64 | CP3.7 | GitHub | GitHub |
120-
| | +-------+---------------+-----------------+
121-
| | | CP3.8 | GitHub | GitHub |
121+
| | x64 | CP3.8 | GitHub | GitHub |
122122
| | +-------+---------------+-----------------+
123123
| | | CP3.9 | GitHub | GitHub |
124124
| | +-------+---------------+-----------------+
125125
| | | CP3.10| GitHub | GitHub |
126126
| | +-------+---------------+-----------------+
127+
| | | CP3.11| GitHub | GitHub |
128+
| | +-------+---------------+-----------------+
127129
| | | PyPy3 | | |
128130
+-----------+----------+-------+---------------+-----------------+
129-
| | arm64 | CP3.7 | | |
130-
| | +-------+---------------+-----------------+
131-
| | | CP3.8 | | |
131+
| | arm64 | CP3.8 | | |
132132
| | +-------+---------------+-----------------+
133133
| | | CP3.9 | | |
134134
| | +-------+---------------+-----------------+
135135
| | | CP3.10| | |
136136
| | +-------+---------------+-----------------+
137+
| | | CP3.11| | |
138+
| | +-------+---------------+-----------------+
137139
| | | PyPy3 | | |
138140
| macOS +----------+-------+---------------+-----------------+
139-
| | x64 | CP3.7 | GitHub | GitHub |
140-
| | +-------+---------------+-----------------+
141-
| | | CP3.8 | GitHub | GitHub |
141+
| | x64 | CP3.8 | GitHub | GitHub |
142142
| | +-------+---------------+-----------------+
143143
| | | CP3.9 | GitHub | GitHub |
144144
| | +-------+---------------+-----------------+
145145
| | | CP3.10| GitHub | GitHub |
146146
| | +-------+---------------+-----------------+
147+
| | | CP3.11| GitHub | GitHub |
148+
| | +-------+---------------+-----------------+
147149
| | | PyPy3 | | |
148150
+-----------+----------+-------+---------------+-----------------+

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 and latest PyPy3.
105+
- Windows, Linux and macOS.
106+
- CPython 3.8, 3.9, 3.10, 3.11 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

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", "pypy3"])
70+
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "pypy3"])
7171
def test(session: nox.Session) -> None:
7272
# Get the common wheels.
7373
if should_update_common_wheels():

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def get_version(rel_path: str) -> str:
3737
"Programming Language :: Python",
3838
"Programming Language :: Python :: 3",
3939
"Programming Language :: Python :: 3 :: Only",
40-
"Programming Language :: Python :: 3.7",
4140
"Programming Language :: Python :: 3.8",
4241
"Programming Language :: Python :: 3.9",
4342
"Programming Language :: Python :: 3.10",
@@ -83,5 +82,5 @@ def get_version(rel_path: str) -> str:
8382
zip_safe=False,
8483
# NOTE: python_requires is duplicated in __pip-runner__.py.
8584
# When changing this value, please change the other copy as well.
86-
python_requires=">=3.7",
85+
python_requires=">=3.8",
8786
)

src/pip/__pip-runner__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import sys
1010

1111
# Copied from setup.py
12-
PYTHON_REQUIRES = (3, 7)
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
@@ -111,7 +111,7 @@ def _install_build_reqs(self, finder: PackageFinder) -> None:
111111
if (
112112
self.req.editable
113113
and self.req.permit_editable_wheels
114-
and self.req.supports_pyproject_editable()
114+
and self.req.supports_pyproject_editable
115115
):
116116
build_reqs = self._get_build_requires_editable()
117117
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

src/pip/_internal/index/collector.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
from html.parser import HTMLParser
1515
from optparse import Values
1616
from typing import (
17-
TYPE_CHECKING,
1817
Callable,
1918
Dict,
2019
Iterable,
2120
List,
2221
MutableMapping,
2322
NamedTuple,
2423
Optional,
24+
Protocol,
2525
Sequence,
2626
Tuple,
2727
Union,
@@ -42,11 +42,6 @@
4242

4343
from .sources import CandidatesFromPage, LinkSource, build_source
4444

45-
if TYPE_CHECKING:
46-
from typing import Protocol
47-
else:
48-
Protocol = object
49-
5045
logger = logging.getLogger(__name__)
5146

5247
ResponseHeaders = MutableMapping[str, str]

0 commit comments

Comments
 (0)