[issue27285] Deprecate pyvenv in favor of python3 -m venv
New submission from Steve Piercy: Per https://bugs.python.org/issue25154 `pyvenv` is deprecated in favor of `python3 -m venv`. The docs for Python 3.5+ need to be updated accordingly. ---------- assignee: docs@python components: Documentation messages: 268104 nosy: docs@python, stevepiercy priority: normal severity: normal status: open title: Deprecate pyvenv in favor of python3 -m venv type: enhancement versions: Python 3.5, Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Berker Peksag added the comment: It's actually deprecated in Python 3.6: https://docs.python.org/dev/whatsnew/3.6.html#deprecated-features ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch versions: -Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Steve Piercy added the comment: I saw the patch in 3.6, yet the discussion in issue #25154 called for deprecation in 3.5.1. Was deprecation of `pyvenv` supposed to be implemented in 3.5.1? I couldn't find any other relevant discussion, so apologies for jumping in uninformed. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Changes by Berker Peksag <berker.peksag@gmail.com>: ---------- nosy: +brett.cannon _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Brett Cannon added the comment: Basically I changed my mind about adding the code deprecation in 3.5.1 since it wasn't fair to people to run into that in a bugfix release. Documenting the deprecation, though, can happen in Python 3.5.1 as well as updating the documentation of the venv module to only use `python3 -m venv` which I missed the first time through. ---------- assignee: docs@python -> brett.cannon title: Deprecate pyvenv in favor of python3 -m venv -> Document the deprecation of pyvenv in favor of `python3 -m venv` _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Steve Piercy added the comment: I forgot to include the specific URL to update: https://docs.python.org/3/installing/ There may be other places. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Steve Piercy added the comment: One more. https://docs.python.org/3/library/venv.html Should that be updated for 3.5.1 as well as 3.6? ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Steve Piercy added the comment: See also: https://github.com/pypa/python-packaging-user-guide/issues/242 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Brett Cannon added the comment: Documenting the deprecation in 3.5 is fine. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Steve Piercy added the comment: I'd like to take on this issue and submit a patch for consideration by 2016-06-26. Please let me know if anyone is working on it. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Brett Cannon added the comment: No one is working on it, Steve, so feel free to write a patch. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Steve Piercy added the comment: After looking into this issue, I need guidance to better define scope and intent, and how to go about submitting the changes. I found 81 occurrences of the term `pyvenv` in the documentation, either in reST files or docstrings, across about a dozen files. 1. Should I obliterate any mention of `pyvenv` (excluding HISTORY and whatsnew) or preserve a mention or two of it? For example, "`pyvenv` was the recommended tool for creating virtual environments for Python 3.3 and 3.4, and is deprecated in Python 3.6. Beginning in Python 3.5, the use of `venv` is recommended." 2. Is it preferred to submit one patch for all edited files, or one patch per edited file? TIA for any guidance. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
R. David Murray added the comment: In this case I think one patch is good. The deprecation should mention pyvenv in the main venv docs (and maybe installing), but probably nowhere else. See the deprecated-removed sphinx tag. ---------- nosy: +r.david.murray _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Steve Piercy added the comment: Patch attached for review. Notes: - I built the docs using Sphinx 1.4.1, whereas I think 1.3.3 is in use in production. If you upgrade, you will need to specify the language for syntax highlighting, else you will get hundreds of these error messages: /Users/stevepiercy/projects/cpython/Doc/distutils/examples.rst:250: WARNING: Could not lex literal_block as "python3". Highlighting skipped. I made my changes accordingly, as they are backward compatible to Sphinx 1.3.3 and will be one fewer thing to update in future releases. - I removed the file Doc/using/scripts.rst because it became obsolete. This caused warnings in Doc/whatsnew/3.3.rst and Doc/whatsnew/3.4.rst which reference the obsolete file. - I updated a lot of links to https://packaging.python.org/ and others to save a redirect and to get link checking to pass. - I replaced confusing colloquialisms of "env", "venv", and "virtualenv" with "virtual environment" as appropriate. This clarifies that a virtual environment is the thing created, whereas `venv`, `pyvenv`, and `virtualenv` are modules/scripts/commands that create a virtual environment, or that "env" is the name of a directory. - Minor grammar, punctuation, and reST fixes. ---------- hgrepos: +346 keywords: +patch Added file: http://bugs.python.org/file43598/pyvenv-to-venv.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Brett Cannon added the comment: Thanks for the patch, Steve! Since this is a bug fix I may take until after 3.6b1 goes out to get reviewed and committed since I need to get any semantic changes in before then (b1 is due out in Sep). So if this patch lingers for a couple months, that will be why. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Roundup Robot added the comment: New changeset 414f67e000a7 by Brett Cannon in branch 'default': Issue #27285: Document the deprecation of the pyvenv script. https://hg.python.org/cpython/rev/414f67e000a7 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Brett Cannon added the comment: Thanks for the patch, Steve! I went ahead and got this done now when I realized your patch touched so many files, thus waiting could lead to skew and the need to update the patch needlessly. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Steve Piercy added the comment: Thank you! ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Martin Panter added the comment: Buildbot has errors and warnings: http://buildbot.python.org/all/builders/Docs%203.x/builds/1729/steps/suspici... make -C Doc/ suspicious . . . writing output... [ 83%] library/venv WARNING: [library/venv:353] ":param" found in " :param context: The information for the virtual environment" . . . /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.3.rst:110: WARNING: undefined label: scripts-pyvenv (if the link has no caption the label must precede a section header) /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:200: WARNING: undefined label: scripts-pyvenv (if the link has no caption the label must precede a section header) /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:1992: WARNING: undefined label: scripts-pyvenv (if the link has no caption the label must precede a section header) /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:1996: WARNING: undefined label: scripts-pyvenv (if the link has no caption the label must precede a section header) /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:2462: WARNING: undefined label: scripts-pyvenv (if the link has no caption the label must precede a section header) WARNING: Found 2/299 unused rules: library/venv,,:param,:param context: The information for the environment creation request tutorial/venv,,:c7b9645a6f35,Python 3.4.3+ (3.4:c7b9645a6f35+, May 22 2015, 09:31:25) . . . Suspicious check complete; look for any errors in the above output or in build/suspicious/suspicious.csv. If all issues are false positives, append that file to tools/susp-ignored.csv. Looks like Doc/tools/susp-ignored.csv and the whatsnew files need adjusting. ---------- nosy: +martin.panter status: closed -> open _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Steve Piercy added the comment: I've attached a patch for the buildbot error at [library/venv:353]. However, as noted in my [second bullet point](http://bugs.python.org/issue27285#msg269649): - I removed the file Doc/using/scripts.rst because it became obsolete. This caused warnings in Doc/whatsnew/3.3.rst and Doc/whatsnew/3.4.rst which reference the obsolete file. I couldn't find a policy that addresses what to do in this situation, so I left it to the council of elders to provide me with their sage guidance. I'll submit a patch as soon as I know which path to follow. ---------- Added file: http://bugs.python.org/file43681/pyvenv-to-venv.update-susp-ignored.csv.patc... _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Roundup Robot added the comment: New changeset 2a34cef7681b by Ned Deily in branch 'default': Issue #27285: Cleanup "suspicious" warnings. https://hg.python.org/cpython/rev/2a34cef7681b ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Ned Deily added the comment: Thanks for the fix up, Steve. For 3.6.0a3, I chose to just change the 3.3 and 3.4 whatsnew references to just in-line code without any links. If anyone wants something fancier, please feel free to expand on it (after the release). (BTW, Steve, when you submit an updated patch, please do so against the current tip of the branch; most of your update patch had already been committed by Brett.) ---------- nosy: +ned.deily status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Steve Piercy added the comment: Thanks, Ned. This was my first hg patch. I'm learning. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
Roundup Robot added the comment: New changeset 0d8f139a6e19 by Martin Panter in branch 'default': Issue #27285: Cleanup leftover susp-ignored entry after text was changed https://hg.python.org/cpython/rev/0d8f139a6e19 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27285> _______________________________________
participants (7)
-
Berker Peksag -
Brett Cannon -
Martin Panter -
Ned Deily -
R. David Murray -
Roundup Robot -
Steve Piercy