summaryrefslogtreecommitdiffstats
path: root/Lib/venv/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* GH-127724: don't use sysconfig to calculate the venv local include path ↵Filipe Laíns 🇵🇸2024-12-121-3/+12
| | | | (#127731)
* gh-124651: Quote template strings in `venv` activation scripts (GH-124712)Y52024-10-211-5/+37
| | | | This patch properly quotes template strings in `venv` activation scripts. This mitigates potential command injection.
* gh-119535: Support 𝜋thon in Python 3.14 venvs (#125035)foreignmeloman2024-10-151-1/+1
|
* gh-91818: Use default program name in the CLI of many modules (GH-124867)Serhiy Storchaka2024-10-091-2/+1
| | | | | | As argparse now detects by default when the code was run as a module. This leads to using the actual executable name instead of simply "python" to display in the usage message ("usage: python -m ...").
* gh-119535: python𝜋 (#119536)Shantanu2024-10-061-2/+5
| | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-124212: Fix undefined variable in error message in venv (GH-124211)Jacek2024-09-181-1/+1
|
* gh-90329: Add _winapi.GetLongPathName and GetShortPathName and use in venv ↵Steve Dower2024-04-151-1/+28
| | | | to reduce warnings (GH-117817)
* gh-89427: Provide the original prompt value for VIRTUAL_ENV_PROMPT (GH-106726)Jim Porter2024-01-231-2/+1
| | | | | | | | | | This improves the implementation in gh-106643. Previously, venv passed "(<prompt>) " to the activation scripts, but we want to provide the original value so that users can inspect it in the $VIRTUAL_ENV_PROMPT env var. Note: Lib/venv/scripts/common/Activate.ps1 surrounded the prompt value with parens a second time, so no change was necessary in that file.
* gh-112984 Update Windows build and installer for free-threaded builds ↵Steve Dower2024-01-171-103/+155
| | | | (GH-113129)
* GH-83417: Allow `venv` to add a `.gitignore` file to environments via a new ↵Brett Cannon2023-09-151-4/+32
| | | | | | | | `scm_ignore_file` parameter (GH-108125) This feature is off by default via code but on by default via the CLI. The `.gitignore` file contains `*` which causes the entire directory to be ignored. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-95299: Stop installing setuptools as a part of ensurepip and venv (#101039)Pradyun Gedam2023-04-181-2/+2
| | | | | | | Remove the bundled setuptools wheel from ensurepip, and stop installing setuptools in environments created by venv. Co-Authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-100676: Improve description for venv --upgrade-deps (GH-100678)Rupa Lahiri2023-01-021-1/+1
|
* gh-100176: venv: Remove redundant compat code for Python <= 3.2 (#100177)Hugo van Kemenade2022-12-141-78/+71
| | | | | | | | | | gh-100176: Remove redundant compat code for Python 3.2 and older Python 3.2 has been EOL since 2016-02-20 and 2.7 since 2020-01-01, so we can remove this old compatibility check and unindent the old else-block. Also, in the unindented block, replace a .format() call with an f-string. Plus similar changes in the documentation.
* gh-98741: Remove useless check_home usage from is_python_build usage (GH-98743)Henry Schreiner2022-10-261-3/+3
|
* gh-98251: Allow venv to pass along PYTHON* variables to pip and ensurepip ↵Steve Dower2022-10-141-9/+19
| | | | when they do not impact path resolution (GH-98259)
* gh-96861: Check for unset sys.executable during venv creation. (GH-96887)Vinay Sajip2022-09-171-0/+5
|
* gh-94214: Add venv context.lib_path and document the context (GH-94221)Paul Moore2022-06-261-0/+1
|
* gh-92675: venv: Fix ensure_directories() to again accept a Path for env_dir ↵David Foster2022-05-191-1/+1
| | | | | | | (#92676) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* bpo-43218: Prevent venv creation when the target directory contains a PATH ↵Dustin Rodrigues2022-04-131-0/+3
| | | | separator. (GH-24530)
* bpo-45413: Define "posix_venv", "nt_venv" and "venv" sysconfig installation ↵Miro Hrončok2022-03-181-14/+17
| | | | | | | | | | | | | | | | | | | schemes (GH-31034) Define *posix_venv* and *nt_venv* sysconfig installation schemes to be used for bootstrapping new virtual environments. Add *venv* sysconfig installation scheme to get the appropriate one of the above. The schemes are identical to the pre-existing *posix_prefix* and *nt* install schemes. The venv module now uses the *venv* scheme to create new virtual environments instead of hardcoding the paths depending only on the platform. Downstream Python distributors customizing the *posix_prefix* or *nt* install scheme in a way that is not compatible with the install scheme used in virtual environments are encouraged not to customize the *venv* schemes. When Python itself runs in a virtual environment, sysconfig.get_default_scheme and sysconfig.get_preferred_scheme with `key="prefix"` returns *venv*.
* bpo-41011: venv -- add more variables to pyvenv.cfg (GH-30382)andrei kulakov2022-01-071-0/+24
|
* bpo-45337: Use the realpath of the new executable when creating a venv on ↵Steve Dower2021-10-071-7/+17
| | | | Windows (GH-28663)
* bpo-43749: Ensure current exe is copied when using venv on windows (GH-25216)Ian Norton2021-05-191-2/+3
| | | Automerge-Triggered-By: GH:vsajip
* bpo-39656: Ensure `bin/python3.#` is always present in virtual environments ↵Anthony Sottile2020-03-171-1/+1
| | | | on POSIX (GH-19030)
* bpo-38901: Allow setting a venv's prompt to the basename of the current ↵Vinay Sajip2020-01-141-0/+2
| | | | | | 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.
* bpo-38927: Use python -m pip to upgrade venv deps (GH-17403)Tzu-ping Chung2019-11-271-3/+3
| | | I suggest you add `bpo-NNNNN: ` as a prefix for the first commit for future PRs. Thanks!
* bpo-37369: Fix initialization of sys members when launched via an app ↵Steve Dower2019-06-291-37/+56
| | | | | | | 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
* bpo-34556: Add --upgrade-deps to venv module (#13100)Cooper Lees2019-06-171-5/+29
| | | | | | | 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
* bpo-36441: Fixes creating a venv when debug binaries are installed. (#12566)Steve Dower2019-03-271-0/+3
|
* bpo-35978: Correctly skips venv tests in venvs (GH-12220)Steve Dower2019-03-211-7/+12
| | | Also fixes venvs from the build directory on Windows.
* bpo-35661: Store the venv prompt in pyvenv.cfg (GH-11440)Cheryl Sabella2019-03-081-0/+2
|
* bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)Steve Dower2019-02-041-4/+1
| | | | 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.
* bpo-35854: Fix EnvBuilder and --symlinks in venv on Windows (GH-11700)Steve Dower2019-01-301-17/+44
|
* bpo-34977: Use venv redirector instead of original python.exe on Windows ↵Steve Dower2018-12-101-30/+19
| | | | (GH-11029)
* Revert "bpo-34977: Add Windows App Store package (GH-10245)" (GH-11019)Victor Stinner2018-12-071-19/+30
| | | This reverts commit 468a15aaf9206448a744fc5eab3fc21f51966aad.
* bpo-34977: Add Windows App Store package (GH-10245)Steve Dower2018-12-071-30/+19
|
* bpo-34011: Fixes missing venv files and other tests (GH-9458)Steve Dower2018-09-201-23/+25
|
* bpo-34011: Update code copying DLLs and init.tcl into venvs. (GH-8253)Vinay Sajip2018-07-201-1/+5
|
* Closes #29213: Merged fix from 3.6.Vinay Sajip2017-02-021-6/+4
|
* Fixes #24875: Merged fix from 3.5.Vinay Sajip2017-02-021-0/+9
|\
| * Fixes #24875: pip can now be installed in a venv with --system-site-packages.Vinay Sajip2017-02-021-0/+9
| |
* | Closes #22829: Added --prompt option to venv.Vinay Sajip2016-08-061-5/+13
| |
* | Simply docstrings of venv moduleBerker Peksag2016-01-301-39/+1
|/ | | | | | | | This will hopefully make maintenance of venv documentation easier. For example, see commits a4f0d76af176 and 5764cc02244d. This patch has been reviewed by Vinaj Sajip, the maintainer of venv module.
* Issue #26034: Improve wording of clear parameterBerker Peksag2016-01-281-4/+4
|
* Issue #26034: Sync documentation of --clear with its behaviorBerker Peksag2016-01-281-9/+6
| | | | Most of the docs has already been updated in c3c188a0325a.
* Issue #23399: pyvenv creates relative symlinks where possible.Barry Warsaw2015-02-061-6/+8
|
* Issue #21663: Fixed error caused by trying to create an existing directory.Vinay Sajip2014-06-051-1/+2
|
* Don't chmod() if path is a symlink.Barry Warsaw2014-06-041-1/+2
|
* Issue #21643: Updated test and fixed logic bug in lib64 symlink creation.Vinay Sajip2014-06-031-3/+3
|
* Issue #18807: If copying (no symlinks) specified for a venv, then the python ↵Vinay Sajip2014-05-281-1/+4
| | | | interpreter aliases (python, python3) are now created by copying rather than symlinking.