Skip to content

Commit bf582cb

Browse files
authored
Remove unnecessary code paths for 3.9+ (follow up on skeleton changes) (#4718)
2 parents 7a298d9 + 0fe2e06 commit bf582cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+13
-3015
lines changed

newsfragments/4718.feature.1.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Require Python 3.9 or later.

newsfragments/4718.feature.2.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Remove dependency on ``importlib_resources``
2+
and the vendored copy of the library.
3+
Instead, ``setuptools`` consistently rely on stdlib's ``importlib.resources``
4+
(available on Python 3.9+).

newsfragments/4718.feature.3.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Setuptools' ``bdist_wheel`` implementation no longer produces wheels with
2+
the ``m`` SOABI flag (pymalloc-related).
3+
This flag was removed on Python 3.8+ (see :obj:`sys.abiflags`).

pkg_resources/__init__.py

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

2222
import sys
2323

24-
if sys.version_info < (3, 8): # noqa: UP036 # Check for unsupported versions
25-
raise RuntimeError("Python 3.8 or later is required")
24+
if sys.version_info < (3, 9): # noqa: UP036 # Check for unsupported versions
25+
raise RuntimeError("Python 3.9 or later is required")
2626

2727
import _imp
2828
import collections

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ core = [
9393
"packaging>=24",
9494
"more_itertools>=8.8",
9595
"jaraco.text>=3.7",
96-
"importlib_resources>=5.10.2; python_version < '3.9'",
9796
"importlib_metadata>=6; python_version < '3.10'",
9897
"tomli>=2.0.1; python_version < '3.11'",
9998
"wheel>=0.43.0",

setuptools/_importlib.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,4 @@
66
import importlib.metadata as metadata # noqa: F401
77

88

9-
if sys.version_info < (3, 9):
10-
import importlib_resources as resources # pragma: no cover
11-
else:
12-
import importlib.resources as resources # noqa: F401
9+
import importlib.resources as resources # noqa: F401

setuptools/_vendor/importlib_resources-6.4.0.dist-info/INSTALLER

Lines changed: 0 additions & 1 deletion
This file was deleted.

setuptools/_vendor/importlib_resources-6.4.0.dist-info/LICENSE

Lines changed: 0 additions & 202 deletions
This file was deleted.

setuptools/_vendor/importlib_resources-6.4.0.dist-info/METADATA

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)