]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-89427: Provide the original prompt value for VIRTUAL_ENV_PROMPT (GH-106726)
authorJim Porter <826865+jimporter@users.noreply.github.com>
Tue, 23 Jan 2024 08:53:04 +0000 (00:53 -0800)
committerGitHub <noreply@github.com>
Tue, 23 Jan 2024 08:53:04 +0000 (08:53 +0000)
commit8edc8029def8040ebe1caf75d815439156dd2124
tree320f43aa9dde89fe0e673977003423bfe99d427b
parentb822b85ac11e73bbe4417bf03ee770ab116bb42d
gh-89427: Provide the original prompt value for VIRTUAL_ENV_PROMPT (GH-106726)

This improves the implementation in gh-106643.

Previously, venv passed "(<prompt>) " to the activation scripts, but we want
to provide the original value so that users can inspect it in the
$VIRTUAL_ENV_PROMPT env var.

Note: Lib/venv/scripts/common/Activate.ps1 surrounded the prompt value with
parens a second time, so no change was necessary in that file.
Lib/test/test_venv.py
Lib/venv/__init__.py
Lib/venv/scripts/common/activate
Lib/venv/scripts/nt/activate.bat
Lib/venv/scripts/posix/activate.csh
Lib/venv/scripts/posix/activate.fish