From a8c342465b977115b88a4f130833a2fd4c4e7356 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 20 Apr 2018 14:15:40 -0700 Subject: bpo-25427: Remove pyvenv (GH-5962) --- Doc/installing/index.rst | 5 ----- Doc/library/venv.rst | 4 ---- Doc/whatsnew/3.8.rst | 3 +++ Mac/Makefile.in | 2 -- Makefile.pre.in | 2 -- .../2018-03-02-16-23-31.bpo-25427.1mgMOG.rst | 3 +++ Tools/msi/tools/tools_files.wxs | 3 --- Tools/scripts/pyvenv | 17 ----------------- setup.py | 4 ++-- 9 files changed, 8 insertions(+), 35 deletions(-) create mode 100644 Misc/NEWS.d/next/Tools-Demos/2018-03-02-16-23-31.bpo-25427.1mgMOG.rst delete mode 100755 Tools/scripts/pyvenv diff --git a/Doc/installing/index.rst b/Doc/installing/index.rst index f9a224b..9f9f5a0 100644 --- a/Doc/installing/index.rst +++ b/Doc/installing/index.rst @@ -62,11 +62,6 @@ Key terms of the mailing list used to coordinate Python packaging standards development). -.. deprecated:: 3.6 - ``pyvenv`` was the recommended tool for creating virtual environments for - Python 3.3 and 3.4, and is `deprecated in Python 3.6 - `_. - .. versionchanged:: 3.5 The use of ``venv`` is now recommended for creating virtual environments. diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst index 6707be7..1fff7bc4 100644 --- a/Doc/library/venv.rst +++ b/Doc/library/venv.rst @@ -23,10 +23,6 @@ independent set of installed Python packages in its site directories. See :pep:`405` for more information about Python virtual environments. -.. note:: - The ``pyvenv`` script has been deprecated as of Python 3.6 in favor of using - ``python3 -m venv`` to help prevent any potential confusion as to which - Python interpreter a virtual environment will be based on. Creating virtual environments diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index 2f42a9f..11538e2 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -111,6 +111,9 @@ Deprecated Removed ======= +* The ``pyvenv`` script has been removed in favor of ``python3.8 -m venv`` + to help eliminate confusion as to what Python interpreter the ``pyvenv`` + script is tied to. (Contributed by Brett Cannon in :issue:`25427`.) Porting to Python 3.8 diff --git a/Mac/Makefile.in b/Mac/Makefile.in index 95fd4a2..0b32673 100644 --- a/Mac/Makefile.in +++ b/Mac/Makefile.in @@ -67,7 +67,6 @@ installunixtools: pydoc3 \ python3 \ python3-config \ - pyvenv \ ; \ do \ rm -f $${fn} ; \ @@ -118,7 +117,6 @@ altinstallunixtools: pydoc$(VERSION) \ python$(VERSION) \ python$(LDVERSION)-config \ - pyvenv-$(VERSION) \ ; \ do \ rm -f $${fn} ;\ diff --git a/Makefile.pre.in b/Makefile.pre.in index 3a7324f..a363f77 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1217,8 +1217,6 @@ bininstall: altbininstall (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) -rm -f $(DESTDIR)$(BINDIR)/2to3 (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3) - -rm -f $(DESTDIR)$(BINDIR)/pyvenv - (cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv) if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \ rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \ diff --git a/Misc/NEWS.d/next/Tools-Demos/2018-03-02-16-23-31.bpo-25427.1mgMOG.rst b/Misc/NEWS.d/next/Tools-Demos/2018-03-02-16-23-31.bpo-25427.1mgMOG.rst new file mode 100644 index 0000000..fe4495e --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2018-03-02-16-23-31.bpo-25427.1mgMOG.rst @@ -0,0 +1,3 @@ +Remove the pyvenv script in favor of ``python3 -m venv`` in order to lower +confusion as to what Python interpreter a virtual environment will be +created for. diff --git a/Tools/msi/tools/tools_files.wxs b/Tools/msi/tools/tools_files.wxs index 9c76b1b..3de6c92 100644 --- a/Tools/msi/tools/tools_files.wxs +++ b/Tools/msi/tools/tools_files.wxs @@ -8,9 +8,6 @@ - - - diff --git a/Tools/scripts/pyvenv b/Tools/scripts/pyvenv deleted file mode 100755 index 1fb42c6..0000000 --- a/Tools/scripts/pyvenv +++ /dev/null @@ -1,17 +0,0 @@ -#!/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 ' - f'`{executable} -m venv`', file=sys.stderr) - - rc = 1 - try: - import venv - venv.main() - rc = 0 - except Exception as e: - print('Error: %s' % e, file=sys.stderr) - sys.exit(rc) diff --git a/setup.py b/setup.py index 8536c35..170ade8 100644 --- a/setup.py +++ b/setup.py @@ -2291,7 +2291,7 @@ class PyBuildScripts(build_scripts): newoutfiles = [] newupdated_files = [] for filename in outfiles: - if filename.endswith(('2to3', 'pyvenv')): + if filename.endswith('2to3'): newfilename = filename + fullversion else: newfilename = filename + minoronly @@ -2359,7 +2359,7 @@ def main(): # check the PyBuildScripts command above, and change the links # created by the bininstall target in Makefile.pre.in scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3", - "Tools/scripts/2to3", "Tools/scripts/pyvenv"] + "Tools/scripts/2to3"] ) # --install-platlib -- cgit v0.12