Skip to content

Conversation

@jaraco
Copy link
Member

@jaraco jaraco commented May 13, 2025

  • Remove comments referring to pkg_resources and inline a compatibility behavior with its explanation.
  • Set the due date for installer removal (same as easy_install and package_index).
  • Rely on importlib.metadata to detect presence of wheel.
  • Replace pkg_resources with packaging.requirements.
  • Migrated installer to avoid pkg_resources.

Summary of changes

Ref #3085

Pull Request Checklist

@jaraco jaraco marked this pull request as ready for review May 13, 2025 21:34
pkg_resources.working_set.add(dist, replace=True)
# dist.locate_file('') is the directory containing EGG-INFO, where the importabl
# contents can be found.
sys.path.insert(0, str(dist.locate_file('')))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The biggest diff is in this change, which instead of relying of the pkg_resources.working_set, simply makes the package available on sys.path. There are probably some scenarios in which working_set provides more sophistication (possibly overriding already imported packages), but my instinct is that risk is low given the limited scope of setup_requires outside of pep517 these days.

@jaraco jaraco merged commit f2748d1 into main May 14, 2025
37 of 44 checks passed
@jaraco jaraco deleted the feature/remove-more-pkg_resources branch May 14, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants