Repository navigation
Releases: pypa/virtualenv
Release list
21.14.11
Bugfixes - 21.14.11
- Search all directories supplied by repeated
--extra-search-diroptions instead of keeping only the last group.
(#3440) - On Windows, the app data is now migrated into the nested cache directory instead of the migration failing with a
warning on every run. (#3441)
Full Changelog: 21.14.10...21.14.11
21.14.10
Bugfixes - 21.14.10
- Always copy seed packages when app-data is temporary, including when symlink seeding is enabled through an environment
variable or configuration file. Seeded packages remain available after temporary cache cleanup. (#3437)
Full Changelog: 21.14.9...21.14.10
21.14.9
Bugfixes - 21.14.9
-
Parse
VIRTUALENV_PERIODIC_UPDATE_INSECUREas a boolean, so0,false,noandoffkeep certificate
verification enabled. (#3398) -
Reject destinations whose resolved path contains the platform's PATH separator, including separators inherited from
the working directory or a directory symlink. (#3399) -
Preserve an existing
pyvenv.cfgwhen a prompt or configuration value cannot be encoded as UTF-8, instead of
leaving the file empty after a failed environment creation. The file now ends its lines with LF on every platform.Debug logs show each configuration line as a Python string literal, so control characters are visible. (#3400)
-
Skip writing a
.venvredirect when the environment name contains a line boundary. The environment is still
created, and any existing redirect remains unchanged. (#3401) -
Preserve non-ASCII values in
activate_this.pywhen applications read the script with a legacy text encoding before
executing it. (#3402) -
Reject malformed seed versions and requirements ending in archive suffixes before starting pip, with an error
identifying the invalid value instead of a misleading download or local-file error. (#3403) -
Allow a literal percent sign as a csh prompt and preserve carets in tcsh prompt display instead of interpreting them
as control-character notation.Separate csh history and prompt escapes from preceding non-ASCII text in legacy locales. (#3404)
-
Report an error when an existing
pyvenv.cfgis not a regular file, instead of trying to read or write directories,
pipes, or devices as configuration files. (#3405) -
Preserve percent-containing paths during batch reactivation and show dollar signs literally in command prompts. Skip
batch scripts for paths containing line boundaries, and remove stale batch scripts for unsupported paths even when
only other activators are selected. (#3406) -
Compile shared seed-cache bytecode without loading site customizations from the destination environment or importing
modules from the current working directory. (#3407) -
Keep the bundled seed version when a cached periodic update is older, and stop recording downloads below the bundled
version during update checks. (#3408) -
Stop activating a moved environment, leaving
PATHunchanged, when the shell is not bash, the script is evaluated
or read from standard input, a path tool fails, the sourced file is not the environment's own activation script, or
the new location has nopyvenv.cfg, instead of continuing with an incorrect environment path. (#3409) -
Reject built-in options with missing values before creating the application-data directory or starting interpreter
discovery, instead of reporting the argument error after those operations. (#3410) -
Keep unset-variable bookkeeping out of exported xonsh variables, so child shells do not restore an internal sentinel
asPYTHONHOME. Skip xonsh activation for destination names that its PATH handling would expand to a different
path.Restore unset Tcl/Tk library variables when switching between environments in one xonsh session.
Preserve non-ASCII paths and prompts when xonsh reads activation scripts with a legacy encoding. (#3411)
-
Skip default shell activators with a warning when a POSIX path encoding is incompatible with their UTF-8 scripts.
Explicitly requested incompatible shell activators still report an error. Environments created with--activators=
or--activators=pythonremain supported in legacy locales. Undecodable parent paths are now caught before any
shell activation script is written. (#3412) -
Keep apostrophes and backslashes in fish activation values separate from preceding non-ASCII characters, so fish 3
legacy locale decoders cannot consume their escapes as part of a multibyte character. (#3413) -
Preserve backslashes and apostrophes in csh activation values when tcsh's
backslash_quoteoption is enabled.
Assign prompt text before conditional branches so skipped prompt branches do not reinterpret its quoting.Display literal backslashes once in bsd-csh prompts. Keep disabled prompts unchanged when generated values contain
quotes. (#3414) -
Preserve backslashes in POSIX environment directory names during PowerShell activation, including configuration lookup
and the default prompt. Resolve relative, home-relative, PSDrive-qualified and filesystem provider-qualified
-VenvDirarguments to absolute paths, and stop activation when that resolution fails. (#3415) -
Keep helper processes for pip, symlink-seed compilation, stdlib venv creation, and periodic wheel updates from
importing modules through Python's implicit current-directory entry. Pip helpers retain the selected bootstrap wheel
on their import path.Preserve Python environment-variable overrides for delegated stdlib venv creation while removing the implicit
working-directory import entry.Retain explicit Python configuration when compiling symlink seed images, and report compilation failures.
(#3416) -
Preserve spaces, quotes, and backslashes in interpreter paths when pip console scripts need a POSIX shell launcher.
Paths containing tabs also use the shell launcher so the kernel does not split the interpreter name.Apply the same launcher quoting after pip seeding and refresh the installed file records. Later independent pip
installs or upgrades can overwrite these launchers; recreate affected environments after upgrading virtualenv.
(#3417) -
Leave
PS1unchanged when sourcing the POSIX activation script in a shell other than bash or zsh, whose prompt
escaping rules virtualenv handles;VIRTUAL_ENV_PROMPTstays available to custom prompts in other shells.In bash, keep the prompt literal under older compatibility levels, with
promptvarsdisabled and in posix mode, and
avoidnounseterrors afterVIRTUAL_ENV_PROMPTis unset. (#3418) -
Remove Python's implicit working-directory import entry before handling
python -m virtualenvcommands, reducing
accidental module shadowing during environment creation. Explicit import paths keep their existing order.Keep the working-directory entry when virtualenv itself is installed there, and preserve explicit paths under Python
safe-path mode. (#3419) -
Start periodic wheel updates with the same virtualenv installation or zipapp that scheduled them, even when the host
interpreter has another virtualenv version installed or no installed copy.Keep standard-library precedence and explicit Python configuration in update processes, and drop only the implicit
working-directory import entry before importing anything. (#3420) -
Create new default app-data directories with owner-only access where supported. For existing POSIX defaults owned by
the current user, remove group and other write access, preserving group write on setgid shared caches. Keep
permissions on directories owned by another user and on explicit app-data paths. Warn and use temporary app-data if
changing an owned default cache's permissions fails. (#3421) -
Reject
--clearwhen the normalized destination is a symlink or Windows reparse point, including paths containing
... Pass the target directory explicitly to clear it. Creating an environment through a symlink without
--clearremains supported. (#3422) -
Detach seed-package and launcher symlinks before running the pip seeder. Reseeding an environment created with
--symlink-app-datano longer rewrites its shared wheel image. Unrelated launcher symlinks remain in place.Preserve case in console entry-point names and use the last value for duplicate entries when regenerating launchers.
Remove linked metadata from previous seed versions when reseeding with pip so package listings report the installed
version. (#3423) -
Replace line-boundary characters in csh prompt text with spaces so activation remains valid.
When a filesystem path contains a newline, skip csh activation and remove any stale csh activation scripts. Keep
filesystem paths unchanged, including other control characters, and omit skipped activators from the creation summary.
(#3424) -
Apply the current umask when copying interpreter and seed-package files instead of inheriting cached permission bits.
Executable sources remain executable within the permissions allowed by that umask. Copied files no longer grant group
or world write access, even with a permissive umask. Source modes are not preserved: data files start from 0644 and
executable files from 0755 before applying the umask. (#3425) -
Reject destinations containing line boundaries when using the stdlib
venvcreator, before it writes
pyvenv.cfg. Other creators retain their existing destination support. Write the final configuration from the
selected interpreter and virtualenv options instead of merging stdlib's intermediate configuration. GraalPy launcher
settings are derived from the selected interpreter. (#3426) -
Preserve file permissions when deletion fails on POSIX. On Windows, clear read-only attributes through a handle that
opens the entry itself and prevents replacement, preserving other attributes and rejecting reparse points.
(#3427) -
Limit seed-package cleanup to entries inside the environment. Ignore metadata entries that name the environment
itself, a directory holding the metadata (a blanktop_level.txtline namessite-packages), or resolve outside
the environment, with a warning. Launcher entries inside the environment remain supported. (#3428) -
Replace pre-existing directory symlinks and Windows junctions in the environment's executable and library paths before
creating files. Links within those paths are replaced even when they point inside the environment. Log replaced links
and junctions, and reject a non-directory encountered while creating their replacements. (#3429) -
Verify downloads in a private staging directory before adding them ...
21.14.8
Bugfixes - 21.14.8
- Activate PowerShell environments whose path contains square brackets, and read the environment's own
pyvenv.cfg
instead of whichever file the path matches as a wildcard pattern - by repzakske. (#3396)
Full Changelog: 21.14.7...21.14.8
21.14.7
Bugfixes - 21.14.7
- Escape the environment name in the bash activator for both of bash's
PS1passes, so a name or--promptvalue
with a backslash before$(...)or backticks no longer runs as a command each time bash draws the prompt - by
gaborbernat. (#3390)
Full Changelog: 21.14.6...21.14.7
21.14.6
Bugfixes - 21.14.6
- Fall back to the bundled seed wheel with periodic update on (the default) when the embed update log holds JSON of the
wrong shape, instead of downloading the wheel or, offline, failing to create the environment - by darrenhuai.
(#3383)
Full Changelog: 21.14.5...21.14.6
21.14.5
Bugfixes - 21.14.5
- Fall back to the bundled seed wheel and remove the embed update log when the log in the app data folder holds JSON of
the wrong shape, instead of failing to create the environment - by pasmud. (#3376)
Full Changelog: 21.14.4...21.14.5
21.14.4
Bugfixes - 21.14.4
- Fix
activaterunning commands from a virtual environment name or--promptthat holds$(...), backticks or
${...}when zsh hasPROMPT_SUBSTset, and show a%in the name as typed under zsh (GHSA-5vjq-rrrf-7h2q <https://github.com/pypa/virtualenv/security/advisories/GHSA-5vjq-rrrf-7h2q>_); reported by kemrec.
(#3373)
Full Changelog: 21.14.3...21.14.4
21.14.3
Bugfixes - 21.14.3
- Honor
~=and every clause of a seed wheel'sRequires-Pythonwhen picking a wheel for the target Python, and
skip a wheel whoseRequires-Pythonis not a valid specifier instead of failing - by pasmud.
(#3369)
Full Changelog: 21.14.2...21.14.3
21.14.2
Bugfixes - 21.14.2
- Fix
pyvenv.cfggetting an absolute path inpython-version,include-system-site-packagesand the other keys
that hold no path when the working directory has an entry named like the value, such as3.14forvirtualenv 3.14ortruewith--system-site-packages- by darrenhuai. (#3366) - Fix activation scripts running code from a virtual environment path whose parent directory carries a placeholder name
such as__VIRTUAL_NAME__(GHSA-8rjx-v5ww-45pp <https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp>), andactivate.fishrunning
commands from a path or--promptthat holds a backslash before a single quote (GHSA-c947-3pg5-gm8q <https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q>); both reported by Kwstubbs of
GitHub Security Lab. (#3367)
Full Changelog: 21.14.1...21.14.2