Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upbpo-39505: delete the redundant '/' in $env:VIRTUAL_ENV #18290
Conversation
This comment has been minimized.
This comment has been minimized.
the-knights-who-say-ni
commented
Jan 31, 2020
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
This comment has been minimized.
This comment has been minimized.
It seems that Misc/NEWS.d cannot contain ":VIRTUAL" ? |
schwarzichet commentedJan 31, 2020
•
edited by bedevere-bot
Copy from bpo-39505
When windows users use "python -m venv ENV_DIR", a python virtual environment will be created in ENV_DIR.
Powershell users use ENV_DIR\Scripts\Activate.ps1 to activate virtual environment.
In powershell, a environment variable, "$env:VIRTUAL_ENV", is set and used by many tools to determine that there is an activated venv. In bash, it is "$VIRTUAL_ENV"
In python3.8 and python3.9, $env:VIRTUAL_ENV has a redundant '/', for example:
using python3.7, or using virtualenv with python3.8 or 3.9, or in linux, there will be no such a '/' in the end.
This '/' matters because many tools use this environment variable, for example, oh-my-posh will take "test_venv/" as virtual environment name rather than "test_venv"(Although venv's activate.ps1 itself's default prompt is correct). And from the perspective of semantics and consistency with other platform, the '/' is redundant.
https://bugs.python.org/issue39505