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

Swap venv and virtualenv checks #7719

Merged
merged 1 commit into from
Feb 12, 2020

Conversation

uranusjr
Copy link
Member

Extracted from #7718.

Environments created by pypa/virtualenv >=20 can pass both real_prefix and base_prefix checks, but are only able to use the pyvenv.cfg values, not the legacy no-global-site-packages.txt. This patch swap the checks to test for venv (PEP 405) first, so the new virtualenv implementation uses the correct code path and reads pyvenv.cfg.

Environments created by pypa/virtualenv >=20 can pass both real_prefix
and base_prefix checks, but are only able to use the pyvenv.cfg values,
not the legacy `no-global-site-packages.txt`. So we need to check for
venv (PEP 405) first.
@pradyunsg pradyunsg merged commit 025e99e into pypa:master Feb 12, 2020
@uranusjr uranusjr deleted the virtualenv-20-detection branch February 12, 2020 06:53
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Mar 17, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants