Skip to content

Commit abb2a4c

Browse files
committed
Drop support for Python 3.8
1 parent 150b402 commit abb2a4c

File tree

14 files changed

+27
-58
lines changed

14 files changed

+27
-58
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ jobs:
114114
matrix:
115115
os: [ubuntu-22.04, macos-13, macos-latest]
116116
python:
117-
- "3.8"
118117
- "3.9"
119118
- "3.10"
120119
- "3.11"
@@ -172,10 +171,9 @@ jobs:
172171
matrix:
173172
os: [Windows]
174173
python:
175-
- "3.8"
174+
- "3.9"
176175
# Commented out, since Windows tests are expensively slow,
177176
# only test the oldest and newest Python supported by pip
178-
# - "3.9"
179177
# - "3.10"
180178
# - "3.11"
181179
# - "3.12"

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.8
2221
- CPython 3.9
2322
- CPython 3.10
2423
- CPython 3.11
@@ -91,9 +90,7 @@ Actual testing
9190
+------------------------------+---------------+-----------------+
9291
| **interpreter** | **unit** | **integration** |
9392
+-----------+----------+-------+---------------+-----------------+
94-
| | x86 | CP3.8 | | |
95-
| | +-------+---------------+-----------------+
96-
| | | CP3.9 | | |
93+
| | x86 | CP3.9 | | |
9794
| | +-------+---------------+-----------------+
9895
| | | CP3.10| | |
9996
| | +-------+---------------+-----------------+
@@ -105,9 +102,7 @@ Actual testing
105102
| | +-------+---------------+-----------------+
106103
| | | PyPy3 | | |
107104
| Windows +----------+-------+---------------+-----------------+
108-
| | x64 | CP3.8 | GitHub | GitHub |
109-
| | +-------+---------------+-----------------+
110-
| | | CP3.9 | | |
105+
| | x64 | CP3.9 | GitHub | GitHub |
111106
| | +-------+---------------+-----------------+
112107
| | | CP3.10| | |
113108
| | +-------+---------------+-----------------+
@@ -119,9 +114,7 @@ Actual testing
119114
| | +-------+---------------+-----------------+
120115
| | | PyPy3 | | |
121116
+-----------+----------+-------+---------------+-----------------+
122-
| | x86 | CP3.8 | | |
123-
| | +-------+---------------+-----------------+
124-
| | | CP3.9 | | |
117+
| | x86 | CP3.9 | | |
125118
| | +-------+---------------+-----------------+
126119
| | | CP3.10| | |
127120
| | +-------+---------------+-----------------+
@@ -133,9 +126,7 @@ Actual testing
133126
| | +-------+---------------+-----------------+
134127
| | | PyPy3 | | |
135128
| Linux +----------+-------+---------------+-----------------+
136-
| | x64 | CP3.8 | GitHub | GitHub |
137-
| | +-------+---------------+-----------------+
138-
| | | CP3.9 | GitHub | GitHub |
129+
| | x64 | CP3.9 | GitHub | GitHub |
139130
| | +-------+---------------+-----------------+
140131
| | | CP3.10| GitHub | GitHub |
141132
| | +-------+---------------+-----------------+
@@ -147,9 +138,7 @@ Actual testing
147138
| | +-------+---------------+-----------------+
148139
| | | PyPy3 | | |
149140
+-----------+----------+-------+---------------+-----------------+
150-
| | arm64 | CP3.8 | GitHub | GitHub |
151-
| | +-------+---------------+-----------------+
152-
| | | CP3.9 | GitHub | GitHub |
141+
| | arm64 | CP3.9 | GitHub | GitHub |
153142
| | +-------+---------------+-----------------+
154143
| | | CP3.10| GitHub | GitHub |
155144
| | +-------+---------------+-----------------+
@@ -161,9 +150,7 @@ Actual testing
161150
| | +-------+---------------+-----------------+
162151
| | | PyPy3 | | |
163152
| macOS +----------+-------+---------------+-----------------+
164-
| | x64 | CP3.8 | GitHub | GitHub |
165-
| | +-------+---------------+-----------------+
166-
| | | CP3.9 | GitHub | GitHub |
153+
| | x64 | CP3.9 | GitHub | GitHub |
167154
| | +-------+---------------+-----------------+
168155
| | | CP3.10| GitHub | GitHub |
169156
| | +-------+---------------+-----------------+

docs/html/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ $ pip install --upgrade pip
126126
The current version of pip works on:
127127

128128
- Windows, Linux and macOS.
129-
- CPython 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and latest PyPy3.
129+
- CPython 3.9, 3.10, 3.11, 3.12, 3.13, and latest PyPy3.
130130

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

news/12989.removal.rst

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

noxfile.py

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

pyproject.toml

Lines changed: 2 additions & 2 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.8",
1716
"Programming Language :: Python :: 3.9",
1817
"Programming Language :: Python :: 3.10",
1918
"Programming Language :: Python :: 3.11",
@@ -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.8"
30+
requires-python = ">=3.9"
3231

3332
[project.scripts]
3433
pip = "pip._internal.cli.main:main"
@@ -152,6 +151,7 @@ distlib = "https://bitbucket.org/pypa/distlib/raw/master/LICENSE.txt"
152151
#
153152

154153
[tool.ruff]
154+
target-version = "py38" # Pin Ruff to Python 3.8
155155
src = ["src"]
156156
line-length = 88
157157
extend-exclude = [

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 pyproject.toml
12-
PYTHON_REQUIRES = (3, 8)
12+
PYTHON_REQUIRES = (3, 9)
1313

1414

1515
def version_str(version): # type: ignore

src/pip/_internal/locations/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ def get_scheme(
304304
user
305305
and k == "platlib"
306306
and not WINDOWS
307-
and sys.version_info >= (3, 9)
308307
and _PLATLIBDIR != "lib"
309308
and _looks_like_bpo_44860()
310309
)

src/pip/_internal/resolution/resolvelib/found_candidates.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import functools
1212
import logging
1313
from collections.abc import Sequence
14-
from typing import TYPE_CHECKING, Any, Callable, Iterator, Optional, Set, Tuple
14+
from typing import Any, Callable, Iterator, Optional, Set, Tuple
1515

1616
from pip._vendor.packaging.version import _BaseVersion
1717

@@ -23,21 +23,6 @@
2323

2424
IndexCandidateInfo = Tuple[_BaseVersion, Callable[[], Optional[Candidate]]]
2525

26-
if TYPE_CHECKING:
27-
SequenceCandidate = Sequence[Candidate]
28-
else:
29-
# For compatibility: Python before 3.9 does not support using [] on the
30-
# Sequence class.
31-
#
32-
# >>> from collections.abc import Sequence
33-
# >>> Sequence[str]
34-
# Traceback (most recent call last):
35-
# File "<stdin>", line 1, in <module>
36-
# TypeError: 'ABCMeta' object is not subscriptable
37-
#
38-
# TODO: Remove this block after dropping Python 3.8 support.
39-
SequenceCandidate = Sequence
40-
4126

4227
def _iter_built(infos: Iterator[IndexCandidateInfo]) -> Iterator[Candidate]:
4328
"""Iterator for ``FoundCandidates``.
@@ -124,7 +109,7 @@ def _iter_built_with_inserted(
124109
yield installed
125110

126111

127-
class FoundCandidates(SequenceCandidate):
112+
class FoundCandidates(Sequence[Candidate]):
128113
"""A lazy sequence to provide candidates to the resolver.
129114
130115
The intended usage is to return this from `find_matches()` so the resolver

src/pip/_internal/utils/unpacking.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ def pip_filter(member: tarfile.TarInfo, path: str) -> tarfile.TarInfo:
208208
member = data_filter(member, location)
209209
except tarfile.LinkOutsideDestinationError:
210210
if sys.version_info[:3] in {
211-
(3, 8, 17),
212211
(3, 9, 17),
213212
(3, 10, 12),
214213
(3, 11, 4),

0 commit comments

Comments
 (0)