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: Improvements to Powershell activate script for venv
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: paul.moore, python-dev, vinay.sajip
Priority: normal Keywords: patch

Created on 2013-07-17 10:11 by paul.moore, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
venv.diff paul.moore, 2013-07-17 10:11 review
Messages (2)
msg193217 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2013-07-17 10:11
Some small improvements to the powershell "Activate" script for venvs:

1. Can be run as a command, rather than needing to be dot sourced. This matches the behaviour of bat files, and of virtualenv's "activate" script, and avoids a source of user error.

2. Makes the "deactivate" command a function, so that a separate script is not needed, and deactivate can still be run after the environment has been deleted (a common error I make is to remove a temporary venv having forgotten to deactivate it first).

3. Corrects the prompt to have a prefix (name) rather than [(name) ]. This is likely a bug in venv itself, as __VENV_NAME__ is documented as being just the name, not the prompt string. But changing that could be a backward compatibility issue, so I'd prefer to put that in a separate patch if it's needed.

These modifications are based on the virtualenv activate.ps1 script, which has been in use for some time, so they should be relatively well tested.
msg193355 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-19 10:04
New changeset 1ff5e7505696 by Vinay Sajip in branch 'default':
Closes #18479: Changed venv Activate.ps1 to make deactivate a function, and removed Deactivate.ps1.
Date User Action Args
2022-04-11 14:57:48adminsetgithub: 62679
2013-07-19 10:04:06python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg193355

resolution: fixed
stage: patch review -> resolved
2013-07-17 10:11:08paul.moorecreate