-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Test suite compatibility with the latest virtualenv >= 20.0.0 #8441
Conversation
After hours of debugging, I've finaly found the root cause of Python 2.7 and
Lines 337 to 340 in 445711c
which is then translated to include-system-site-packages = true inLines 134 to 146 in 201c9fc
I honestly don't know how to fix that because the whole tests is kinda complex/complicated and the chain of fixtures ( |
Correction to my last comment about |
The problem with these two (py38):
is that the virtual environment has access to system site-packages and |
cd18c2c
to
329819d
Compare
Well, it seems that we have some progress here 🎉 Is there anybody who can help me with the issues on Windows? I don't have windows so I cannot reproduce them. I'll take a look on pypy. |
Thanks for all the investigation effort, I incerely hope we’ll be able to come up with a solution soon 😃 The |
Just a note, but if this is specific Python 2 hackery (which I'm not clear on, because this comment suggests there's something up on Python 3) I'd be fine with patching over the problem, as we'll be dropping Python 2 support fairly soon. |
It's only about Python 2 and a hacky way If you are okay with that, I'd prefer to skip that test for Python 2 rather than investing energy to find a solution for soon-to-be-dropped Python 2. |
a72e4c9
to
a8a8fa8
Compare
I'm 100% on board to just straight up skip the test, with a (long) comment describing why we're skipping it and why we're hitting this issue. |
I'll get back to it in ~2 weeks. |
FWIW, Microsoft offers Windows VM images here that are good for like 90 days. That's what I use. |
a8a8fa8
to
3290da5
Compare
PR is rebased on top of the latest master and I'll continue. |
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
virtualenv 20.0+ completely revamps its API: * There's no path_locations() anymore. Stdlib sysconfig can replace it completely. * The Python API to create an environment is split into several pieces. Use the entry point function for now to provide the functionality.
I *think* virtualenv fixed these? We'll see.
This is what the old virtualenv implementation did, so we match that.
The latest virtualenv does some dark magic for sys.path in Python 2 so the BuildEnvironment is no longer isolated here. See: pypa/virtualenv#1861
These tests should not have access to site packages so they always install the package into an empty environment.
3290da5
to
6d69ce1
Compare
I'll try to move this forward. One question: If I understand it correctly, the new virtualenv uses the same configuration as the builtin venv module so the code for the legacy virtualenv can be deleted, right? For example, functions checking the availability of system site-packages |
6d69ce1
to
58bb3e4
Compare
The main source |
58bb3e4
to
78ef0f6
Compare
I'm afraid I won't be able to continue on this effort. The codebase is too complex for me and I don't have enough free time to dive deep enough to move pip to the new virtualenv while still support compatibility with venv and old virtualenv. Is there anybody who can help me with this or take over it? |
Ahoy! What kind of help would you want with this? I'm happy to help. :) |
I'd like an insight into pip codebase because it seems that pip itself has some code to detect different kinds of virtual environments to be able to install packages to them and also its tests depend heavily on venv/virtualenv. Are virtual environments in tests used to test how pip handles them or just to isolate one test from another? Do we want to test pip with venv, new virtualenv, and also the old virtualenv? It seems to me that the virtual environments created by venv are very similar to those produced by the new virtualenv so is there any reason to distinguish between them? |
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
Looking at this now, this likely needs a lot of additional work. I'll pick this up this weekend, and see where I can take it. :) |
I'll close this for now, since this one is significantly bitrotten; and filing a new PR is cheap. We can have a further discussion in #8273. ^>^ |
I'd like to continue with the effort from #7698 and #7718 and make the pip test suite use the latest released virtualenv.
This PR is WIP created to see the CI status.