Skip to content

Commit

Permalink
Remove unnecessary code paths for 3.9+ (follow up on skeleton chang…
Browse files Browse the repository at this point in the history
…es) (#4718)
  • Loading branch information
abravalheri authored Nov 4, 2024
2 parents 7a298d9 + 0fe2e06 commit bf582cb
Show file tree
Hide file tree
Showing 62 changed files with 13 additions and 3,015 deletions.
1 change: 1 addition & 0 deletions newsfragments/4718.feature.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Require Python 3.9 or later.
4 changes: 4 additions & 0 deletions newsfragments/4718.feature.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Remove dependency on ``importlib_resources``
and the vendored copy of the library.
Instead, ``setuptools`` consistently rely on stdlib's ``importlib.resources``
(available on Python 3.9+).
3 changes: 3 additions & 0 deletions newsfragments/4718.feature.3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Setuptools' ``bdist_wheel`` implementation no longer produces wheels with
the ``m`` SOABI flag (pymalloc-related).
This flag was removed on Python 3.8+ (see :obj:`sys.abiflags`).
4 changes: 2 additions & 2 deletions pkg_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import sys

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

import _imp
import collections
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ core = [
"packaging>=24",
"more_itertools>=8.8",
"jaraco.text>=3.7",
"importlib_resources>=5.10.2; python_version < '3.9'",
"importlib_metadata>=6; python_version < '3.10'",
"tomli>=2.0.1; python_version < '3.11'",
"wheel>=0.43.0",
Expand Down
5 changes: 1 addition & 4 deletions setuptools/_importlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@
import importlib.metadata as metadata # noqa: F401


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

This file was deleted.

202 changes: 0 additions & 202 deletions setuptools/_vendor/importlib_resources-6.4.0.dist-info/LICENSE

This file was deleted.

100 changes: 0 additions & 100 deletions setuptools/_vendor/importlib_resources-6.4.0.dist-info/METADATA

This file was deleted.

Loading

0 comments on commit bf582cb

Please sign in to comment.