summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2018-12-10 16:11:21 (GMT)
committerGitHub <noreply@github.com>2018-12-10 16:11:21 (GMT)
commit1c3de541e64f75046b20cdd27bada1557e550bcd (patch)
tree958a34f1023404eb33b87a55ed52b34e3702ccd8 /Doc
parentb6ef6f69a9afc979640a5f9883f799de1364bff7 (diff)
downloadcpython-1c3de541e64f75046b20cdd27bada1557e550bcd.zip
cpython-1c3de541e64f75046b20cdd27bada1557e550bcd.tar.gz
cpython-1c3de541e64f75046b20cdd27bada1557e550bcd.tar.bz2
bpo-34977: Use venv redirector instead of original python.exe on Windows (GH-11029)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/venv.rst17
-rw-r--r--Doc/whatsnew/3.7.rst10
2 files changed, 20 insertions, 7 deletions
diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst
index 7058d3a..efa51e2 100644
--- a/Doc/library/venv.rst
+++ b/Doc/library/venv.rst
@@ -130,7 +130,6 @@ creation according to their needs, the :class:`EnvBuilder` class.
.. 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.
@@ -177,16 +176,15 @@ creation according to their needs, the :class:`EnvBuilder` class.
.. method:: setup_python(context)
- Creates a copy of the Python executable (and, under Windows, DLLs) in
- the environment. On a POSIX system, if a specific executable
- ``python3.x`` was used, symlinks to ``python`` and ``python3`` will be
- created pointing to that executable, unless files with those names
- already exist.
+ Creates a copy of the Python executable in the environment on POSIX
+ systems. If a specific executable ``python3.x`` was used, symlinks to
+ ``python`` and ``python3`` will be created pointing to that executable,
+ unless files with those names already exist.
.. method:: setup_scripts(context)
Installs activation scripts appropriate to the platform into the virtual
- environment.
+ environment. On Windows, also installs the ``python[w].exe`` scripts.
.. method:: post_setup(context)
@@ -194,6 +192,11 @@ creation according to their needs, the :class:`EnvBuilder` class.
implementations to pre-install packages in the virtual environment or
perform other post-creation steps.
+ .. versionchanged:: 3.7.2
+ Windows now uses redirector scripts for ``python[w].exe`` instead of
+ copying the actual binaries, and so :meth:`setup_python` does nothing
+ unless running from a build in the source tree.
+
In addition, :class:`EnvBuilder` provides this utility method that can be
called from :meth:`setup_scripts` or :meth:`post_setup` in subclasses to
assist in installing custom scripts into the virtual environment.
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index 8b9b64f..3e94a61 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -2512,3 +2512,13 @@ In 3.7.1 the :mod:`tokenize` module now implicitly emits a ``NEWLINE`` token
when provided with input that does not have a trailing new line. This behavior
now matches what the C tokenizer does internally.
(Contributed by Ammar Askar in :issue:`33899`.)
+
+Notable changes in Python 3.7.2
+===============================
+
+In 3.7.2, :mod:`venv` on Windows no longer copies the original binaries, but
+creates redirector scripts named ``python.exe`` and ``pythonw.exe`` instead.
+This resolves a long standing issue where all virtual environments would have
+to be upgraded or recreated with each Python update. However, note that this
+release will still require recreation of virtual environments in order to get
+the new scripts.