classification
Title: Update `Virtual Environment` tutorial
Type: Stage: resolved
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, miss-islington, python-dev, shivnaren
Priority: normal Keywords: patch

Created on 2021-10-12 10:39 by shivnaren, last changed 2021-10-16 17:56 by shivnaren. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 28959 closed python-dev, 2021-10-14 22:22
PR 28981 merged shivnaren, 2021-10-15 15:11
Messages (3)
msg403722 - (view) Author: Shivnaren Srinivasan (shivnaren) * Date: 2021-10-12 10:39
Priority: Low

The Virtual Environment tutorial page (https://docs.python.org/3/tutorial/venv.html) doesn't specify how we can revert, or deactivate the `venv`.

This is quite a popular question on SO:
https://stackoverflow.com/questions/990754/how-to-leave-exit-deactivate-a-python-virtualenv

``deactivate`` worked for meā€”this could be added to the docs?

Happy to submit a PR.
msg403724 - (view) Author: Shivnaren Srinivasan (shivnaren) * Date: 2021-10-12 10:49
In the same vein, the specified script for windows is the old .bat file, though PowerShell is now the preferred shell (and for which a .ps1 script is generated in the venv directory).

We could make the .ps1 the default, and specify the .bat as an alternative?
msg404048 - (view) Author: miss-islington (miss-islington) Date: 2021-10-15 21:24
New changeset 11b2ae7f5bc0e7ebbfe944bb746a0b3dfcd7ff43 by srinivasan in branch 'main':
bpo-45442: Add deactivate step to venv tutorial. (GH-28981)
https://github.com/python/cpython/commit/11b2ae7f5bc0e7ebbfe944bb746a0b3dfcd7ff43
History
Date User Action Args
2021-10-16 17:56:04shivnarensetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-10-15 21:24:29miss-islingtonsetnosy: + miss-islington
messages: + msg404048
2021-10-15 15:11:45shivnarensetpull_requests: + pull_request27268
2021-10-14 22:22:13python-devsetkeywords: + patch
nosy: + python-dev

pull_requests: + pull_request27248
stage: patch review
2021-10-12 10:49:33shivnarensettype: enhancement ->
messages: + msg403724
2021-10-12 10:39:52shivnarencreate