diff options
author | Brett Cannon <54418+brettcannon@users.noreply.github.com> | 2019-08-21 22:58:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-21 22:58:01 (GMT) |
commit | 48ede6b8f685669f53d26ae8456647af42ae3dae (patch) | |
tree | 212023792f3f4d74cba61067c5539f0a846ec454 /Doc/whatsnew | |
parent | df2d4a6f3d5da2839c4fc11d31511c8e028daf2c (diff) | |
download | cpython-48ede6b8f685669f53d26ae8456647af42ae3dae.zip cpython-48ede6b8f685669f53d26ae8456647af42ae3dae.tar.gz cpython-48ede6b8f685669f53d26ae8456647af42ae3dae.tar.bz2 |
bpo-37663: have venv activation scripts all consistently use __VENV_PROMPT__ for prompt customization (GH-14941)
The activation scripts generated by venv were inconsistent in how they changed the shell's prompt. Some used `__VENV_PROMPT__` exclusively, some used `__VENV_PROMPT__` if it was set even though by default `__VENV_PROMPT__` is always set and the fallback matched the default, and one ignored `__VENV_PROMPT__` and used `__VENV_NAME__` instead (and even used a differing format to the default prompt). This change now has all activation scripts use `__VENV_PROMPT__` only and relies on the fact that venv sets that value by default.
The color of the customization is also now set in fish to the blue from the Python logo for as hex color support is built into that shell (much like PowerShell where the built-in green color is used).
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.9.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index f09e09c..6615a2e 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -118,6 +118,16 @@ finalization crashed with a Python fatal error if a daemon thread was still running. (Contributed by Victor Stinner in :issue:`37266`.) +venv +---- + +The activation scripts provided by :mod:`venv` now all specify their prompt +customization consistently by always using the value specified by +``__VENV_PROMPT__``. Previously some scripts unconditionally used +``__VENV_PROMPT__``, others only if it happened to be set (which was the default +case), and one used ``__VENV_NAME__`` instead. +(Contributed by Brett Cannon in :issue:`37663`.) + pprint ------ @@ -191,12 +201,14 @@ Removed Use :meth:`~threading.Thread.is_alive()` instead. (Contributed by Dong-hee Na in :issue:`37804`.) + Porting to Python 3.9 ===================== This section lists previously described changes and other bugfixes that may require changes to your code. + Changes in the Python API ------------------------- @@ -205,3 +217,6 @@ Changes in the Python API catching the specific exception type and supporting both Python 3.9 and earlier versions will need to catch both: ``except (ImportError, ValueError):`` + +* The :mod:`venv` activation scripts no longer special-case when + ``__VENV_PROMPT__`` is set to ``""``. |