Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ recursive-include tests *.py
recursive-include setuptools/tests *.html
recursive-include docs *.py *.txt *.rst *.conf *.css *.css_t Makefile indexsidebar.html
recursive-include setuptools/_vendor *
recursive-include pkg_resources *.py *.txt
recursive-include pkg_resources/tests/data *
recursive-include tools *
recursive-include newsfragments *
include *.py
Expand Down
1 change: 0 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def pytest_configure(config):
'setuptools/tests/mod_with_constant.py',
'setuptools/_distutils',
'_distutils_hack',
'pkg_resources/tests/data',
'setuptools/_vendor',
'setuptools/config/_validate_pyproject',
'setuptools/modified.py',
Expand Down
3 changes: 1 addition & 2 deletions docs/development/developer-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ cannot be declared as they won't be resolved soon enough to build
setuptools from source. Eventually, this limitation may be lifted as
PEP 517/518 reach ubiquitous adoption, but for now, Setuptools
cannot declare dependencies other than through
``setuptools/_vendor/vendored.txt`` and
``pkg_resources/_vendor/vendored.txt``.
``setuptools/_vendor/vendored.txt``.

All the dependencies specified in these files are "vendorized" using a
simple Python script ``tools/vendor.py``.
Expand Down
26 changes: 10 additions & 16 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ exclude = (?x)(
# These are vendored
| ^setuptools/_vendor/
| ^setuptools/_distutils/
# Duplicate module name
| ^pkg_resources/tests/data/my-test-package-source/setup.py$
)

[mypy-setuptools.*]
disable_error_code =
# DistributionMetadata.license_files and DistributionMetadata.license_file
Expand All @@ -43,30 +42,25 @@ disable_error_code =
# See issue described below about distutils across Python versions
has-type,

# - pkg_resources tests create modules that won't exists statically before the test is run.
# Let's ignore all "import-not-found" since, if an import really wasn't found, then the test would fail.
[mypy-pkg_resources.tests.*]
disable_error_code = import-not-found

# - distutils doesn't exist on Python 3.12, unfortunately, this means typing
# will be missing for subclasses of distutils on Python 3.12 until either:
# - support for `SETUPTOOLS_USE_DISTUTILS=stdlib` is dropped (#3625)
# for setuptools to import `_distutils` directly
# - or non-stdlib distutils typings are exposed
# distutils doesn't exist on Python 3.12, unfortunately, this means typing
# will be missing for subclasses of distutils on Python 3.12 until either:
# - support for `SETUPTOOLS_USE_DISTUTILS=stdlib` is dropped (#3625)
# for setuptools to import `_distutils` directly
# - or non-stdlib distutils typings are exposed
[mypy-distutils.*]
ignore_missing_imports = True

# - wheel: does not intend on exposing a programmatic API https://github.com/pypa/wheel/pull/610#issuecomment-2081687671
# wheel: does not intend on exposing a programmatic API https://github.com/pypa/wheel/pull/610#issuecomment-2081687671
[mypy-wheel.*]
follow_untyped_imports = True
# - The following are not marked as py.typed:

# The following are not marked as py.typed:
# - jaraco: Since mypy 1.12, the root name of the untyped namespace package gets called-out too
# - jaraco.develop: https://github.com/jaraco/jaraco.develop/issues/22
# - jaraco.envs: https://github.com/jaraco/jaraco.envs/issues/7
# - jaraco.packaging: https://github.com/jaraco/jaraco.packaging/issues/20
# - jaraco.path: https://github.com/jaraco/jaraco.path/issues/2
# - jaraco.text: https://github.com/jaraco/jaraco.text/issues/17
[mypy-jaraco,jaraco.develop.*,jaraco.envs,jaraco.packaging.*,jaraco.path,jaraco.text]
[mypy-jaraco,jaraco.develop.*,jaraco.envs,jaraco.packaging.*,jaraco.path]
follow_untyped_imports = True

# Even when excluding a module, import issues can show up due to following import
Expand Down
1 change: 1 addition & 0 deletions newsfragments/5175.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cleanup `pkg_resources` dependencies and configuration -- by :user:`Avasam`
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ core = [
"tomli>=2.0.1; python_version < '3.11'",
"wheel>=0.43.0",

# pkg_resources
"platformdirs >= 4.2.2", # Made ctypes optional (see #4461)

# for distutils
"jaraco.functools >= 4",
"more_itertools",
Expand Down
3 changes: 0 additions & 3 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ ignore = [
[lint.per-file-ignores]
# Suppress nuisance warnings about module-import-not-at-top-of-file (E402) due to workaround for #4476
"setuptools/__init__.py" = ["E402"]
# pkg_resources is due for removal, not worth fixing existing errors
"pkg_resources/__init__.py" = ["E402", "ANN204"]
"pkg_resources/tests/test_resources.py" = ["PT031"]

[lint.isort]
combine-as-imports = true
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pass_env =
PRE_BUILT_SETUPTOOLS_SDIST
TIMEOUT_BACKEND_TEST # timeout (in seconds) for test_build_meta
SSH_AUTH_SOCK # for exercise.py if repo was checked out with ssh
windir # required for test_pkg_resources
# honor git config in pytest-perf
HOME

Expand Down
Loading