]> granicus.if.org Git - python/commitdiff
Issue #25154: Deprecate the pyvenv script.
authorBrett Cannon <brett@python.org>
Fri, 16 Oct 2015 22:14:27 +0000 (15:14 -0700)
committerBrett Cannon <brett@python.org>
Fri, 16 Oct 2015 22:14:27 +0000 (15:14 -0700)
This was done so as to move users to `python3 -m venv` which prevents
confusion over which Python interpreter will be used in the virtual
environment when more than one is installed.

Doc/whatsnew/3.6.rst
Misc/NEWS
Tools/scripts/pyvenv

index b3742807019fe080c91beaa43d867a489a4830ef..22513cf8c433787f2c771594b1c48c43063526a3 100644 (file)
@@ -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
index 6e3e2c32c8f5625fb68b99317d3d2ae6c6115b82..7d2c79f85bd3650b2e7061b28cb99c8a17553c64 100644 (file)
--- 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?
 ===============================================
index 978d691d1ee692aaa41b9367855c23d7649c230e..1043efcfa7d1289f182379b0fba55917e769488a 100755 (executable)
@@ -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