Skip to content

Commit a27fa9d

Browse files
committed
Cleanup pkg_resources dependencies and configuration
1 parent 4966178 commit a27fa9d

File tree

8 files changed

+12
-28
lines changed

8 files changed

+12
-28
lines changed

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ recursive-include tests *.py
33
recursive-include setuptools/tests *.html
44
recursive-include docs *.py *.txt *.rst *.conf *.css *.css_t Makefile indexsidebar.html
55
recursive-include setuptools/_vendor *
6-
recursive-include pkg_resources *.py *.txt
7-
recursive-include pkg_resources/tests/data *
86
recursive-include tools *
97
recursive-include newsfragments *
108
include *.py

conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def pytest_configure(config):
3232
'setuptools/tests/mod_with_constant.py',
3333
'setuptools/_distutils',
3434
'_distutils_hack',
35-
'pkg_resources/tests/data',
3635
'setuptools/_vendor',
3736
'setuptools/config/_validate_pyproject',
3837
'setuptools/modified.py',

docs/development/developer-guide.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ cannot be declared as they won't be resolved soon enough to build
122122
setuptools from source. Eventually, this limitation may be lifted as
123123
PEP 517/518 reach ubiquitous adoption, but for now, Setuptools
124124
cannot declare dependencies other than through
125-
``setuptools/_vendor/vendored.txt`` and
126-
``pkg_resources/_vendor/vendored.txt``.
125+
``setuptools/_vendor/vendored.txt``.
127126

128127
All the dependencies specified in these files are "vendorized" using a
129128
simple Python script ``tools/vendor.py``.

mypy.ini

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ exclude = (?x)(
3131
# These are vendored
3232
| ^setuptools/_vendor/
3333
| ^setuptools/_distutils/
34-
# Duplicate module name
35-
| ^pkg_resources/tests/data/my-test-package-source/setup.py$
3634
)
35+
3736
[mypy-setuptools.*]
3837
disable_error_code =
3938
# DistributionMetadata.license_files and DistributionMetadata.license_file
@@ -43,30 +42,25 @@ disable_error_code =
4342
# See issue described below about distutils across Python versions
4443
has-type,
4544

46-
# - pkg_resources tests create modules that won't exists statically before the test is run.
47-
# Let's ignore all "import-not-found" since, if an import really wasn't found, then the test would fail.
48-
[mypy-pkg_resources.tests.*]
49-
disable_error_code = import-not-found
50-
51-
# - distutils doesn't exist on Python 3.12, unfortunately, this means typing
52-
# will be missing for subclasses of distutils on Python 3.12 until either:
53-
# - support for `SETUPTOOLS_USE_DISTUTILS=stdlib` is dropped (#3625)
54-
# for setuptools to import `_distutils` directly
55-
# - or non-stdlib distutils typings are exposed
45+
# distutils doesn't exist on Python 3.12, unfortunately, this means typing
46+
# will be missing for subclasses of distutils on Python 3.12 until either:
47+
# - support for `SETUPTOOLS_USE_DISTUTILS=stdlib` is dropped (#3625)
48+
# for setuptools to import `_distutils` directly
49+
# - or non-stdlib distutils typings are exposed
5650
[mypy-distutils.*]
5751
ignore_missing_imports = True
5852

59-
# - wheel: does not intend on exposing a programmatic API https://github.com/pypa/wheel/pull/610#issuecomment-2081687671
53+
# wheel: does not intend on exposing a programmatic API https://github.com/pypa/wheel/pull/610#issuecomment-2081687671
6054
[mypy-wheel.*]
6155
follow_untyped_imports = True
62-
# - The following are not marked as py.typed:
56+
57+
# The following are not marked as py.typed:
6358
# - jaraco: Since mypy 1.12, the root name of the untyped namespace package gets called-out too
6459
# - jaraco.develop: https://github.com/jaraco/jaraco.develop/issues/22
6560
# - jaraco.envs: https://github.com/jaraco/jaraco.envs/issues/7
6661
# - jaraco.packaging: https://github.com/jaraco/jaraco.packaging/issues/20
6762
# - jaraco.path: https://github.com/jaraco/jaraco.path/issues/2
68-
# - jaraco.text: https://github.com/jaraco/jaraco.text/issues/17
69-
[mypy-jaraco,jaraco.develop.*,jaraco.envs,jaraco.packaging.*,jaraco.path,jaraco.text]
63+
[mypy-jaraco,jaraco.develop.*,jaraco.envs,jaraco.packaging.*,jaraco.path]
7064
follow_untyped_imports = True
7165

7266
# Even when excluding a module, import issues can show up due to following import

newsfragments/5175.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Cleanup `pkg_resources` dependencies and configuration -- by :user:`Avasam`

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ core = [
102102
"tomli>=2.0.1; python_version < '3.11'",
103103
"wheel>=0.43.0",
104104

105-
# pkg_resources
106-
"platformdirs >= 4.2.2", # Made ctypes optional (see #4461)
107-
108105
# for distutils
109106
"jaraco.functools >= 4",
110107
"more_itertools",

ruff.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ ignore = [
7272
[lint.per-file-ignores]
7373
# Suppress nuisance warnings about module-import-not-at-top-of-file (E402) due to workaround for #4476
7474
"setuptools/__init__.py" = ["E402"]
75-
# pkg_resources is due for removal, not worth fixing existing errors
76-
"pkg_resources/__init__.py" = ["E402", "ANN204"]
77-
"pkg_resources/tests/test_resources.py" = ["PT031"]
7875

7976
[lint.isort]
8077
combine-as-imports = true

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ pass_env =
2222
PRE_BUILT_SETUPTOOLS_SDIST
2323
TIMEOUT_BACKEND_TEST # timeout (in seconds) for test_build_meta
2424
SSH_AUTH_SOCK # for exercise.py if repo was checked out with ssh
25-
windir # required for test_pkg_resources
2625
# honor git config in pytest-perf
2726
HOME
2827

0 commit comments

Comments
 (0)