diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2016-08-06 09:43:44 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2016-08-06 09:43:44 (GMT) |
commit | fd0f84bd8f1fcf280c49e5b994463fe7a8bcd102 (patch) | |
tree | f03d4e5183ade2b36b83014c322dca413777c307 /Doc | |
parent | c0752011472790e34d171b89f4b862cc3fd8ad08 (diff) | |
download | cpython-fd0f84bd8f1fcf280c49e5b994463fe7a8bcd102.zip cpython-fd0f84bd8f1fcf280c49e5b994463fe7a8bcd102.tar.gz cpython-fd0f84bd8f1fcf280c49e5b994463fe7a8bcd102.tar.bz2 |
Closes #22829: Added --prompt option to venv.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/venv.rst | 10 | ||||
-rw-r--r-- | Doc/whatsnew/3.6.rst | 8 |
2 files changed, 17 insertions, 1 deletions
diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst index 02e36fd..6bf26ff 100644 --- a/Doc/library/venv.rst +++ b/Doc/library/venv.rst @@ -89,7 +89,8 @@ mechanisms for third-party virtual environment creators to customize environment creation according to their needs, the :class:`EnvBuilder` class. .. class:: EnvBuilder(system_site_packages=False, clear=False, \ - symlinks=False, upgrade=False, with_pip=False) + symlinks=False, upgrade=False, with_pip=False, \ + prompt=None) The :class:`EnvBuilder` class accepts the following keyword arguments on instantiation: @@ -113,9 +114,16 @@ creation according to their needs, the :class:`EnvBuilder` class. installed in the virtual environment. This uses :mod:`ensurepip` with the ``--default-pip`` option. + * ``prompt`` -- a String to be used after virtual environment is activated + (defaults to ``None`` which means directory name of the environment would + be used). + .. versionchanged:: 3.4 Added the ``with_pip`` parameter + .. versionadded:: 3.6 + Added the ``prompt`` parameter + Creators of third-party virtual environment tools will be free to use the provided ``EnvBuilder`` class as a base class. diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index 45bd7d9..7a318e4 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -284,6 +284,14 @@ class has been added to the :mod:`typing` module as (Contributed by Brett Cannon in :issue:`25609`.) +venv +---- + +:mod:`venv` accepts a new parameter ``--prompt``. This parameter provides an +alternative prefix for the virtual environment. (Proposed by Łukasz.Balcerzak +and ported to 3.6 by Stéphane Wirtel in :issue:`22829`.) + + datetime -------- |