Commit Graph

103 Commits

Author SHA1 Message Date
Zackery Spytz
c82dda1e08 bpo-35328: Set VIRTUAL_ENV_PROMPT at venv activation (GH-21587)
Co-Authored-By: Baptiste Darthenay <baptiste.darthenay@gmail.com>
2020-07-28 09:41:57 +01:00
Miro Hrončok
ef16958d17 bpo-38972: Fix typos in PowerShell Execution Policies links (GH-20383) 2020-05-25 16:54:14 +02:00
Jonathan Goble
da7d1f0408 Fix the URL to fishshell.com (GH-20251) 2020-05-19 21:59:46 -07:00
Derek Keeler
45217af29c bpo-38972: Link to instructions to change PowerShell execution policy (GH-19131) 2020-04-02 12:00:21 -07:00
Anthony Sottile
58ec58a42b bpo-39656: Ensure bin/python3.# is always present in virtual environments on POSIX (GH-19030) 2020-03-17 07:29:11 +00:00
schwarzichet
787b6d548c bpo-39505: delete the redundant '/' in $env:VIRTUAL_ENV (GH-18290) 2020-02-05 08:16:58 +00:00
Vinay Sajip
7d6378051f bpo-38901: Allow setting a venv's prompt to the basename of the current directory. (GH-17946)
When a prompt value of '.' is specified, os.path.basename(os.getcwd()) is used to
configure the prompt for the created venv.
2020-01-14 20:49:30 +00:00
Dima
4b0d91aab4 venv: Suppress warning message when bash hashing is disabled. (GH-17966)
When using python's built-in venv activaton script
warnings are printed when hashing is disabled in
bash or zsh, like;

`bash: hash: hashing disabled`

This output is not really useful to the end-user and has
been disabled in `virtualenv` for long.

This commit is based on:
28e85bcd80
2020-01-14 20:47:59 +00:00
Brett Cannon
1df65f7c6c Fix old mention of virtualenv (GH-17417)
Automerge-Triggered-By: @brettcannon
2019-11-29 15:37:08 -08:00
Tzu-ping Chung
d9aa216d49 bpo-38927: Use python -m pip to upgrade venv deps (GH-17403)
I suggest you add `bpo-NNNNN: ` as a prefix for the first commit for future PRs. Thanks!
2019-11-27 20:25:23 +00:00
Brett Cannon
84b1ff6560 bpo-38899: virtual environment activation for fish should use source (GH-17359)
The previously documented use of `.` is considered deprecated (https://fishshell.com/docs/current/commands.html#source).


https://bugs.python.org/issue38899



Automerge-Triggered-By: @brettcannon
2019-11-22 23:32:27 -08:00
James Abel
e310af9e29 bpo-38344: Fix syntax in activate.bat (GH-16533) 2019-10-07 14:07:19 -07:00
Daniel Abrahamsson
5209e586b7 bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15330)
Before, running deactivate from a bash shell configured to treat undefined variables as errors (`set -u`) would produce a warning:

``` 
$ python3 -m venv test
$ source test/bin/activate
(test) $ deactivate
-bash: $1: unbound variable
```
2019-09-11 07:58:56 -07:00
Steve Dower
574b324bdc bpo-36634: Fixes activate.bat when existing values contain double quotes (GH-15924) 2019-09-11 15:41:21 +01:00
Brett Cannon
48ede6b8f6 bpo-37663: have venv activation scripts all consistently use __VENV_PROMPT__ for prompt customization (GH-14941)
The activation scripts generated by venv were inconsistent in how they changed the shell's prompt. Some used `__VENV_PROMPT__` exclusively, some used `__VENV_PROMPT__` if it was set even though by default `__VENV_PROMPT__` is always set and the fallback matched the default, and one ignored `__VENV_PROMPT__` and used `__VENV_NAME__` instead (and even used a differing format to the default prompt). This change now has all activation scripts use `__VENV_PROMPT__` only and relies on the fact that venv sets that value by default.

The color of the customization is also now set in fish to the blue from the Python logo for as hex color support is built into that shell (much like PowerShell where the built-in green color is used).
2019-08-21 15:58:01 -07:00
Derek Keeler
732775d6be bpo-37354: Make Powershell Activate.ps1 script static to allow for signing (GH-14967)
- Remove use of replacement text in the script
- Make use of the pyvenv.cfg file for prompt value.
- Add parameters to allow more flexibility
- Make use of the current path, and assumptions about where env puts things, to compensate
- Make the script a bit more 'idiomatic' Powershell
- Add script documentation (Get-Help .\.venv\Scripts\Activate.ps1 shows PS help page now
2019-08-12 13:06:02 -07:00
Steve Dower
9048c49322 bpo-37369: Fix initialization of sys members when launched via an app container (GH-14428)
sys._base_executable is now always defined on all platforms, and can be overridden through configuration.
Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable
2019-06-29 10:34:11 -07:00
Cooper Lees
4acdbf11b1 bpo-34556: Add --upgrade-deps to venv module (#13100)
Add --upgrade-deps to venv module
- This allows for pip + setuptools to be automatically upgraded to the latest version on PyPI
- Update documentation to represent this change

bpo-34556: Add --upgrade to venv module
2019-06-17 19:18:13 +01:00
Lorenz Mende
6955d44b41 bpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321)
The script needs to be updated to support win 10/ 1803 chcp.com command (output has trailing dot)





https://bugs.python.org/issue34144
2019-04-10 10:19:16 -07:00
Steve Dower
4a9a505d6f bpo-36441: Fixes creating a venv when debug binaries are installed. (#12566) 2019-03-27 08:14:53 -07:00
Steve Dower
8bba81fd55 bpo-35978: Correctly skips venv tests in venvs (GH-12220)
Also fixes venvs from the build directory on Windows.
2019-03-21 10:04:21 -07:00
Cheryl Sabella
d5a70c6b03 bpo-35661: Store the venv prompt in pyvenv.cfg (GH-11440) 2019-03-08 17:01:27 -05:00
Steve Dower
a8474d025c bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)
After reading __PYVENV_LAUNCHER__ we now set sys._base_executable value for later use.
Make the same changes for macOS to avoid extra platform checks.
2019-02-03 23:19:38 -08:00
Steve Dower
a1f9a3332b bpo-35854: Fix EnvBuilder and --symlinks in venv on Windows (GH-11700) 2019-01-30 13:49:14 -08:00
Steve Dower
1c3de541e6 bpo-34977: Use venv redirector instead of original python.exe on Windows (GH-11029) 2018-12-10 08:11:21 -08:00