Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safer usages of pkg_resources #5350

Merged
merged 11 commits into from
Sep 14, 2022
Merged

Safer usages of pkg_resources #5350

merged 11 commits into from
Sep 14, 2022

Conversation

matteius
Copy link
Member

@matteius matteius commented Sep 10, 2022

Fixes #5349
Fixes #5208

The issue

  • Cleanup some patching to be consistent with how we patch pipenv to be available internal to pip __main__.py which is a more modern way using importlib that does not rely on pkg_resoruces.
  • Utilizing the internal pkg_resources, and make that part of the vendoring.update task by adding it to the LIBRARY_RENAMES and reinvoke the vendoring.update task which rewrote the imports.

@matteius

This comment was marked as outdated.

@matteius
Copy link
Member Author

Will depend on actually vendoring in this sarugaku/requirementslib#343 with a new release of requirementslib, but I have the changes in place now for testing.

@matteius
Copy link
Member Author

I have vendor'd in the new requirementslib release so this is ready for review.

@matteius matteius added the PR: awaiting-review The PR related to this issue is awaiting review by a maintainer. label Sep 14, 2022
Copy link
Contributor

@oz123 oz123 left a comment

Choose a reason for hiding this comment

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

Awesome! Lots of code removed!
Also, I am really happy we keep moving to pip._vendor as our goal is to remove duplicate libraries.

@oz123 oz123 removed the PR: awaiting-review The PR related to this issue is awaiting review by a maintainer. label Sep 14, 2022
@oz123 oz123 merged commit 62b57b9 into main Sep 14, 2022
@oz123 oz123 deleted the issue-5349 branch September 14, 2022 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants