classification
Title: venv should match virtualenv VIRTUAL_ENV_DISABLE_PROMPT config
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: Jack Bennett, python-dev, vinay.sajip
Priority: normal Keywords: patch

Created on 2017-01-18 14:39 by Jack Bennett, last changed 2017-01-27 12:44 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
fix-29308-01.diff vinay.sajip, 2017-01-24 13:15 First cut patch to address issue. review
Messages (4)
msg285729 - (view) Author: Jack Bennett (Jack Bennett) Date: 2017-01-18 14:39
virtualenv has https://virtualenv.pypa.io/en/latest/reference/#envvar-VIRTUAL_ENV_DISABLE_PROMPT to block activate from trying to overwrite the prompt function. 

Users of venv can't do that, 3.6 added prompt but even None defaults to the current folder name.

If I may suggest either respecting the virtualenv variable or perhaps prompt=False

Specifically we've ran into this in powershell while making cmder stricter on the prompt over here: https://github.com/cmderdev/cmder/issues/1207

Thanks, Jack
msg286182 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2017-01-24 13:15
Other scripts (activate, activate.csh, activate.csh) support this environment variable already. This patch updates Activate.ps1 to respect the variable - can you confirm if this change works for you?
msg286189 - (view) Author: Jack Bennett (Jack Bennett) Date: 2017-01-24 14:29
That works fine here.

Thank you

On 24 January 2017 at 13:15, Vinay Sajip <report@bugs.python.org> wrote:

>
> Vinay Sajip added the comment:
>
> Other scripts (activate, activate.csh, activate.csh) support this
> environment variable already. This patch updates Activate.ps1 to respect
> the variable - can you confirm if this change works for you?
>
> ----------
> assignee:  -> vinay.sajip
> keywords: +patch
> stage:  -> patch review
> Added file: http://bugs.python.org/file46407/fix-29308-01.diff
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue29308>
> _______________________________________
>
msg286352 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2017-01-27 12:44
New changeset 91b949dc1984 by Vinay Sajip in branch '3.5':
Fixes #29308: Respect VIRTUAL_ENV_DISABLE_PROMPT in Activate.ps1.
https://hg.python.org/cpython/rev/91b949dc1984

New changeset d3890b44159c by Vinay Sajip in branch '3.6':
Fixes #29308: Merged fix from 3.5.
https://hg.python.org/cpython/rev/d3890b44159c

New changeset aef895fef120 by Vinay Sajip in branch 'default':
Closes #29308: Merged fix from 3.6.
https://hg.python.org/cpython/rev/aef895fef120
History
Date User Action Args
2017-01-27 12:44:05python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg286352

resolution: fixed
stage: patch review -> resolved
2017-01-24 14:29:29Jack Bennettsetmessages: + msg286189
2017-01-24 13:15:16vinay.sajipsetfiles: + fix-29308-01.diff
messages: + msg286182

assignee: vinay.sajip
keywords: + patch
stage: patch review
2017-01-18 14:54:38yan12125setnosy: + vinay.sajip
2017-01-18 14:39:37Jack Bennettcreate