Skip to content

Comments

Update stale docs references to pkg_resources as active module#5180

Open
veeceey wants to merge 1 commit intopypa:mainfrom
veeceey:docs/update-stale-pkg-resources-refs
Open

Update stale docs references to pkg_resources as active module#5180
veeceey wants to merge 1 commit intopypa:mainfrom
veeceey:docs/update-stale-pkg-resources-refs

Conversation

@veeceey
Copy link

@veeceey veeceey commented Feb 10, 2026

Summary

Addresses #5179. Following the deprecation of pkg_resources completed in #5173, several non-historical documentation pages and docstrings still reference pkg_resources as though it is an actively maintained module. This PR updates those remaining references:

  • docs/setuptools.rst: Rewrite the "Transitional Note" section to reflect that pkg_resources-style namespace packages are deprecated, with a note directing users to PEP 420 implicit namespaces
  • docs/development/index.rst: Remove mention of pkg_resources module familiarity and reference manual (the reference manual no longer exists in the main docs)
  • docs/userguide/distribution.rst: Replace pkg_resources.parse_version() with packaging.version.parse() and update examples to use PEP 440-compliant version strings
  • docs/userguide/extension.rst: Reference importlib.metadata as the primary API for EGG-INFO metadata access, with pkg_resources as the predecessor
  • docs/userguide/package_discovery.rst: Fix pkg_resource typo (missing s) in two places, fix pkgutils typo (should be pkgutil), and add a .. deprecated:: admonition to the Legacy Namespace Packages section clarifying these are no longer supported
  • setuptools/dist.py: Replace pkg_resources.require() format reference with PEP 508 in the install_requires docstring

Test plan

  • Verify the RST renders correctly (no broken cross-references or formatting) - confirmed via ReadTheDocs preview build
  • Confirm all pkg_resources references in non-historical docs now either point to the modern replacement or are clearly marked as deprecated
  • No functional code changes -- documentation and docstring only

Remove or update documentation that still refers to ``pkg_resources``
as an actively maintained module, following the deprecation completed
in pypa#5173. Changes include:

- docs/setuptools.rst: Rewrite Transitional Note to reflect that
  pkg_resources-style namespace packages are deprecated
- docs/development/index.rst: Remove mention of pkg_resources module
  and reference manual
- docs/userguide/distribution.rst: Replace pkg_resources.parse_version()
  with packaging.version.parse()
- docs/userguide/extension.rst: Reference importlib.metadata as the
  primary API for EGG-INFO access
- docs/userguide/package_discovery.rst: Fix ``pkg_resource`` typo
  (missing 's'), fix ``pkgutils`` typo, add deprecation admonition
  to Legacy Namespace Packages section
- setuptools/dist.py: Replace pkg_resources.require() format reference
  with PEP 508 in install_requires docstring

Closes pypa#5179

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@veeceey
Copy link
Author

veeceey commented Feb 19, 2026

Hi maintainers, friendly ping on this PR. It's been open for about 8 days without any review activity. Would appreciate any feedback or direction when you get a chance. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant