This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: venv module doesn't create a copy of python binary by default
Type: 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: brett.cannon, cheryl.sabella, docs@python, miss-islington, mkkot, terry.reedy, vinay.sajip
Priority: normal Keywords: patch

Created on 2018-12-09 18:05 by mkkot, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11144 merged python-dev, 2018-12-13 18:24
PR 11167 merged miss-islington, 2018-12-14 20:29
PR 11168 merged miss-islington, 2018-12-14 20:29
Messages (10)
msg331445 - (view) Author: Marcin (mkkot) * Date: 2018-12-09 18:05
Hello,
from documentation:
https://docs.python.org/3/library/venv.html

"python3 -m venv /path/to/new/virtual/environment

Running this command creates the target directory (creating any parent directories that don’t exist already) and places a pyvenv.cfg file in it with a home key pointing to the Python installation from which the command was run. It also creates a bin (or Scripts on Windows) subdirectory containing **a copy** of the python binary (or binaries, in the case of Windows)."

This is not true. In my case it creates symlinks to python binary by default. This is quite different. Upgrading system's python version broke my virtual environment because I believed I'm having a static copy of python binary in my virtual environment.
msg331648 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2018-12-11 20:03
Correct, that should say something like "copy/symlink of the Python binary/binaries (as appropriate by the platform or arguments used at environment creation time)."
msg331649 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2018-12-11 20:04
Obviously if you're willing to create a PR, Marcin, that would be great!
msg331766 - (view) Author: Marcin (mkkot) * Date: 2018-12-13 18:32
I'm very honoured with your request. Doing this for the first time with Python, hope you can accept it despite warnings.

https://github.com/python/cpython/pull/11144
msg331865 - (view) Author: miss-islington (miss-islington) Date: 2018-12-14 20:28
New changeset f5107dfd42121ef40b13eb678705802f0ff02cf9 by Miss Islington (bot) (mkkot) in branch 'master':
bpo-35450: reflect in docs that venv module is not always creating a … (GH-11144)
https://github.com/python/cpython/commit/f5107dfd42121ef40b13eb678705802f0ff02cf9
msg331866 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2018-12-14 20:37
New changeset 1fb312ce1f147ea84ecb6f5993a20d1a85c53dc3 by Brett Cannon (Miss Islington (bot)) in branch '3.6':
bpo-35450: reflect in docs that venv module is not always creating a copy of the Python binary (GH-11144) (GH-11168)
https://github.com/python/cpython/commit/1fb312ce1f147ea84ecb6f5993a20d1a85c53dc3
msg331867 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2018-12-14 20:38
New changeset d5176fe2bcd35dc8d70d13220b58fa7ccd05b47a by Brett Cannon (Miss Islington (bot)) in branch '3.7':
bpo-35450: reflect in docs that venv module is not always creating a copy of the Python binary (GH-11144) (GH-11167)
https://github.com/python/cpython/commit/d5176fe2bcd35dc8d70d13220b58fa7ccd05b47a
msg331869 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-14 20:44
Close this?
msg331877 - (view) Author: Marcin (mkkot) * Date: 2018-12-14 22:41
Actually the documentation hasn't been regenerated yet. I hope it will over night?
msg331901 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2018-12-15 13:49
It looks like the documentation has regenerated.  Thanks!
History
Date User Action Args
2022-04-11 14:59:09adminsetgithub: 79631
2018-12-15 13:49:17cheryl.sabellasetstatus: open -> closed

nosy: + cheryl.sabella
messages: + msg331901

resolution: fixed
stage: patch review -> resolved
2018-12-14 22:41:01mkkotsetmessages: + msg331877
2018-12-14 20:44:18terry.reedysetnosy: + terry.reedy

messages: + msg331869
versions: - Python 3.5
2018-12-14 20:38:25brett.cannonsetmessages: + msg331867
2018-12-14 20:37:46brett.cannonsetmessages: + msg331866
2018-12-14 20:29:26miss-islingtonsetpull_requests: + pull_request10405
2018-12-14 20:29:14miss-islingtonsetpull_requests: + pull_request10404
2018-12-14 20:28:55miss-islingtonsetnosy: + miss-islington
messages: + msg331865
2018-12-13 18:32:12mkkotsetmessages: + msg331766
2018-12-13 18:24:22python-devsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request10375
2018-12-11 20:04:13brett.cannonsetmessages: + msg331649
2018-12-11 20:03:41brett.cannonsetnosy: + brett.cannon
messages: + msg331648
2018-12-11 20:02:00brett.cannonsetstage: needs patch
versions: + Python 3.5, Python 3.6, Python 3.8
2018-12-09 18:24:42ned.deilysetnosy: + vinay.sajip
2018-12-09 18:05:37mkkotcreate