-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Support overriding corrupt virtual environments #2198
Comments
PS. In future please create 1 issue per one topic. |
1. Do not disturb platdir 2. Do delete a target directory on install if it is present and wasn't a part of the distro that could've been uninstalled fixes pypa#2198
Pursuant to PEP 0427 if a dist us a pure python dist, it will always be installed in the Virtualenv does not analyze whether embedded wheels are Thus,
I.e. either the seeding needs to be fixed to account for pure vs non-pure as PIP does and PEP specifies, and then looking at platlib makes sense or deleting from platlib potentially touches some other tool's packages which Virtualenv knows nothing about and int It's either or but it can't be both. |
Actually, I've exhausted the amount of the time I can dedicate to arguing on the Internet today. Withdrawn. Good luck. |
Seems you're assuming that seed packages will always be pure python, which might be true today it might not be the case forever. Feels to me it's no real downside in assuming either pure python or platform-dependent implementation can happen, and probably the correct solution.
Yes, this is a bug that should be fixed at some point; though for now, all seed packages are pure python so the issue isn't manifesting yet. A PR doing this would be accepted. |
The fix for #2185 in #2186 introduced changes to the behavior of Virtualenv that was not the intention of the fix. Such changes may affect existing environments in unexpected ways. Specifically:
The uninstall now would uninstall from
platlib
. However Virtualenv never installed (and does not now install) the embedded into theplatlib
and if a distro was installed there, the pre-2186 behavior was to leaveplatlib
completely undisturbed. The During seeding properly uninstall present versions of the wheels #2186 modified this behavior without a warning, reason, an ability to test such change (none of the embeds go toplatlib
) while violating the principle of least surprise.Prior to During seeding properly uninstall present versions of the wheels #2186 during installation if the target directory was present (for whatever reason), the logic would remove such target. Now that target must not exist or the installation would fail. A virtual env may contain extraneous directories/symlinks that are not associated with a distro (that would be handled by an uninstall), if the distro was installed in development mode, which deals in egg-links, symlinks and pth-files.
The text was updated successfully, but these errors were encountered: