issue-5285 Remove eager and unnecessary importing of setuptools and pkg_resources #5289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to Pipenv!
Will require a requirementslib change to actually roll this out, but this is a branch that prototypes fixing #5285 and #5290
The underlying reason why we patched Pip to use sysconfig by default for all python versions (https://github.com/pypa/pipenv/pull/5275/files#diff-e154923a3c93acd48d40dd714127c4b90cac776ebd71930770919d539d137f77R44)
though that appears to be compatible with this fix and so far that patch isn't causing a specific problem so I lean towards leaving it in for now.Actually #5290 came in right after I wrote that, so now I am in favor of dropping that patch with this change.The issue
Some systems have patched sysconfig differently, and from this discussion (pypa/setuptools#3544) it would appear that importing setuptools packages is problematic