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.

Title: Add --prompt option to venv
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, matrixise, ncoghlan, python-dev, vinay.sajip, Łukasz.Balcerzak
Priority: normal Keywords: patch

Created on 2014-11-09 17:59 by Łukasz.Balcerzak, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
venv-prompt-argument.patch Łukasz.Balcerzak, 2014-11-09 17:59 review
venv-prompt-argument-3_5.patch matrixise, 2015-04-16 19:24 review
venv-prompt-argument-3_6.patch matrixise, 2015-11-06 14:13 review
Messages (7)
msg230894 - (view) Author: Łukasz Balcerzak (Łukasz.Balcerzak) * Date: 2014-11-09 17:59
virtualenv tool allows to set alternative prompt prefix, Python's venv module should allow this too.

Basically, this allows one to run:

python -mvenv --prompt Quux myenv

And see "(Quux)" as a prefix after environment activation (instead of the "myenv" in this case).
msg241265 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2015-04-16 19:24
Based on the patch of Łukasz, I have updated it to the last revision of Python 3.5a3 (today, 16th April)

stephane@sg1 ~/p/c/bin> ./python3.5 --version
Python 3.5.0a3+
stephane@sg1 ~/p/c/bin> ./python3.5
Python 3.5.0a3+ (default:c969413584cf+, Apr 16 2015, 15:17:46)

I tested the patch, this one works fine and the prompt is really changed if we specify it on the command line of -m venv
msg241303 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-04-17 01:31
Thanks! The patch looks good to me. Some review comments:
msg241329 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2015-04-17 13:27
ok, I will propose an update with the comments of the review.
msg254193 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2015-11-06 13:40
oops, forgotten to provide the patch :/
msg254197 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2015-11-06 14:13
Hi @berker.peksag

Please, could you review this patch, I have followed your remarks and adjust the patch.

Thank you
msg272080 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-08-06 09:44
New changeset 6703847eeb31 by Vinay Sajip in branch 'default':
Closes #22829: Added --prompt option to venv.
Date User Action Args
2022-04-11 14:58:10adminsetgithub: 67018
2016-08-06 09:44:01python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg272080

resolution: fixed
stage: patch review -> resolved
2015-11-06 14:59:18matrixisesetversions: + Python 3.6, - Python 3.5
2015-11-06 14:13:08matrixisesetfiles: + venv-prompt-argument-3_6.patch

messages: + msg254197
2015-11-06 13:40:47matrixisesetmessages: + msg254193
2015-04-17 13:27:21matrixisesetmessages: + msg241329
2015-04-17 01:31:16berker.peksagsetnosy: + berker.peksag
messages: + msg241303

components: + Library (Lib)
type: enhancement
stage: patch review
2015-04-16 19:24:23matrixisesetfiles: + venv-prompt-argument-3_5.patch
nosy: + matrixise
messages: + msg241265

2014-11-10 07:12:49ned.deilysetnosy: + vinay.sajip, ncoghlan
2014-11-09 17:59:17Łukasz.Balcerzakcreate