classification
Title: venv docs - doesn't match behavior
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Mariatta, csabella, docs@python, jason.coombs, jtrouverie
Priority: normal Keywords: easy, patch

Created on 2018-01-12 18:07 by jason.coombs, last changed 2018-02-21 04:27 by Mariatta. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5736 merged joack, 2018-02-18 16:35
PR 5786 merged miss-islington, 2018-02-21 04:21
PR 5785 merged miss-islington, 2018-02-21 04:21
Messages (10)
msg309867 - (view) Author: Jason R. Coombs (jason.coombs) * (Python committer) Date: 2018-01-12 18:07
In the docs for the venv command, it states:

> Changed in version 3.4: In earlier versions, if the target directory already existed, an error was raised, unless the --clear or --upgrade option was provided. Now, if an existing directory is specified, its contents are removed and the directory is processed as if it had been newly created.

However, that's not the behavior I observe:

$ python -m venv env
$ env/bin/pip install -q requests
$ python -m venv env          
$ env/bin/python -c "import requests"
$

Plus, I believe the _current_ behavior should be documented not in a 'change' note. I suggest the change note should read:

> Changed in version 3.4: In earlier versions, if the target directory already existed, an error was raised, unless the --clear or --upgrade option was provided.

And the third paragraph, following "It also creates an (initially empty...Lib\site-packages).":

> If an existing directory is specified, it will be re-used.
msg312310 - (view) Author: Joachim Trouverie (jtrouverie) * Date: 2018-02-18 15:32
Is there anybody working on this issue or can I make a PR ?
msg312311 - (view) Author: Jason R. Coombs (jason.coombs) * (Python committer) Date: 2018-02-18 15:38
@jtrouverie: Yes, please do. Thanks!
msg312445 - (view) Author: Cheryl Sabella (csabella) * Date: 2018-02-20 23:35
Does this need to be backported to 3.7 and 3.6?  Or can it be closed as resolved?
msg312451 - (view) Author: Jason R. Coombs (jason.coombs) * (Python committer) Date: 2018-02-21 01:46
I thought I saw the PR to the 3.6 branch. If that's not the case - a backport to 3.7 would be much appreciated.
msg312454 - (view) Author: Mariatta Wijaya (Mariatta) * (Python committer) Date: 2018-02-21 03:15
The PR was against master branch. So if backports are needed, you can add "needs backport to" labels on GH-5736 and the bot will take care of it.
msg312455 - (view) Author: Mariatta Wijaya (Mariatta) * (Python committer) Date: 2018-02-21 03:53
I've went ahead to initiate the backports.
msg312456 - (view) Author: Mariatta Wijaya (Mariatta) * (Python committer) Date: 2018-02-21 04:25
New changeset 98a86cbb9bed94a232263698041acd2775da3dad by Mariatta (Miss Islington (bot)) in branch '3.7':
bpo-32540: Update venv documentation (GH-5736)
https://github.com/python/cpython/commit/98a86cbb9bed94a232263698041acd2775da3dad
msg312457 - (view) Author: Mariatta Wijaya (Mariatta) * (Python committer) Date: 2018-02-21 04:26
New changeset 76c3f5eeb07aeb037da1ed6761dd9bd95e2c1d8d by Mariatta (Miss Islington (bot)) in branch '3.6':
bpo-32540: Update venv documentation (GH-5736)
https://github.com/python/cpython/commit/76c3f5eeb07aeb037da1ed6761dd9bd95e2c1d8d
msg312458 - (view) Author: Mariatta Wijaya (Mariatta) * (Python committer) Date: 2018-02-21 04:27
This should be good now.
Thanks!
History
Date User Action Args
2018-02-21 04:27:50Mariattasetstatus: open -> closed
resolution: fixed
messages: + msg312458

stage: patch review -> resolved
2018-02-21 04:26:23Mariattasetmessages: + msg312457
2018-02-21 04:25:39Mariattasetmessages: + msg312456
2018-02-21 04:21:56miss-islingtonsetpull_requests: + pull_request5567
2018-02-21 04:21:10miss-islingtonsetstage: backport needed -> patch review
pull_requests: + pull_request5566
2018-02-21 03:53:03Mariattasetstage: patch review -> backport needed
messages: + msg312455
versions: + Python 3.6, Python 3.7
2018-02-21 03:15:40Mariattasetnosy: + Mariatta
messages: + msg312454
2018-02-21 01:46:46jason.coombssetmessages: + msg312451
2018-02-20 23:35:43csabellasetnosy: + csabella
messages: + msg312445
2018-02-18 16:35:34joacksetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request5516
2018-02-18 15:38:37jason.coombssetmessages: + msg312311
2018-02-18 15:32:51jtrouveriesetnosy: + jtrouverie
messages: + msg312310
2018-02-01 23:56:25csabellasetkeywords: + easy
stage: needs patch
type: enhancement
versions: + Python 3.8
2018-01-12 18:07:13jason.coombscreate