summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorCooper Lees <cooper@fb.com>2019-06-17 18:18:14 (GMT)
committerƁukasz Langa <lukasz@langa.pl>2019-06-17 18:18:13 (GMT)
commit4acdbf11b1fae1af24c47413a6caa593010d1b6f (patch)
treeecc8ede683fa9fc0067326deefd23af977e7284c /Doc
parentca7b504a4d4c3a5fde1ee4607b9501c2bab6e743 (diff)
downloadcpython-4acdbf11b1fae1af24c47413a6caa593010d1b6f.zip
cpython-4acdbf11b1fae1af24c47413a6caa593010d1b6f.tar.gz
cpython-4acdbf11b1fae1af24c47413a6caa593010d1b6f.tar.bz2
bpo-34556: Add --upgrade-deps to venv module (#13100)
Add --upgrade-deps to venv module - This allows for pip + setuptools to be automatically upgraded to the latest version on PyPI - Update documentation to represent this change bpo-34556: Add --upgrade to venv module
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/venv.rst7
-rw-r--r--Doc/using/venv-create.inc7
2 files changed, 12 insertions, 2 deletions
diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst
index 4f083a3..d3d5ae2 100644
--- a/Doc/library/venv.rst
+++ b/Doc/library/venv.rst
@@ -97,7 +97,7 @@ creation according to their needs, the :class:`EnvBuilder` class.
.. class:: EnvBuilder(system_site_packages=False, clear=False, \
symlinks=False, upgrade=False, with_pip=False, \
- prompt=None)
+ prompt=None, upgrade_deps=False)
The :class:`EnvBuilder` class accepts the following keyword arguments on
instantiation:
@@ -123,12 +123,17 @@ creation according to their needs, the :class:`EnvBuilder` class.
(defaults to ``None`` which means directory name of the environment would
be used).
+ * ``upgrade_deps`` -- Update the base venv modules to the latest on PyPI
+
.. versionchanged:: 3.4
Added the ``with_pip`` parameter
.. versionadded:: 3.6
Added the ``prompt`` parameter
+ .. versionadded:: 3.8
+ Added the ``upgrade_deps`` 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/using/venv-create.inc b/Doc/using/venv-create.inc
index 1ada83c..8fd107b 100644
--- a/Doc/using/venv-create.inc
+++ b/Doc/using/venv-create.inc
@@ -35,7 +35,7 @@ your :ref:`Python installation <using-on-windows>`::
The command, if run with ``-h``, will show the available options::
usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear]
- [--upgrade] [--without-pip] [--prompt PROMPT]
+ [--upgrade] [--without-pip] [--prompt PROMPT] [--upgrade-deps]
ENV_DIR [ENV_DIR ...]
Creates virtual Python environments in one or more target directories.
@@ -60,10 +60,15 @@ The command, if run with ``-h``, will show the available options::
environment (pip is bootstrapped by default)
--prompt PROMPT Provides an alternative prompt prefix for this
environment.
+ --upgrade-deps Upgrade core dependencies: pip setuptools to the
+ latest version in PyPI
Once an environment has been created, you may wish to activate it, e.g. by
sourcing an activate script in its bin directory.
+.. versionchanged:: 3.8
+ Add ``--upgrade-deps`` option to upgrade pip + setuptools to the latest on PyPI
+
.. versionchanged:: 3.4
Installs pip by default, added the ``--without-pip`` and ``--copies``
options