-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Re-enable distutils patch by default. #2255
Conversation
This change is still failing two tests, both on late versions of pip - one against the current release (whatever virtualenv provides, 20.2.1) and the other against master. However, when I try to replicate the behavior by repeating the steps the tests are doing, I'm unable to do so. Everything works fine. I'm going to have to dig deeper. |
It seems with this behavior enabled by default (or maybe enabled at all?), late versions of pip are unable to install setuptools over setuptools:
|
The issue can be replicated in the currently-released version of setuptools by setting
|
6e3aa8d
to
be7a0a3
Compare
In the branch |
Ugh. The workaround doesn't work on PyPy. :( |
I don't understand why it's failing. It's passing for me locally (pypy3 on macOS). I guess I'll try to replicate the failure on an Ubuntu pypy system. |
After checking out the right branch, I was able to replicate the failure locally:
|
I'm able to replicate the failures on bionic as well. |
Well, last night I thought I was able to replicate the issue on bionic, but testing today, tests are passing on bionic :/ |
This dockerfile seems to be reliably replicating the failure:
|
I think I've figured out what's going on. On macOS, PyPy imports distutils before .pth processing, but on Linux, PyPy imports distutils after .pth processing. That means that on macOS, distutils comes from stdlib but on Linux, distutils resolves to Setuptools' copy. As a result, by the time pip gets around to importing distutils, the selectivity of the importer is no longer relevant - distutils is already resolved during startup time. I'm beginning to doubt it will be feasible for Setuptools to magically supply distutils or defer to the stdlib at the relevant decision points. |
I'm now considering this approach: In the
|
…istutilsMetaFinder.
4dd41a2
to
3d404fd
Compare
My plan is to merge and release this change tomorrow or Thursday. |
Closes #417
Closes #2232
I plan to release this change no sooner than Tuesday, Jul 14, giving downstream packagers at least some time to pin Setuptools or implement the escape hatch.
Pull Request Checklist