bpo-35328: Set VIRTUAL_ENV_PROMPT at venv activation#10745
bpo-35328: Set VIRTUAL_ENV_PROMPT at venv activation#10745blfpd wants to merge 1 commit intopython:masterfrom
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Our records indicate we have not received your CLA. For legal reasons we need you to sign this 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 your contribution, we look forward to reviewing it! |
csabella
left a comment
There was a problem hiding this comment.
This change only adds the environment variable to the script for bash, but there are other activate files for powershell, windows, fish, and csh. If the variable is set in one environment, it would probably be best to set it for all environments.
|
I'm going to close this pull request as there hasn't been any response to the code review. It can be reopened or a new pull request can be opened to replace it. |
From bpo-35328:
When creating a new virtual env with
python3 -m venv .venv --prompt env, the prompt information is only used to set a temporary PS1.This information is lost when using custom prompt, for example with ZSH.
I propose to set
VIRTUAL_ENV_PROMPT=__VENV_PROMPT__when activating the newly created venv, to be used by tools and other shells.https://bugs.python.org/issue35328