[issue19139] In venv, __VENV_NAME__ is the prompt, not the name
Roundup Robot added the comment: New changeset 7f913c6ada03 by Vinay Sajip in branch 'default': Closes #19139: Changed usage of __VENV_NAME__ and added __VENV_PROMPT__. http://hg.python.org/cpython/rev/7f913c6ada03 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19139 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19139] In venv, __VENV_NAME__ is the prompt, not the name
New submission from Paul Moore: The documentation for venv states that __VENV_NAME__ in scripts is replaced by the name of the virtualenv. In fact, it is replaced by context.prompt, which is the prompt, rather than the name. The various activate scripts are not consistent with this behaviour. Most seem to expect a prompt, but activate.csh does not. I would prefer __VENV_NAME__ to actually *be* the name, and either have an extra substitution variable __VENV_PROMPT__ or just leave it to the scripts themselves to format the prompt using the name. I could supply a patch (it's not hard) but would need agreement on the right approach. -- assignee: vinay.sajip components: Library (Lib) messages: 198795 nosy: pmoore, vinay.sajip priority: normal severity: normal status: open title: In venv, __VENV_NAME__ is the prompt, not the name versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19139 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19139] In venv, __VENV_NAME__ is the prompt, not the name
Vinay Sajip added the comment: Makes sense to me. Adding Carl Meyer to nosy, to see if he has a different view. -- nosy: +carljm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19139 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19139] In venv, __VENV_NAME__ is the prompt, not the name
Carl Meyer added the comment: Makes sense to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19139 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19139] In venv, __VENV_NAME__ is the prompt, not the name
Paul Moore added the comment: Cool. Patch attached (this fixes __VENV_NAME__ and implements __VENV_PROMPT__) -- keywords: +patch Added file: http://bugs.python.org/file31938/venv_prompt.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19139 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com