summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Doc/whatsnew/3.6.rst5
-rw-r--r--Misc/NEWS6
-rwxr-xr-xTools/scripts/pyvenv6
3 files changed, 16 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst
index b374280701..22513cf8c4 100644
--- a/Doc/whatsnew/3.6.rst
+++ b/Doc/whatsnew/3.6.rst
@@ -197,7 +197,10 @@ Deprecated functions and types of the C API
Deprecated features
-------------------
-* None yet.
+* The ``pyvenv`` script has been deprecated in favour of ``python3 -m venv``.
+ This prevents confusion as to what Python interpreter ``pyvenv`` is
+ connected to and thus what Python interpreter will be used by the virtual
+ environment. See :issue:`25154`.
Removed
diff --git a/Misc/NEWS b/Misc/NEWS
index 6e3e2c32c8..7d2c79f85b 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -289,6 +289,12 @@ Windows
- Issue #25022: Removed very outdated PC/example_nt/ directory.
+Tools/Demos
+-----------
+
+- Issue #25154: The pyvenv script has been deprecated in favour of
+ `python3 -m venv`.
+
What's New in Python 3.5.1 release candidate 1?
===============================================
diff --git a/Tools/scripts/pyvenv b/Tools/scripts/pyvenv
index 978d691d1e..1043efcfa7 100755
--- a/Tools/scripts/pyvenv
+++ b/Tools/scripts/pyvenv
@@ -1,6 +1,12 @@
#!/usr/bin/env python3
if __name__ == '__main__':
import sys
+ import pathlib
+
+ executable = pathlib.Path(sys.executable or 'python3').name
+ print('WARNING: the pyenv script is deprecated in favour of '
+ '`{} -m venv`'.format(exeutable, file=sys.stderr))
+
rc = 1
try:
import venv