Release History¶
[UNRELEASED DRAFT] (2026-11-10)¶
Fixed¶
Leave a FIFO named
.venvin the parent folder alone when--venv-redirectis on, instead of hanging forever after the environment is created while waiting to read from it.Make
VIRTUALENV_VENV_REDIRECT=1write the.venvredirect whenno_venv_redirect = trueis set in the configuration file, since environment variables rank above the configuration file.Match a pinned seed version such as
--pip 26.3.0or--pip v26.3against the bundled, cached or extra search dir wheel by PEP 440 equality rather than by exact string. A spelling that differs from the wheel filename skipped the bundled wheel and downloaded the same release from PyPI, even under--no-download, so it failed offline. Theembed,bundleandnonekeywords now accept surrounding whitespace, such as a trailing carriage return.Name the option, the value and the available choices when
VIRTUALENV_CREATOR,VIRTUALENV_SEEDERorvirtualenv.inisets a creator or seeder that is not available, asVIRTUALENV_DISCOVERYalready does. The error used to beNo implementation for PythonInfo(...), which blamed the interpreter.Preserve separate file records when seeding from a wheel whose
RECORDfile has no final newline.Reject an empty or whitespace-only
--app-data, and a whitespace-onlyVIRTUALENV_APP_DATA. An empty one, and on Windows one made only of spaces, made the current directory the cache, so--reset-app-datadeleted it.
Packaging¶
Write the wheel and zipapp SBOMs with python-sbom instead of virtualenv’s own generator. Each bundled seed wheel is now identified by its path inside the wheel rather than by its PyPI purl, so the wheel’s and the zipapp’s SBOMs name it alike; the metadata also names the SBOM file and its repository, and the build tools include python-sbom and virtualenv’s content provider.
21.15.6 (2026-11-06)¶
Fixed¶
Clear inherited
PYTHONHOMEduring PowerShell, Nushell, and programmatic activation so child interpreters use the environment’s standard library. Preserve empty values when Bash and fish deactivate (PR #3517) by @gaborbernat.Remove empty
PATHentries during programmatic activation, including entries in an otherwise nonempty value. On POSIX, an empty entry searches the current directory (PR #3513) by @qodelicious and @gaborbernat.Unset
PYTHONHOMEduring C shell activation and restore its original value on deactivation. An inherited value could previously prevent the environment’s Python interpreter from starting (PR #3514) by @abhishekcpp007 and @gaborbernat.
21.15.5 (2026-11-04)¶
21.15.4 (2026-11-04)¶
Fixed¶
Upgrade embedded wheels: pip to
26.3from26.2.2(PR #3508) by @gaborbernat.
21.15.3 (2026-11-03)¶
Fixed¶
Add the environment’s
lib/pkgconfigtoPKG_CONFIG_PATHwhen activating from xonsh, and restore the previous value or unset it again ondeactivate, as the other activators already do (PR #3505) by @darrenhuai and @gaborbernat.Read
virtualenv.inivalues without interpolation, as environment variables and command line flags already are. A value holding a%, such asprompt = 50% done, was ignored without any message.%%and%(name)sare now kept as written, so write a single%(PR #3501) by @darrenhuai and @gaborbernat.Reject a destination that already exists but is not a directory, such as
/dev/null, a FIFO or a socket, or that sits inside one, with a usage error instead of aNotADirectoryErroronce creation has started. A regular file now gets the sameis not a directorymessage instead ofis a file(PR #3504) by @darrenhuai and @gaborbernat.Set
TCL_LIBRARYandTK_LIBRARYto the interpreter’s Tcl/Tk paths inactivate.nu, as the other activators do. Nushell activation used to leave both variables as they were (PR #3502) by @darrenhuai and @gaborbernat.Show the environment name in the zsh prompt when
KSH_ARRAYSis set at activation. Since 21.14.13 the prompt read an emptypsvarentry under that option and showed()instead of the name (PR #3506) by @PDGGK and @gaborbernat.Treat an empty or blank
VIRTUALENV_OVERRIDE_APP_DATAand an emptyVIRTUALENV_CONFIG_FILEas unset, as virtualenv already does for its option variables. An empty app-data override, or on Windows one made of spaces, made the current directory the cache, so--reset-app-datadeleted it, and an empty config file path logged an error on every run (PR #3503) by @darrenhuai and @gaborbernat.
21.15.2 (2026-10-30)¶
Fixed¶
Build the default application data folder only when no folder was given through
--app-data,VIRTUALENV_APP_DATAor the configuration file, so--read-only-app-datawith an explicit folder works when the default folder is missing, and writable runs stop creating an unused one. Folders fromVIRTUALENV_APP_DATAand the configuration file now get the same checks as--app-data(PR #3488) by @darrenhuai and @gaborbernat.Build the seed wheel image in a staging folder and move it into place only once it is complete, so an extraction that fails part way, for example on a full disk, after a killed process or on a path over the Windows length limit, no longer leaves a partial image that later runs seed as a pip without
METADATA,RECORDorINSTALLER(PR #3487) by @darrenhuai and @gaborbernat.Make
-p/--pythonand--try-first-withreplace the interpreters set byVIRTUALENV_PYTHON,VIRTUALENV_TRY_FIRST_WITHor the configuration file instead of being merged with them, so the configured interpreter no longer wins over the one asked for and a-pthat finds nothing fails instead of falling back to it. Try severalVIRTUALENV_PYTHONvalues in the order given rather than starting with the second (PR #3494) by @darrenhuai and @gaborbernat.On Windows, re-create an environment in place when its copied interpreter files, such as
python.exe, or its seeded packages are read-only, instead of failing withPermissionError(PR #3492) by @darrenhuai and @gaborbernat.Reject an empty or whitespace-only destination. An empty one, and on Windows one made only of spaces, resolved to the current directory, so an unset
VENVinvirtualenv --clear "$VENV"deleted the working directory. Pass.to create the environment in the current directory (PR #3491) by @darrenhuai and @gaborbernat.Restore the default prompt in
deactivate.batwhenPROMPTwas undefined at activation, instead of leaving the environment name in front of it (PR #3489) by @darrenhuai.Undefine
PATHagain indeactivate.batwhen it was undefined at activation, instead of leaving the environment’sScriptsfolder on it, and stop a secondactivate.batfrom adding that folder twice (PR #3493) by @darrenhuai and @gaborbernat.
21.15.1 (2026-10-28)¶
Fixed¶
Keep the name of a seeded
console_scriptsentry that contains digits but does not end in a version, such aspython3-configor2to3, instead of truncating it at the first digit;python3-configoverwrote the environment’spythonexecutable (PR #3451) by @JingHao-Leon and @gaborbernat.Copy the content of a symlinked directory when a tree is copied into an environment, instead of dropping it (PR #3454) by @JingHao-Leon and @gaborbernat.
Count each
-v,-q,-pand--try-first-withoption once instead of once per internal parsing pass, soSession.verbosityis 3 rather than 9 for a single-v(PR #3457) by @darrenhuai and @gaborbernat.Copy the seed packages instead of failing when
VIRTUALENV_SYMLINK_APP_DATAorsymlink_app_datain the config file turns on symlink seeding on a host that cannot create symlinks, such as Windows without the symlink privilege (PR #3465) by @darrenhuai and @gaborbernat.Run the interpreter that collects the target debug information (
-vvoutput andCreator.debug) withoutPYTHONPATHand with the environment passed tocli_run, so the reportedsys.pathno longer lists the caller’sPYTHONPATHentries (PR #3474) by @RaphaelFakhri and @gaborbernat.
21.15.0 (2026-10-27)¶
Added¶
Bundle dependencies for Python 3.15 in the standalone zipapp and stop bundling Python 3.8, which is outside the package’s supported range (PR #3458) by @gaborbernat.
Packaging¶
Publish GitHub Releases with categorized notes from the tagged changelog, retaining the zipapp, SBOM, and PyPI links (PR #3458) by @gaborbernat.
v21.14.13 (2026-10-22)¶
Security¶
Stop bash running commands from
--promptor an environment name containing$(...), backticks or a backslash aftershopt -s promptvars,set -o posix, or in a child shell that inherits an exportedPS1(GHSA-cx6f-vjhg-g3cc); reported by @rozzkml. zsh now draws the prompt frompsvar[9], which is never parsed as shell syntax. (PR #3466) - by @gaborbernat.Write the
.venvredirect and the wheelRECORDwith exclusive create, so a link planted after the existence check cannot redirect the write. On POSIX, replace a read-only.venvredirect that points at a virtualenv. (PR #3466) - by @gaborbernat.
v21.14.12 (2026-10-21)¶
Packaging¶
Upgrade the embedded setuptools wheel from
84.0.0to84.2.1and the embedded pip wheel from26.2.1to26.2.2. (PR #3452)
v21.14.11 (2026-10-18)¶
Fixed¶
Search all directories supplied by repeated
--extra-search-diroptions instead of keeping only the last group. (PR #3440) - by @repzakske.On Windows, the app data is now migrated into the nested cache directory instead of the migration failing with a warning on every run. (PR #3441) - by @gaborbernat and @XXXXXQ-0206.
v21.14.10 (2026-10-17)¶
Fixed¶
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. (PR #3437) - by @gaborbernat.
v21.14.9 (2026-10-17)¶
Fixed¶
Parse
VIRTUALENV_PERIODIC_UPDATE_INSECUREas a boolean, so0,false,noandoffkeep certificate verification enabled. (PR #3398) - by @gaborbernat.Reject destinations whose resolved path contains the platform’s PATH separator, including separators inherited from the working directory or a directory symlink. (PR #3399) - by @gaborbernat.
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. (PR #3400) - by @gaborbernat.
Skip writing a
.venvredirect when the environment name contains a line boundary. The environment is still created, and any existing redirect remains unchanged. (PR #3401) - by @gaborbernat.Preserve non-ASCII values in
activate_this.pywhen applications read the script with a legacy text encoding before executing it. (PR #3402) - by @gaborbernat.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. (PR #3403) - by @gaborbernat.
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. (PR #3404) - by @gaborbernat.
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. (PR #3405) - by @gaborbernat.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. (PR #3406) - by @gaborbernat.
Compile shared seed-cache bytecode without loading site customizations from the destination environment or importing modules from the current working directory. (PR #3407) - by @gaborbernat.
Keep the bundled seed version when a cached periodic update is older, and stop recording downloads below the bundled version during update checks. (PR #3408) - by @gaborbernat.
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. (PR #3409) - by @gaborbernat.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. (PR #3410) - by @gaborbernat.
Keep unset-variable bookkeeping out of exported xonsh variables, so child shells do not restore an internal sentinel as
PYTHONHOME. 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. (PR #3411) - by @gaborbernat.
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. (PR #3412) - by @gaborbernat.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. (PR #3413) - by @gaborbernat.
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. (PR #3414) - by @gaborbernat.
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. (PR #3415) - by @gaborbernat.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. (PR #3416) - by @gaborbernat.
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. (PR #3417) - by @gaborbernat.
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. (PR #3418) - by @gaborbernat.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. (PR #3419) - by @gaborbernat.
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. (PR #3420) - by @gaborbernat.
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. (PR #3421) - by @gaborbernat.
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. (PR #3422) - by @gaborbernat.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. (PR #3423) - by @gaborbernat.
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. (PR #3424) - by @gaborbernat.
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. (PR #3425) - by @gaborbernat.
Reject destinations containing line boundaries when using the stdlib
venvcreator, before it writespyvenv.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. (PR #3426) - by @gaborbernat.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. (PR #3427) - by @gaborbernat.
Limit seed-package cleanup to entries inside the environment. Ignore metadata entries that name the environment itself, a directory holding the metadata (a blank
top_level.txtline namessite-packages), or resolve outside the environment, with a warning. Launcher entries inside the environment remain supported. (PR #3428) - by @gaborbernat.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. (PR #3429) - by @gaborbernat.
Verify downloads in a private staging directory before adding them to the reusable wheel cache. Select the downloaded archive from that directory instead of pip’s output. The pip seeder now uses the same download verification path and installs pinned versions from a temporary directory containing only the selected wheels, without another index lookup. Seeded packages retain version pins in pip freeze output. (PR #3430) - by @gaborbernat.
Replace existing symbolic and hard links when writing environment configuration, activation scripts, import hooks, and seed launchers. Create generated text files exclusively so a replacement link cannot redirect the final file open. Before recreating an environment with the stdlib venv creator, replace executable-directory symlinks and Windows junctions with real directories. Remove symbolic and hard links inside that directory before creating interpreter files, including when switching from symlinks to copies. (PR #3431) - by @gaborbernat.
Write xonsh prompt and path literals as ASCII escapes in every generated activation script. This preserves their values when xonsh reads the script with a legacy encoding such as GBK or Big5. Regenerate existing scripts to apply the fix. (PR #3432) - by @gaborbernat.
Keep existing redirects whose target has a non-regular configuration file, and allow
--clearto recreate environments with such configuration paths. (PR #3433) - by @gaborbernat.Reject invalid and archive-like seed versions while parsing options for both seeders, before creating an environment or looking up wheels, with an error naming the invalid value. Apply the same validation to versions obtained from wheel filenames. (PR #3434) - by @gaborbernat.
Skip writing
.venvredirects for environment names with leading or trailing whitespace, which redirect readers may strip. (PR #3435) - by @gaborbernat.
Documentation¶
Document the accepted boolean values and environment-only scope of
VIRTUALENV_PERIODIC_UPDATE_INSECURE. (PR #3436) - by @gaborbernat.
v21.14.8 (2026-10-16)¶
Fixed¶
Activate PowerShell environments whose path contains square brackets, and read the environment’s own
pyvenv.cfginstead of whichever file the path matches as a wildcard pattern - by @repzakske and @gaborbernat. (PR #3396)
v21.14.7 (2026-10-12)¶
Fixed¶
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. (PR #3390)
v21.14.6 (2026-10-08)¶
Fixed¶
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 and @gaborbernat. (PR #3383)
v21.14.5 (2026-10-02)¶
Fixed¶
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 and @gaborbernat. (PR #3376)
v21.14.4 (2026-10-02)¶
Fixed¶
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); reported by @kemrec and @gaborbernat. (PR #3373)
v21.14.3 (2026-10-01)¶
Fixed¶
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 and @gaborbernat. (PR #3369)
v21.14.2 (2026-10-01)¶
Fixed¶
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 and @gaborbernat. (PR #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), andactivate.fishrunning commands from a path or--promptthat holds a backslash before a single quote (GHSA-c947-3pg5-gm8q); both reported by @Kwstubbs and @gaborbernat of GitHub Security Lab. (PR #3367)
v21.14.1 (2026-09-29)¶
v21.14.0 (2026-09-29)¶
Added¶
Record the SPDX license id in the wheel and zipapp SBOMs for bundled packages that declare their license by name or classifier, such as
distlibandpython-discovery, so license scanners can match them. (PR #3339) - by @gaborbernat.Add the Tidelift and thanks.dev funding links to the PyPI project URLs, next to GitHub Sponsors - by @gaborbernat. (PR #3340)
Fixed¶
Build the release sdist, wheel and zipapp with the build backend and SBOM tools that
tasks/release-requirements.txtpins by version and SHA-256, so a rebuild of the tag uses the same versions. (PR #3337) - by @gaborbernat.Use PEP 440 version ordering when selecting seed wheels, so pinned pre-releases, post-releases and local versions resolve to the requested wheel. (PR #3361) - by @pasmud and @gaborbernat.
Documentation¶
Apply the licensing policy to what the wheel and zipapp ship, checked against their SBOMs, and name
ALLOWED_LICENSESintasks/license_policy.pyas the list of accepted licenses. (PR #3339) - by @gaborbernat.Document what a maintainer checks when reviewing a pull request and what the
mainruleset requires before a merge - by @gaborbernat. (PR #3341)Document how the project selects, obtains and tracks its dependencies, and which dependency findings block a merge or a release - by @gaborbernat. (PR #3342)
Document which static analysis findings block a merge or a release, and how maintainers suppress a finding - by @gaborbernat. (PR #3343)
Document which secrets the project stores, who can read them and when maintainers rotate them - by @gaborbernat. (PR #3344)
Update the roadmap: PEP 832 support shipped, and PEP 838 waits on the PEP - by @gaborbernat. (PR #3345)
v21.13.0 (2026-09-26)¶
Added¶
Add
ChangelogandFundinglinks to the PyPI project metadata, and replace the2020-202xplaceholder inLICENSEwith2020-presentso the copyright field of the wheel SBOM reads as a real range - by @gaborbernat. (PR #3334)
Fixed¶
Escape the curly single quotes
U+2018-U+201Bin the PowerShell activator’squoteso a virtual environment prompt, name or Tcl/Tk library path containing them can no longer close the string literal and run commands - by @gaborbernat. (PR #3325)Stop the bash activator from re-expanding the prompt inside
PS1, so a virtual environment name or--promptvalue containing$(...), backticks or backslashes no longer runs as a command each time bash draws the prompt - by @gaborbernat. (PR #3326)
Documentation¶
Correct the documented changelog fragment types and example to match the enforced towncrier categories. (#3323) - by @januththedev.
List the Unlicense and the SPDX BSD variants in the runtime dependency licensing policy, matching the
filelockreleases virtualenv installs on Python 3.9, and describe the dependency review check that enforces the policy. (PR #3329) - by @gaborbernat.Show how to check a release with
gh release verifyandgh release verify-asset, and how to rebuild the zipapp byte for byte with the build tool versions its SBOMs list. Drop the claims that the zipapp build does not pin the distributions it bundles and that wheels differ between build machines - by @gaborbernat. (PR #3330)
v21.12.1 (2026-09-24)¶
Fixed¶
Limit the PEP 832
.venvredirect to folders holding apyproject.tomland no.venvyet, sovirtualenv fooin a scratch folder, and tools such as tox or nox building environments through virtualenv, no longer claim a folder’s default environment - by @gaborbernat.--venv-redirectwrites the redirect in any folder and replaces an earlier virtualenv redirect.A flag on the command line overrides the environment variable and the config file in either direction. (PR #3316)
v21.12.0 (2026-09-24)¶
Added¶
Write the PEP 838
python-versionkey intopyvenv.cfg, holding the target interpreter’s feature release. The new Generated files page covers it alongside every other file a created environment holds - by @konstin. (PR #3193)Point a
.venvredirect file in the parent folder at the created environment, per PEP 832, so editors and type checkers can find it - by @gaborbernat and @konstin.virtualenv leaves a
.venvfolder alone, and a redirect pointing at an environment it did not create.Pass
--no-venv-redirectto opt out.The feature is provisional while PEP 832 is a draft: a minor or patch release may change it in backward incompatible ways to follow the PEP. (PR #3204)
v21.11.1 (2026-09-23)¶
Fixed¶
Include the pre-commit configuration and the zipapp lock file in the source distribution, so downstream packagers can run the test suite from it. (#3314) - by @Gonghan-Princess.
v21.11.0 (2026-09-23)¶
Added¶
Attach the CycloneDX SBOM and an SPDX 2.3 rendering of it (
virtualenv.cdx.json,virtualenv.spdx.json) to each GitHub release, and attest the SPDX document against the sdist and wheel. (PR #3299) - by @gaborbernat.Describe the zipapp in its own CycloneDX SBOM, which lists virtualenv, the embedded pip and setuptools wheels, and each bundled dependency with the Python versions that load it, down to a SHA-256 per file. The SBOM sits at the root of
virtualenv.pyz, ships as thevirtualenv.pyz.cdx.jsonrelease asset, and GitHub attests it against the zipapp. (PR #3310) - by @gaborbernat.
Fixed¶
Refuse a seed wheel downloaded from the default index when virtualenv cannot get its sha256 from PyPI after three retries, instead of seeding it unverified. Seeding falls back to the bundled wheel unless a specific version was requested. (PR #3302) - by @gaborbernat.
Build the zipapp from the dependency wheels that
pylock.zipapp.tomlpins by URL and sha256, so a release bundles only files matching the committed hashes. (PR #3306) - by @gaborbernat.Leave the build machine out of the wheel and zipapp SBOMs, so the wheel rebuilds byte for byte on any operating system and architecture given the same source,
SOURCE_DATE_EPOCH, Python patch version and build backend versions. Zipapp entries now carry theSOURCE_DATE_EPOCHtimestamp and fixed permissions instead of the build time. (PR #3311) - by @gaborbernat.
Documentation¶
Document the backup maintainer and the two-factor authentication and access review expectations for maintainers. (PR #3290) - by @gaborbernat.
Link the Carl Meyer talk on the home page over HTTPS - by @gaborbernat. (PR #3300)
Add a roadmap to the development guide listing what the project plans to do, and not do, through September 2027 - by @gaborbernat. (PR #3304)
Document what a release publishes and how to verify each file, covering the PyPI attestations, the zipapp and its provenance, the CycloneDX and SPDX SBOMs of the wheel, the zipapp SBOM, and rebuilding the sdist from its tag. (PR #3305) - by @gaborbernat.
v21.10.0 (2026-09-22)¶
Added¶
Include versioned identities for packages vendored inside seed wheels in the embedded SBOM. (PR #3281) - by @gaborbernat.
Allow
filelock4.x on Python 3.10+ by relaxing the upper bound from<4to<5- by @r3wretrhy. (#3285)
Fixed¶
Skip Windows batch activation scripts when environment or Tcl/Tk paths contain
^or!, since quoting changes those paths. Other activation scripts remain available. (PR #3280) - by @gaborbernat.
v21.9.1 (2026-09-22)¶
Fixed¶
Correct SBOM CSV parsing and unresolved dependency relationships, and omit CI run identifiers from reproducible builds. (PR #3278) - by @gaborbernat.
v21.9.0 (2026-09-20)¶
Added¶
The embedded SBOM now describes the root component’s license, copyright, maintainers and project links, each bundled wheel from its own metadata, the declared runtime dependencies, and the full build environment (interpreter, OS and every distribution in the isolated build environment with the dependency graph between them), plus the GitHub Actions run when built there. (PR #3270) - by @gaborbernat.
Fixed¶
Add
metadata.timestamp(derived fromSOURCE_DATE_EPOCHfor reproducibility) andmetadata.toolsnaming the generator to the embedded SBOM, and validate both fields in the packaging checks that already run on every pull request. (PR #3269) - by @gaborbernat.Fix the embedded SBOM not conforming to the CycloneDX 1.6 schema (an invalid
vendorkey on the generator tool entry) and validate it against the schema in CI. (PR #3270) - by @gaborbernat.
v21.8.1 (2026-09-19)¶
Fixed¶
Make the embedded SBOM’s
serialNumbera deterministic UUID derived from the package name, version and bundled wheel hashes, so the same source tree produces a byte-identical SBOM, and validate the SBOM’s structure as part of the packaging checks that already run on every pull request. (PR #3268) - by @gaborbernat.
v21.8.0 (2026-09-19)¶
Added¶
Every published wheel now carries a CycloneDX SBOM at
.dist-info/sboms/virtualenv.cdx.json(PEP 770), declaring the bundledpipandsetuptoolswheels that generic SBOM tools cannot see on their own. GitHub attests it against the released sdist and wheel. (PR #3265) - by @gaborbernat.
v21.7.16 (2026-09-19)¶
Fixed¶
Fix
activate.cshrendering the venv’s prompt text wrong when it contains!(csh and tcsh both expand it) or%(tcsh only, since plain csh has no%prompt escape at all). (PR #3263) - by @gaborbernat.
v21.7.15 (2026-09-18)¶
Fixed¶
Restore an empty
PATHondeactivatein the bash and fish activators, and stop bash leaving the prompt inPS1when it was unset before activation. (PR #3259) - by @gaborbernat.Fix
activate.cshfailing to restorePATHand other saved variables ondeactivatewhenPATHwas already empty. (PR #3260) - by @gaborbernat.
v21.7.14 (2026-09-18)¶
Fixed¶
Fix
activate.cshfailing withEvent not foundwhen the virtual environment path contains!. (PR #3256) - by @gaborbernat.
v21.7.13 (2026-09-18)¶
Fixed¶
Fix
activateandactivate.fishrunning commands embedded in the virtual environment path or in the interpreter’s Tcl/Tk library paths. (PR #3252) - by @gaborbernat.
v21.7.12 (2026-09-18)¶
Fixed¶
Fix
activate.batrunning arbitrary commands from a crafted--prompt,VIRTUALENV_PROMPT, or config file value. (PR #3250) - by @gaborbernat.Verify a downloaded seed wheel’s sha256 against PyPI before seeding it into a virtual environment, skipped when a custom pip index is configured. (PR #3251) - by @gaborbernat.
v21.7.11 (2026-09-17)¶
Fixed¶
Running
activate.batagain beforedeactivateno longer makesdeactivateleave the environment’sPKG_CONFIG_PATH,TCL_LIBRARYandTK_LIBRARYbehind, or lose values the user had set before the first activation - by @darrenhuai. (PR #3245)Write
pyvenv.cfgvalues on a single line, so a prompt carrying a line boundary can no longer inject configuration.--prompt, theVIRTUALENV_PROMPTenvironment variable and the config file all set the prompt, andpyvenv.cfghas no escape syntax, so a newline, a carriage return, or any other boundarystr.splitlinesrecognizes, such asU+2028, started a new configuration line. Reading the file back picked up those lines as keys, and since the last value for a key wins, they replaced anything written earlier, includinghome. (PR #3247) - by @gaborbernat.
Documentation¶
Document the policy for AI-assisted contributions and the licensing rules for dependencies. (PR #3239) - by @gaborbernat.
v21.7.10 (2026-09-15)¶
Fixed¶
Skip blank lines,
#comments and lines without=inpyvenv.cfginstead of raisingValueError- by @r3wretrhy and @gaborbernat. (PR #3232)deactivatein bash, fish and PowerShell unsetsPKG_CONFIG_PATHwhen activation found it unset, instead of keeping the environment’slib/pkgconfig. csh activation no longer drops aPKG_CONFIG_PATHthe user had set. Activation in batch, fish, nushell and PowerShell no longer adds a trailing separator whenPKG_CONFIG_PATHis unset, and PowerShell and nushell build the value with the host’s path separators - by @darrenhuai and @gaborbernat. (PR #3233)Activation in bash, csh, fish and PowerShell keeps the user’s
TCL_LIBRARYandTK_LIBRARY, anddeactivaterestores them. csh and PowerShell removed both variables on every activation, fish did so when the interpreter has tcl, and bash kept the environment’s value afterdeactivatewhen the variable was unset before - by @darrenhuai and @gaborbernat. (PR #3234)
v21.7.9 (2026-09-09)¶
Fixed¶
Replace dangling symlinks, including interpreter aliases, when recreating an environment. This prevents
FileExistsErrorwith--symlinksand writes outside the environment with--copies- by @darrenhuai and @gaborbernat. (PR #3229)Ignore malformed or unreadable
virtualenv.inifiles and report the error in the log and--help. Accept a UTF-8 byte order mark, as written by PowerShell 5 and older Notepad versions - by @darrenhuai and @gaborbernat. (PR #3230)
v21.7.8 (2026-09-01)¶
Fixed¶
A missing source needed by both install modes now disables the builtin creator through
meta.error. The check comparedRefWhenvalues againstRefMustmembers, so creation went on to fail with aFileNotFoundErroror a dangling symlink - by @darrenhuai. (PR #3227)
v21.7.7 (2026-08-28)¶
Fixed¶
Bump the
python-discoveryminimum to>=1.6forPythonInfo.system_exe, which reports the system interpreter without the nullable typing ofsystem_executable- by @gaborbernat. (PR #3224)
Documentation¶
Document the names the interpreter answers to inside a created environment. A new Environment layout page lists them per platform, the tutorial and the usage guide point at it, and the explanation of creators covers why an environment carries several names and why Windows copies a redirector - by @gaborbernat. (PR #3225)
v21.7.6 (2026-08-28)¶
Fixed¶
On Windows,
virtualenvno longer copies the CPython 3.13+venvlauncher.exeshim intoScriptsunder the shim’s own name, and a host such aspython_d.exegets its alias back. The alias set took its names from the shim that stands in for the interpreter, so every environment gained a stray launcher copy and lost the interpreter’s own file name - by @darrenhuai and @gaborbernat. (PR #3223)
v21.7.5 (2026-08-25)¶
Fixed¶
Fix the type check against
python-discovery1.5.2, whose annotations allow aNoneprefixand integersysconfig_varsvalues: config var substitution now skips a missing prefix and locating the shared libpython requires stringINSTSONAME/LIBDIRvalues. (PR #3211) - by @gaborbernat.ExePathRef.can_runnow checks the group and other execute bits instead of only the owner one, and returnsFalserather thanNonewhen a file carries none of the three - by @darrenhuai and @gaborbernat. (PR #3217)safe_deleteno longer passesignore_errors=Truetoshutil.rmtree, which replaced its own chmod-and-retry handler with a no-op and swallowed every failure. Read-only files - every file in a wheel image, whichset_treemarks - survived, so--reset-app-dataand--clearkept trees they reported deleting. The handler now retries only the deletion itself, keeps the other mode bits, and raises the original error for anything it cannot clear - by @darrenhuai and @gaborbernat. (PR #3222)
v21.7.4 (2026-08-10)¶
Packaging¶
Upgrade embedded wheels:
setuptools to
84.0.0from83.0.0(PR #3208) - by @gaborbernat.
v21.7.3 (2026-08-08)¶
Fixed¶
ListType.split_valuesnow returns alistyou can iterate more than once, and acceptsbytesinput instead of raisingTypeError- by @darrenhuai and @gaborbernat. (PR #3207)
v21.7.2 (2026-08-07)¶
Packaging¶
Upgrade embedded wheels:
pip to
26.2.1from26.2(PR #3206) - by @gaborbernat.
v21.7.1 (2026-07-30)¶
Documentation¶
Document that
virtualenv.pngis the official logo andvirtualenv.svgis a simplified favicon-only mark - by @gaborbernat. (#3199)
Packaging¶
Upgrade the embedded pip wheel from
26.1.2to26.2.
v21.7.0 (2026-07-21)¶
Added¶
Declare support for Python 3.15: CI now tests against the CPython 3.15 beta, including the free-threaded
3.15tbuild, and theProgramming Language :: Python :: 3.15classifier is advertised. (PR #3192) - by @gaborbernat.
v21.6.1 (2026-07-10)¶
Fixed¶
Harden the fish activator prompt against user functions that shadow builtins. Routing
functions,printf,string,echoandsource/.throughbuiltinstops a shadowing function (such as a dot-style directory navigator that redefines.) from hijacking the prompt and dropping the previous command’s exit status, matching the CPython fix in gh-140006. (PR #3185) - by @gaborbernat.
v21.6.0 (2026-07-06)¶
Added¶
Stop installing the
_virtualenv.{py,pth}distutils import hook for Python 3.10 and later, where pip, setuptools and CPython already ignore the install config keys it guards against; this removes the hook’s startup import cost. The hook is still installed for Python 3.9. (#3181) - by @gaborbernat.
v21.5.2 (2026-07-06)¶
Packaging¶
Upgrade embedded wheels:
setuptools to
83.0.0(PR #3180) - by @gaborbernat.
v21.5.1 (2026-06-16)¶
Fixed¶
Refuse to create environments whose Python the bundled wheels no longer cover (currently below 3.9). virtualenv used to substitute the newest bundled
pip, which cannot run on such a target, leaving a broken environment; seeder selection now rejects it up front with a clear error.--no-seedand third-party seeders that ship compatible wheels still work - by @gaborbernat. (#3171)
v21.5.0 (2026-06-13)¶
Added¶
Drop support for Python 3.8; virtualenv now requires Python 3.9 or later to run and to create environments. Remove the embedded
wheelseed package, which virtualenv bundled only for Python 3.8. The--wheeland--no-wheeloptions stay as no-ops, but now warn that virtualenv will remove them in a release after 2026-12 - by @gaborbernat. (PR #3170)
Packaging¶
Remove the embedded
wheelpackage at version0.47.0- by @gaborbernat.
v21.4.3 (2026-06-11)¶
Fixed¶
Resolve executable-only symlinks when recording
homeandbase-executableinpyvenv.cfg, mirroring CPython’sgetpath.realpath(python/cpython#115237), so environments created from a symlink to the interpreter binary locate the base stdlib (for example python-build-standalone); a fully symlinked interpreter tree is kept as-is - by @gaborbernat. (#3157)Stop exporting
PS1from the bash activator so child processes do not inherit shell prompt state. (#3158) - by @karlhillx.Handle CYGWIN/MSYS/MINGW path conversions in fish activation script - by @LuNoX. (#3160)
Packaging¶
Upgrade the embedded pip wheel from
26.1.1to26.1.2.
v21.4.2 (2026-05-31)¶
Fixed¶
Stop
deactivatein the bash/zsh activation script from aborting underset -ewhenhash -rfails (for example with shell hashing disabled) by appending|| true, matching CPythonvenv(gh-149701) and the existing non-deactivate call - by @gaborbernat. (PR #3152)
v21.4.1 (2026-05-28)¶
Fixed¶
Fix Windows debug build
venvlauncher_d.exesubstitution never triggering becauseexecutables()compared the source executable name instead of the target name, and fixAttributeErrorondebug_buildattribute for interpreter info objects missing the field - by @gaborbernat. (PR #3151)
v21.4.0 (2026-05-28)¶
Added¶
Support Windows debug builds (
python_d.exe,venvlauncher_d.exe) matching CPython venv behavior, remove dead__SCRIPT_DIR__replacement andhas_shimversion guard, drop unreachable Python 3.7 branch frompyvenv_launch_patch_active, and fix wheel deprecation message to say>= 3.9- by @gaborbernat. (PR #3150)
v21.3.3 (2026-05-13)¶
Fixed¶
v21.3.2 (2026-05-12)¶
v21.3.1 (2026-05-05)¶
Packaging¶
Upgrade embedded wheels:
pip to
26.1.1from26.1(PR #3138) - by @gaborbernat.
v21.3.0 (2026-04-27)¶
Added¶
Re-introduce
xonshshell activator (activate.xsh) previously removed in 20.7.0, and make the plugin loader prefer virtualenv’s built-in entry points so a third-party package cannot override them by registering a duplicate name. (#3003) - by @anki-code.
Packaging¶
Upgrade embedded wheels:
pip to
26.1(PR #3132) - by @gaborbernat.
v21.2.4 (2026-04-14)¶
Security¶
Security hardening: validate each entry of a seed wheel archive before extracting it so a tampered wheel cannot escape the app-data image directory via an absolute path or
..traversal. (PR #3118) - by @gaborbernat.Security hardening: verify the SHA-256 of every bundled seed wheel when it is loaded so a corrupted or tampered file on disk fails loud instead of being handed to pip. The hash table is generated alongside
BUNDLE_SUPPORTbytasks/upgrade_wheels.py. (PR #3119) - by @gaborbernat.Security hardening: validate the distribution name and version specifier passed to
pip downloadwhen acquiring a seed wheel so extras, pip flags, or shell metacharacters cannot be smuggled into the subprocess command line. (PR #3120) - by @gaborbernat.Security hardening: replace the string-prefix containment check in
virtualenv.util.zipappwithPath.relative_toso the zipapp extraction helpers refuse any path that does not resolve under the archive root. (PR #3121) - by @gaborbernat.Security hardening: do not silently fall back to an unverified HTTPS context when the periodic update request to PyPI fails TLS verification. The returned metadata drives which wheel version virtualenv considers “up to date”, so accepting an unverified response lets a network-level attacker suppress security updates. Set
VIRTUALENV_PERIODIC_UPDATE_INSECURE=1to restore the previous behavior on hosts with broken trust stores. (PR #3122) - by @gaborbernat.
v21.2.3 (2026-04-14)¶
v21.2.2 (2026-04-13)¶
Fixed¶
Bump
python-discoveryminimum to>=1.2.2to includenormalize_isasupport - by @rahuldevikar. (PR #3117)
v21.2.1 (2026-04-09)¶
Fixed¶
Packaging¶
Upgrade embedded wheels:
setuptools to
82.0.1from82.0.0(PR #3093) - by @gaborbernat.
v21.2.0 (2026-03-09)¶
Fixed¶
Pass
--without-scm-ignore-filesto subprocess venv on Python 3.13+ so virtualenv controls.gitignorecreation, fixing flakytest_create_no_seedand--no-vcs-ignorebeing ignored in subprocess path - by @gaborbernat. (#3089)Use
BASH_SOURCE[0]instead of$0in the bash activate script relocation fallback, fixing incorrectPATHwhen sourcing the activate script from a different directory - by @gaborbernat. (#3090)
v21.1.0 (2026-02-27)¶
Added¶
Add comprehensive type annotations across the entire codebase and ship a PEP 561
py.typedmarker so downstream consumers and type checkers recognize virtualenv as an inline-typed package - by @rahuldevikar. (#3075)
v21.0.0 (2026-02-25)¶
Changes¶
The Python discovery logic has been extracted into a standalone
python-discoverypackage on PyPI (documentation) and is now consumed as a dependency. If you previously imported discovery internals directly (e.g.from virtualenv.discovery.py_info import PythonInfo), switch tofrom python_discovery import PythonInfo. Backward-compatibility re-export shims are provided atvirtualenv.discovery.py_info,virtualenv.discovery.py_spec, andvirtualenv.discovery.cached_py_info, however these are considered unsupported and may be removed in a future release - by @gaborbernat. (PR #3070)
v20.39.1 (2026-02-25)¶
Added¶
v20.39.0 (2026-02-23)¶
Added¶
Automatically resolve version manager shims (pyenv, mise, asdf) to the real Python binary during discovery, preventing incorrect interpreter selection when shims are on
PATH- by @gaborbernat. (#3049)Add architecture (ISA) awareness to Python discovery — users can now specify a CPU architecture suffix in the
--pythonspec string (e.g.cpython3.12-64-arm64) to distinguish between interpreters that share the same version and bitness but target different architectures. Usessysconfig.get_platform()as the data source, with cross-platform normalization (amd64↔x86_64,aarch64↔arm64). Omitting the suffix preserves existing behavior - by @rahuldevikar. (#3059)
v20.38.0 (2026-02-19)¶
Added¶
Store app data (pip/setuptools/wheel caches) under the OS cache directory (
platformdirs.user_cache_dir) instead of the data directory (platformdirs.user_data_dir). Existing app data at the old location is automatically migrated on first use. This ensures cached files that can be redownloaded are placed in the standard cache location (e.g.~/.cacheon Linux,~/Library/Cacheson macOS) where they are excluded from backups and can be cleaned by system tools - by @rahuldevikar. (#1884) (#1884)Add
PKG_CONFIG_PATHenvironment variable support to all activation scripts (Bash, Batch, PowerShell, Fish, C Shell, Nushell, and Python). The virtualenv’slib/pkgconfigdirectory is now automatically prepended toPKG_CONFIG_PATHon activation and restored on deactivation, enabling packages that usepkg-configduring build/install to find their configuration files - by @rahuldevikar. (#2637)Replace
ty: ignorecomments with proper type narrowing using assertions and explicit None checks - by @rahuldevikar. (#3029)
Fixed¶
Exclude pywin32 DLLs (
pywintypes*.dll,pythoncom*.dll) from being copied to the Scripts directory during virtualenv creation on Windows. This fixes compatibility issues with pywin32, which expects its DLLs to be installed insite-packages/pywin32_system32by its own post-install script - by @rahuldevikar. (#2662)Preserve symlinks in
pyvenv.cfgpaths to matchvenvbehavior. Useos.path.abspath()instead ofos.path.realpath()to normalize paths without resolving symlinks, fixing issues with Python installations accessed via symlinked directories (common in network-mounted filesystems) - by @rahuldevikar. Fixes #2770. (#2770)Fix Windows activation scripts to properly quote
python.exepath, preventing failures when Python is installed in a path with spaces (e.g.,C:\Program Files) and a file namedC:\Programexists on the filesystem - by @rahuldevikar. (#2985)Fix
bash -u(set -o nounset) compatibility in bash activation script by using${PKG_CONFIG_PATH:-}and${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}to handle unsetPKG_CONFIG_PATH- by @Fridayai700. (#3044)Gracefully handle corrupted on-disk cache and invalid JSON from Python interrogation subprocess instead of crashing with unhandled
JSONDecodeErrororKeyError- by @gaborbernat. (PR #3054)
Packaging¶
Upgrade embedded pip to
26.0.1from25.3and setuptools to82.0.0,75.3.4from75.3.2,80.9.0- by @rahuldevikar. (#3027)
v20.36.1 (2026-01-09)¶
Fixed¶
Fix TOCTOU vulnerabilities in app_data and lock directory creation that could be exploited via symlink attacks - reported by @tsigouris007, fixed by @gaborbernat. (PR #3013)
v20.36.0 (2026-01-07)¶
Added¶
Add support for PEP 440 version specifiers in the
--pythonflag. Users can now specify Python versions using operators like>=,<=,~=, etc. For example:virtualenv --python=">=3.12" myenv. (#2994) - by @rahuldevikar.
v20.35.4 (2025-10-28)¶
Fixed¶
Packaging¶
Upgrade embedded wheels:
pip to
25.3from25.2(PR #2989) - by @gaborbernat.
v20.35.3 (2025-10-10)¶
Fixed¶
v20.35.2 (2025-10-10)¶
Fixed¶
Revert out changes related to the extraction of the discovery module - by @gaborbernat. (PR #2978)
v20.35.1 (2025-10-09)¶
Fixed¶
Patch get_interpreter to handle missing cache and app_data - by @esafak (#2972)
Fix backwards incompatible changes to
PythonInfo- by @gaborbernat. (PR #2975)
v20.35.0 (2025-10-08)¶
Added¶
Fixed¶
v20.34.0 (2025-08-13)¶
Added¶
Fixed¶
Accept RuntimeError in test_too_many_open_files, by @esafak (#2935)
Python in PATH takes precedence over uv-managed python. Contributed by @edgarrmondragon. (PR #2952)
Packaging¶
Upgrade embedded wheel pip to
25.2from25.1.1- by @gaborbernat. (#2333)
v20.33.1 (2025-08-05)¶
Fixed¶
v20.33.0 (2025-08-03)¶
Added¶
Fixed¶
Fix cache invalidation for PythonInfo by hashing py_info.py. Contributed by @esafak. (#2467)
When no discovery plugins are found, the application would crash with a StopIteration. This change catches the StopIteration and raises a RuntimeError with a more informative message. Contributed by @esafak. (#2493)
Stop –try-first-with overriding absolute –python paths. Contributed by @esafak. (#2659)
Force UTF-8 encoding for pip download Contributed by @esafak. (#2780)
Creating a virtual environment on a filesystem without symlink-support would fail even with –copies Make fs_supports_symlink perform a real symlink creation check on all platforms. Contributed by @esafak. (#2786)
Add a note to the user guide recommending the use of a specific Python version when creating virtual environments. Contributed by @esafak. (#2808)
Fix ‘Too many open files’ error due to a file descriptor leak in virtualenv’s locking mechanism. Contributed by @esafak. (#2834)
Support renamed Windows venv redirector (venvlauncher.exe and venvwlauncher.exe) on Python 3.13 Contributed by @esafak. (#2851)
Resolve Nushell activation script deprecation warnings by dynamically selecting the
--optionalflag for Nushellgetcommand on version 0.106.0 and newer, while retaining the deprecated-iflag for older versions to maintain compatibility. Contributed by @gaborbernat. (PR #2910)
v20.32.0 (2025-07-20)¶
Added¶
Warn on incorrect invocation of the Nushell activation script - by @esafak.
Discover uv-managed Python installations (#2901) - by @edgarrmondragon.
Fixed¶
Packaging¶
Upgrade embedded setuptools to
80.9.0from80.3.1- by @gaborbernat. (PR #2900)
v20.31.2 (2025-05-08)¶
v20.31.1 (2025-05-05)¶
Packaging¶
Upgrade embedded wheels:
pip to
25.1.1from25.1setuptools to
80.3.1from78.1.0(PR #2880) - by @gaborbernat.
v20.31.0 (2025-05-05)¶
Added¶
Fixed¶
v20.30.0 (2025-03-31)¶
Added¶
Packaging¶
Upgrade embedded wheels:
setuptools to
78.1.0from75.3.2(PR #2863) - by @gaborbernat.
v20.29.3 (2025-03-06)¶
Fixed¶
Ignore unreadable directories in
PATH. (#2794) - by @barneygale.
v20.29.2 (2025-02-10)¶
Fixed¶
Remove old virtualenv wheel from the source distribution - by @gaborbernat. (#2841)
Packaging¶
Upgrade embedded wheel pip to
25.0.1from24.3.1- by @gaborbernat. (PR #2843)
v20.29.1 (2025-01-17)¶
Fixed¶
Fix PyInfo cache incompatibility warnings - by @robsdedude. (PR #2827)
v20.29.0 (2025-01-15)¶
Added¶
Add support for selecting free-threaded Python interpreters, e.g., python3.13t. (PR #2809) - by @robsdedude and @gaborbernat.
Packaging¶
Upgrade embedded wheels:
setuptools to
75.8.0from75.6.0(PR #2823) - by @gaborbernat.
v20.28.1 (2025-01-02)¶
Fixed¶
Skip tcsh tests on broken tcsh versions - by @gaborbernat. (#2814)
v20.28.0 (2024-11-25)¶
Added¶
Write CACHEDIR.TAG file on creation (PR #2803) - by @neilramsay and @gaborbernat.
v20.27.2 (2024-11-25)¶
Fixed¶
no longer forcibly echo off during windows batch activation (PR #2801) - by @wiktorinox and @gaborbernat.
Packaging¶
Upgrade embedded wheels:
setuptools to
75.3.0from75.2.0(PR #2798) - by @gaborbernat.
Upgrade embedded wheels:
wheel to
0.45.0from0.44.0setuptools to
75.5.0(PR #2800) - by @gaborbernat.
Upgrade embedded wheels:
setuptools to
75.6.0from75.5.0wheel to
0.45.1from0.45.0(PR #2804) - by @gaborbernat.
v20.27.1 (2024-10-28)¶
Packaging¶
Upgrade embedded wheels:
pip to
24.3.1from24.2(#2789) - by @gaborbernat.
v20.27.0 (2024-10-17)¶
Added¶
Drop 3.7 support as the CI environments no longer allow it running - by @gaborbernat. (#2758)
Fixed¶
When a
$PATHentry cannot be checked for existence, skip it instead of terminating - by @hroncok. (PR #2782)Fix zipapp is broken on Windows post distlib
0.3.9- by @gaborbernat. (#2784)
Packaging¶
Upgrade embedded wheels:
setuptools to
75.2.0from75.1.0Removed pip of
24.0Removed setuptools of
68.0.0Removed wheel of
0.42.0by @gaborbernat. (PR #2783)
v20.26.6 (2024-09-27)¶
Fixed¶
v20.26.5 (2024-09-17)¶
Packaging¶
Upgrade embedded wheels: setuptools to
75.1.0from74.1.2- by @gaborbernat. (PR #2765)
v20.26.4 (2024-09-07)¶
Fixed¶
Packaging¶
Upgrade embedded wheels:
wheel to
0.44.0from0.43.0pip to
24.2from24.1setuptools to
74.1.2from70.1.0(PR #2760) - by @gaborbernat.
v20.26.3 (2024-06-21)¶
Packaging¶
Upgrade embedded wheels:
setuptools to
70.1.0from69.5.1pip to
24.1from24.0(PR #2741) - by @gaborbernat.
v20.26.2 (2024-05-13)¶
Fixed¶
virtualenv.pyzno longer fails when zipapp path contains a symlink - by @HandSonic and @petamas. (#1949)Fix bad return code from
activate.shif hashing is disabled. (PR #2717) - by @fenkes-ibm.
v20.26.1 (2024-04-29)¶
Fixed¶
v20.26.0 (2024-04-23)¶
Fixed¶
allow builtin discovery to discover specific interpreters (e.g.
python3.12) given an unspecific spec (e.g.python3) - by @flying-sheep and @gaborbernat. (PR #2709)
v20.25.3 (2024-04-17)¶
Fixed¶
Python 3.13.0a6 renamed pathmod to parser. (PR #2702) - by @befeleme and @gaborbernat.
v20.25.2 (2024-04-16)¶
Packaging¶
Upgrade embedded wheels:
setuptools of
69.1.0to69.5.1wheel of
0.42.0to0.43.0(PR #2699) - by @gaborbernat.
v20.25.1 (2024-02-21)¶
Packaging¶
Upgrade embedded wheels:
setuptools to
69.0.3from69.0.2pip to
23.3.2from23.3.1(PR #2681) - by @gaborbernat.
Upgrade embedded wheels:
pip
23.3.2to24.0,setuptools
69.0.3to69.1.0. (PR #2691) - by @gaborbernat.
v20.25.0 (2023-12-01)¶
Packaging¶
Upgrade embedded wheels:
wheel to
0.42.0from0.41.3setuptools to
69.0.2from68.2.2(PR #2669) - by @gaborbernat.
v20.24.7 (2023-11-21)¶
Packaging¶
Upgrade the embedded wheel package from
0.41.2to0.41.3. (PR #2665) - by @gaborbernat.
v20.24.6 (2023-10-23)¶
Fixed¶
Packaging¶
Upgrade embedded wheels:
setuptools to
68.2.2from68.2.0pip to
23.3.1from23.2.1(PR #2656) - by @gaborbernat.
v20.24.5 (2023-09-08)¶
Fixed¶
Brew on macOS no longer allows copy builds - disallow choosing this by @gaborbernat. (PR #2640)
Packaging¶
Upgrade embedded wheels:
setuptools to
68.2.0from68.1.2(PR #2642) - by @gaborbernat.
v20.24.4 (2023-08-30)¶
Packaging¶
Upgrade embedded wheels:
setuptools to
68.1.2from68.1.0on3.8+wheel to
0.41.2from0.41.1on3.7+(PR #2628)
v20.24.3 (2023-08-11)¶
Fixed¶
Packaging¶
Upgrade embedded wheels:
wheel to
0.41.1from0.41.0(PR #2622) - by @gaborbernat.
v20.24.2 (2023-07-24)¶
Packaging¶
Upgrade embedded wheels:
pip to
23.2.1from23.2wheel to
0.41.0from0.40.0(PR #2614) - by @gaborbernat.
v20.24.1 (2023-07-19)¶
Packaging¶
Upgrade embedded wheels:
pip to
23.2from23.1.2- by @arielkirkwood (PR #2611)
v20.24.0 (2023-07-14)¶
Added¶
Export the prompt prefix as
VIRTUAL_ENV_PROMPTwhen activating a virtual environment - by @jimporter. (#2194)
Fixed¶
Fix test suite - by @gaborbernat. (#2592)
Packaging¶
Upgrade embedded wheels:
setuptools to
68.0.0from67.8.0(PR #2607) - by @gaborbernat.
v20.23.1 (2023-06-16)¶
Fixed¶
Packaging¶
Upgrade embedded wheels:
setuptools to
67.8.0from67.7.2(PR #2588) - by @gaborbernat.
v20.23.0 (2023-04-27)¶
Added¶
Do not install
wheelandsetuptoolsseed packages for Python 3.12+. To restore the old behavior use:for
wheeluseVIRTUALENV_WHEEL=bundleenvironment variable or--wheel=bundleCLI flag,for
setuptoolsuseVIRTUALENV_SETUPTOOLS=bundleenvironment variable or--setuptools=bundleCLI flag.
3.12 support - by @gaborbernat and @chrysle. (PR #2558)
Fixed¶
Packaging¶
v20.22.0 (2023-04-19)¶
Added¶
Drop support for creating Python <=3.6 (including 2) interpreters. Removed pip of
20.3.4,21.3.1; wheel of0.37.1; setuptools of59.6.0,44.1.1,50.3.2- by @gaborbernat. (PR #2548)
v20.21.1 (2023-04-19)¶
Fixed¶
Move the use of ‘let’ in nushell to ensure compatibility with future releases of nushell, where ‘let’ no longer assumes that its initializer is a full expressions. (PR #2527) - by @sophiajt.
The nushell command ‘str collect’ has been superseded by the ‘str join’ command. The activate.nu script has been updated to reflect this change. (PR #2532) - by @fdncred.
Packaging¶
Upgrade embedded wheels:
wheel to
0.40.0from0.38.4setuptools to
67.6.1from67.4.0pip to
23.1from23.0.1(PR #2546) - by @gaborbernat.
v20.21.0 (2023-03-12)¶
Added¶
Make closure syntax explicitly starts with {||. (PR #2512) - by @WindSoilder.
Fixed¶
Add
printcommand to nushell print_prompt to ensure compatibility with future release of nushell, where intermediate commands no longer print their result to stdout. (PR #2514) - by @NotLebedev.Make
ReentrantFileLockthread-safe and, thereby, fix race condition invirtualenv.cli_run- by @radoering. (#2516)
v20.20.0 (2023-02-28)¶
Added¶
Fixed¶
Packaging¶
Upgrade embedded setuptools to
67.4.0from67.1.0and pip to23.0.1from23.0- by @gaborbernat. (PR #2510)
v20.19.0 (2023-02-07)¶
Added¶
v20.18.0 (2023-02-06)¶
Added¶
Drop
3.6runtime support (can still create2.7+) - by @gaborbernat. (PR #2489)
Fixed¶
Packaging¶
Bump embedded pip to
23.0and setuptools to67.1- by @gaborbernat. (PR #2489)
v20.17.1 (2022-12-05)¶
Fixed¶
A
pyorpythonspec means any Python rather thanCPython- by @gaborbernat. (PR #2460)Make
activate.nurespectVIRTUAL_ENV_DISABLE_PROMPTand not set the prompt if requested - by @m-lima. (#2461)
v20.17.0 (2022-11-27)¶
Added¶
Fixed¶
Do not use deprecated API from
importlib.resourceson Python 3.10 or later - by @gaborbernat. (PR #2448)
Packaging¶
Upgrade embedded setuptools to
65.6.3from65.5.1- by @gaborbernat. (PR #2451)
v20.16.7 (2022-11-12)¶
Fixed¶
Packaging¶
Upgrade embedded wheel to
0.38.4and pip to22.3.1from22.3and setuptools to65.5.1from65.5.0- by @gaborbernat. (PR #2443)
v20.16.6 (2022-10-25)¶
Added¶
Fixed¶
Fix selected scheme on debian derivatives for python 3.10 when
python3-distutilsis not installed or thevenvscheme is not available - by @asottile. (#2350)Allow the test suite to pass even with the original C shell (rather than
tcsh) - by @kulikjak. (PR #2418)Fix fallback handling of downloading wheels for bundled packages - by @schaap. (#2429)
Packaging¶
Upgrade embedded setuptools to
65.5.0from65.3.0and pip to22.3from22.2.2- by @gaborbernat. (PR #2434)
v20.16.5 (2022-09-07)¶
Fixed¶
Do not turn echo off for subsequent commands in batch activators (
activate.batanddeactivate.bat) - by @pawelszramowski. (#2411)
v20.16.4 (2022-08-29)¶
Packaging¶
Bump embed setuptools to
65.3- by @gaborbernat. (PR #2405)
v20.16.3 (2022-08-04)¶
Packaging¶
Upgrade embedded pip to
22.2.2from22.2.1and setuptools to63.4.1from63.2.0- by @gaborbernat. (PR #2395)
v20.16.2 (2022-07-27)¶
Packaging¶
Bump embedded pip from
22.2to22.2.1- by @gaborbernat. (PR #2391)
v20.16.1 (2022-07-26)¶
Added¶
v20.16.0 (2022-07-25)¶
Added¶
Drop support for running under Python 2 (still can generate Python 2 environments) - by @gaborbernat. (PR #2382)
Packaging¶
Upgrade embedded pip to
22.2from22.1.2and setuptools to63.2.0from62.6.0- by @gaborbernat. (PR #2383)
v20.15.1 (2022-06-28)¶
Fixed¶
v20.15.0 (2022-06-25)¶
Added¶
Fixed¶
Use
shlex.quoteinstead of deprecatedpipes.quotein Python 3 - by @frenzymadness. (PR #2351)
Packaging¶
Upgrade embedded setuptools to
62.3.3from62.6.0and pip to22.1.2from22.0.4- by @gaborbernat. (PR #2348)
v20.14.1 (2022-04-11)¶
Added¶
Support for creating a virtual environment from a Python 2.7 framework on macOS 12 - by @nickhutchinson. (#2284)
Packaging¶
Upgrade embedded setuptools to
62.1.0from61.0.0- by @gaborbernat. (#2327)
v20.14.0 (2022-03-25)¶
Added¶
Packaging¶
Upgrade embedded setuptools to
61.0.0from60.10.0- by @gaborbernat. (PR #2322)
v20.13.4 (2022-03-18)¶
Performance¶
Packaging¶
Upgrade embedded setuptools to
60.10.0from60.9.3- by @gaborbernat. (PR #2320)
v20.13.3 (2022-03-07)¶
Fixed¶
Avoid symlinking the contents of
/usrinto PyPy3.8+ virtualenvs - by @stefanor and @gaborbernat. (PR #2310)
Packaging¶
Bump embed pip from
22.0.3to22.0.4- by @gaborbernat. (PR #2311)
v20.13.2 (2022-02-24)¶
Packaging¶
Upgrade embedded setuptools to
60.9.3from60.6.0- by @gaborbernat. (PR #2306)
v20.13.1 (2022-02-05)¶
Fixed¶
Packaging¶
Upgrade embedded setuptools to
60.5.0from60.2.0- by @asottile. (PR #2289)Upgrade embedded pip to
22.0.3and setuptools to60.6.0- by @gaborbernat and @asottile. (PR #2294)
v20.13.0 (2022-01-02)¶
Added¶
Fixed¶
v20.12.1 (2022-01-01)¶
Fixed¶
Try using previous updates of
pip,setuptools&wheelwhen inside an update grace period rather than always falling back to embedded wheels - by @mayeut. (#2265)New patch versions of
pip,setuptools&wheelare now returned in the expected timeframe. - by @mayeut. (#2266)Manual upgrades of
pip,setuptools&wheelare not discarded by a periodic update - by @mayeut. (#2267)
v20.12.0 (2021-12-31)¶
Added¶
Sign the python2 exe on Darwin arm64 - by @tmspicer and @gaborbernat. (PR #2233)
Fixed¶
Packaging¶
Upgrade embedded setuptools to
60.2.0from60.1.1- by @gaborbernat. (PR #2263)
v20.11.2 (2021-12-29)¶
Fixed¶
v20.11.1 (2021-12-29)¶
Packaging¶
Bump embed setuptools to
60.1.1from60.1.0- by @gaborbernat. (PR #2258)
v20.11.0 (2021-12-28)¶
Added¶
Packaging¶
Upgrade embedded setuptools to
61.1.0from58.3.0- by @gaborbernat. (#2240)
v20.10.0 (2021-11-01)¶
Added¶
If a
"venv"install scheme exists insysconfig, virtualenv now uses it to create new virtual environments. This allows Python distributors, such as Fedora, to patch/replace the default install scheme without affecting the paths in new virtual environments. A similar technique was proposed to Python, for the venv module - by @hroncok (#2208)The activated virtualenv prompt is now always wrapped in parentheses. This affects venvs created with the
--promptattribute, and matches virtualenv’s behavior on par with venv. (PR #2224) - by @tusharsadhwani.
Fixed¶
v20.9.0 (2021-10-23)¶
Added¶
Special-case
--prompt .to the name of the current directory - by @rkm and @gaborbernat. (PR #2220)
Fixed¶
Fixed path collision that could lead to a PermissionError or writing to system directories when using PyPy3.8 - by @mgorny. (#2182)
Remove stray closing parenthesis in activate.bat - by @SiggyBar and @SigmundVik. (PR #2221)
Packaging¶
Upgrade embedded setuptools to
58.3.0from58.1.0and pip to21.3.1from21.2.4- by @gaborbernat. (PR #2205)
v20.8.1 (2021-09-24)¶
Fixed¶
Fixed a bug where while creating a venv on top of an existing one, without cleaning, when seeded wheel version mismatch occurred, multiple
.dist-infodirectories may be present, confounding entrypoint discovery - by @arcivanov (#2185)
Packaging¶
Bump embed setuptools from
58.0.4to58.1.0- by @gaborbernat. (PR #2195)
v20.8.0 (2021-09-16)¶
Added¶
Add the nushell activation script - by @elferherrera.
Packaging¶
Upgrade embedded setuptools to
58.0.4from57.4.0and pip to21.2.4from21.2.3- by @gaborbernat.
v20.7.2 (2021-08-10)¶
Packaging¶
Upgrade embedded pip to
21.2.3from21.2.2and wheel to0.37.0from0.36.2- by @gaborbernat. (PR #2168)
v20.7.1 (2021-08-09)¶
Fixed¶
Fix unpacking dictionary items in PythonInfo.install_path (PR #2165) - by @denismaciel.
v20.7.0 (2021-07-31)¶
Removed¶
Removed
xonshactivator due to this breaking fairly often the CI and lack of support from those packages maintainers, upstream is encouraged to continue supporting the project as a plugin - by @gaborbernat. (PR #2160)
Packaging¶
upgrade embedded pip to
21.2.2from21.1.3and setuptools to57.4.0from57.1.0- by @gaborbernat (PR #2159)
v20.6.0 (2021-07-14)¶
Added¶
Support Python interpreters without
distutils(fallback tosyconfigin these cases) - by @gaborbernat. (#1910)
v20.5.0 (2021-07-13)¶
Added¶
Plugins now use ‘selectable’ entry points - by @jaraco. (#2093)
add libffi-7.dll to the hard-coded list of dlls for PyPy (PR #2141) - by @mattip and @gaborbernat.
Use the better maintained
platformdirsinstead ofappdirs- by @gaborbernat. (PR #2142)Drop python
3.4support as it has been over 2 years since EOL - by @gaborbernat and @mattip. (PR #2141)
Packaging¶
Bump pip the embedded pip
21.1.3and setuptools to57.1.0- by @gaborbernat. (PR #2135)
v20.4.7 (2021-05-24)¶
Packaging¶
Upgrade embedded pip to
21.1.2and setuptools to57.0.0- by @gaborbernat. (PR #2123)
v20.4.6 (2021-05-05)¶
Fixed¶
Fix
site.getsitepackages()broken on python2 on debian - by @freundTech. (#2105)
v20.4.5 (2021-05-05)¶
Fixed¶
Fix
site.getsitepackages()ignoring--system-site-packageson python2 - by @freundTech. (#2106)
Packaging¶
Bump pip to
21.1.1from21.0.1- by @gaborbernat. (PR #2104)
v20.4.4 (2021-04-20)¶
Fixed¶
Packaging¶
Upgrade embedded setuptools to
56.0.0by @gaborbernat. (PR #2094)
v20.4.3 (2021-03-16)¶
Fixed¶
Fix PyPy3 stdlib on Windows is incorrect - by @gaborbernat. (#2071)
Packaging¶
Bump embedded setuptools from
52.0.0to54.1.2- by @gaborbernat (PR #2069)
v20.4.2 (2021-02-01)¶
Fixed¶
Running virtualenv
--upgrade-embed-wheelscrashes - by @gaborbernat. (#2058)
v20.4.1 (2021-01-31)¶
Packaging¶
Bump embedded pip and setuptools packages to latest upstream supported (
21.0.1and52.0.0) - by @gaborbernat. (PR #2060)
v20.4.0 (2021-01-19)¶
Added¶
On the programmatic API allow passing in the environment variable dictionary to use, defaults to
os.environif not specified - by @gaborbernat. (PR #2054)
Packaging¶
Upgrade embedded setuptools to
51.3.3from51.1.2- by @gaborbernat. (PR #2055)
v20.3.1 (2021-01-13)¶
Fixed¶
Allow unfunctioning of pydoc to fail freely so that virtualenvs can be activated under Zsh with set -e (since otherwise
unset -fandunfunctionexit with 1 if the function does not exist in Zsh) - by @d125q. (PR #2049)Drop cached python information if the system executable is no longer present (for example when the executable is a shim and the mapped executable is replaced - such is the case with pyenv) - by @gaborbernat. (PR #2050)
Packaging¶
Bump embed pip to
20.3.3, setuptools to51.1.1and wheel to0.36.2- by @gaborbernat. (PR #2036)
v20.3.0 (2021-01-10)¶
Added¶
The builtin discovery takes now a
--try-first-withargument and is first attempted as valid interpreters. One can use this to force discovery of a given python executable when the discovery order/mechanism raises errors - by @gaborbernat. (PR #2046)
Fixed¶
On Windows python
3.7+distributions where the exe shim is missing fallback to the old ways - by @gaborbernat. (#1986)When discovering interpreters on Windows, via the PEP-514, prefer
PythonCorereleases over other ones. virtualenv is used via pip mostly by this distribution, so prefer it over other such as conda - by @gaborbernat. (PR #2046)
v20.2.2 (2020-12-07)¶
Packaging¶
Bump pip to
20.3.1, setuptools to51.0.0and wheel to0.36.1- by @gaborbernat. (PR #2029)
v20.2.1 (2020-11-23)¶
v20.2.0 (2020-11-21)¶
Added¶
Optionally skip VCS ignore directive for entire virtualenv directory, using option
no-vcs-ignore, by defaultFalse. (#2003) - by @compwiztobe.Add
--read-only-app-dataoption to allow for creation based on an existing app data cache which is non-writable. This may be useful (for example) to produce a docker image where the app-data is pre-populated.ENV \ VIRTUALENV_OVERRIDE_APP_DATA=/opt/virtualenv/cache \ VIRTUALENV_SYMLINK_APP_DATA=1 RUN virtualenv venv && rm -rf venv ENV VIRTUALENV_READ_ONLY_APP_DATA=1 USER nobody # this virtualenv has symlinks into the read-only app-data cache RUN virtualenv /tmp/venv
Fixed¶
v20.1.0 (2020-10-25)¶
Added¶
The python specification can now take one or more values, first found is used to create the virtual environment - by @gaborbernat. (PR #1995)
v20.0.35 (2020-10-15)¶
Fixed¶
After importing virtualenv passing cwd to a subprocess calls breaks with
invalid directory- by @gaborbernat. (#1983)
Packaging¶
Bump embedded setuptools from
50.3.0to50.3.1- by @gaborbernat. (PR #1982)
v20.0.34 (2020-10-12)¶
Fixed¶
Align with venv module when creating virtual environments with builtin creator on Windows 3.7 and later - by @gaborbernat. (#1782)
Handle Cygwin path conversion in the activation script - by @davidcoghlan. (#1969)
v20.0.33 (2020-10-04)¶
Fixed¶
Fix
Nonetype error in cygwin if POSIX path in dest - by @danyeaw. (#1962)Fix Python 3.4 incompatibilities (added back to the CI) - by @gaborbernat. (#1963)
v20.0.32 (2020-10-01)¶
Fixed¶
For activation scripts always use UNIX line endings (unless it’s BATCH shell related) - by @saytosid. (#1818)
Avoid spawning new windows when doing seed package upgrades in the background on Windows - by @gaborbernat. (#1928)
Fix a bug that reading and writing on the same file may cause race on multiple processes. (#1938) - by @frostming.
Provide correct path for bash activator in cygwin or msys2 - by @danyeaw. (#1940)
Relax importlib requirement to allow version<3 - by @usamasadiq and @UsamaSadiq (PR #1953)
pth files were not processed on CPython2 if $PYTHONPATH was pointing to site-packages/ - by @navytux. (#1959) (PR #1960)
Packaging¶
Upgrade embedded pip to
20.2.1and setuptools to49.4.0- by @gaborbernat. (PR #1918)Upgrade embedded setuptools to
50.2.0and pip to20.2.3- by @gaborbernat. (PR #1939)
v20.0.31 (2020-08-17)¶
Packaging¶
Upgrade embedded pip to
20.2.1, setuptools to49.6.0and wheel to0.35.1- by @gaborbernat. (PR #1918)
v20.0.30 (2020-08-04)¶
Packaging¶
Upgrade pip to
20.2.1and setuptools to49.2.1- by @gaborbernat. (PR #1915)
v20.0.29 (2020-07-31)¶
Packaging¶
Upgrade embedded pip from version
20.1.2to20.2- by @gaborbernat. (PR #1909)
v20.0.28 (2020-07-24)¶
Fixed¶
Fix test suite failing if run from system Python - by @gaborbernat. (#1882)
Provide
setup_loggingflag to python API so that users can bypass logging handling if their application already performs this - by @gaborbernat. (#1896)Use
\ninstead if\r\nas line separator for report (because Python already performs this transformation automatically upon write to the logging pipe) - by @gaborbernat. (PR #1905)
v20.0.27 (2020-07-15)¶
Fixed¶
Packaging¶
Upgrade setuptools from
49.2.0onPython 3.5+- by @gaborbernat. (PR #1898)
v20.0.26 (2020-07-07)¶
Fixed¶
Bump dependency
distutils >= 0.3.1- by @gaborbernat. (PR #1880)Improve periodic update handling:
better logging output while running and enable logging on background process call (
_VIRTUALENV_PERIODIC_UPDATE_INLINEmay be used to debug behavior inline)fallback to unverified context when querying the PyPi for release date,
stop downloading wheels once we reach the embedded version,
by @gaborbernat. (#1883)
Do not print error message if the application exists with
SystemExit(0)- by @gaborbernat. (#1885)
Packaging¶
Upgrade embedded setuptools from
47.3.1to49.1.0for Python3.5+- by @gaborbernat. (PR #1887)
v20.0.25 (2020-06-23)¶
Fixed¶
Fix that when the
app-dataseeders image creation fails the exception is silently ignored. Avoid two virtual environment creations to step on each others toes by using a lock while creating the base images. By @gaborbernat. (#1869)
v20.0.24 (2020-06-22)¶
Added¶
Ensure that the seeded packages do not get too much out of date:
add a CLI flag that triggers upgrade of embedded wheels under
upgrade-embed-wheelsperiodically (once every 14 days) upgrade the embedded wheels in a background process, and use them if they have been released for more than 28 days (can be disabled via
no-periodic-update)
More details under Wheel acquisition - by @gaborbernat. (#1821)
Display the installed seed package versions in the final summary output, for example:
created virtual environment CPython3.8.3.final.0-64 in 350ms creator CPython3Posix(dest=/x, clear=True, global=False) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/y/venv) added seed packages: pip==20.1.1, setuptools==47.3.1, wheel==0.34.2
by @gaborbernat. (#1864)
Fixed¶
Do not generate/overwrite
.gitignoreif it already exists at destination path - by @gaborbernat. (#1862)Improve error message for no
.dist-infoinside theapp-datacopy seeder - by @gaborbernat. (PR #1867)
Documentation¶
How seeding mechanisms discover (and automatically keep it up to date) wheels at Wheel acquisition - by @gaborbernat. (#1821)
How distributions should handle shipping their own embedded wheels at Distribution maintainer patching - by @gaborbernat. (#1840)
Packaging¶
Upgrade embed wheel content:
ship wheels for Python
3.9and3.10upgrade setuptools for Python
3.5+from47.1.1to47.3.1
by @gaborbernat and @pradyunsg. (PR #1841)
v20.0.23 (2020-06-12)¶
Fixed¶
Fix typo in
setup.cfg- by @RowdyHowell. (#1857)
v20.0.22 (2020-06-12)¶
Fixed¶
Relax
importlib.resourcesrequirement to also allow version 2 - by @asottile and @gaborbernat. (PR #1846)
Packaging¶
Upgrade embedded setuptools to
44.1.1for python 2 and47.1.1for python3.5+ - by @gaborbernat. (PR #1855)
v20.0.21 (2020-05-20)¶
Added¶
Generate ignore file for version control systems to avoid tracking virtual environments by default. Users should remove these files if still want to track. For now we support only git by @gaborbernat. (#1806)
Fixed¶
Fix virtualenv fails sometimes when run concurrently,
--clear-app-dataconflicts withclearflag when abbreviation is turned on. To bypass this while allowing abbreviated flags on the command line we had to move it toreset-app-data- by @gaborbernat. (#1824)Upgrade embedded
setuptoolsto46.4.0from46.1.3on Python3.5+, andpipfrom20.1to20.1.1- by @gaborbernat. (PR #1827)Seeder pip now correctly handles
--extra-search-dir- by @frenzymadness. (#1834)
v20.0.20 (2020-05-04)¶
Fixed¶
Fix download fails with python 3.4 - by @gaborbernat. (#1809)
Fixes older CPython2 versions use
_get_makefile_filenameinstead ofget_makefile_filenameonsysconfig- by @ianw. (#1810)Fix download is
Trueby default - by @gaborbernat. (PR #1813)Fail
app-dataseed operation when wheel download fails and better error message - by @gaborbernat. (PR #1814)
v20.0.19 (2020-05-03)¶
Fixed¶
Fix generating a Python 2 environment from Python 3 creates invalid python activator - by @gaborbernat. (#1776)
Fix pinning seed packages via
app-dataseeder raisedInvalid Requirement- by @gaborbernat. (#1779)Do not stop interpreter discovery if we fail to find the system interpreter for a executable during discovery - by @gaborbernat. (#1781)
On CPython2 POSIX platforms ensure
syconfig.get_makefile_filenameexists within the virtual environment (this is used by some c-extension based libraries - e.g. numpy - for building) - by @gaborbernat. (#1783)Better handling of options
copiesandsymlinks. Introduce priority of where the option is set to follow the order: CLI, env var, file, hardcoded. If both set at same level prefers copy over symlink. - by @gaborbernat. (#1784)Fix CPython is not discovered from Windows registry, and discover pythons from Windows registry in decreasing order by version - by @gaborbernat. (#1796)
Fix symlink detection for creators - by @asottile (PR #1803)
Packaging¶
Upgrade pip for Python
2.7and3.5+from20.0.2to20.1- by @gaborbernat. (PR #1793)
v20.0.18 (2020-04-16)¶
Fixed¶
Importing setuptools before cli_run could cause our python information query to fail due to setuptools patching
distutils.dist.Distribution- by @gaborbernat. (PR #1771)
v20.0.17 (2020-04-09)¶
Added¶
Extend environment variables checked for configuration to also check aliases (e.g. setting either
VIRTUALENV_COPIESorVIRTUALENV_ALWAYS_COPYwill work) - by @gaborbernat. (PR #1763)
v20.0.16 (2020-04-04)¶
Fixed¶
Allow seed wheel files inside the
extra-search-dirfolders that do not haveRequires-Pythonmetadata specified, these are considered compatible with all python versions - by @gaborbernat. (#1757)
v20.0.15 (2020-03-27)¶
Packaging¶
Upgrade embedded setuptools to
46.1.3from46.1.1- by @gaborbernat. (#1752)
v20.0.14 (2020-03-25)¶
Added¶
Remove
__PYVENV_LAUNCHER__on macOs for Python3.7.(<8)and3.8.(<3)on interpreter startup viapthfile, this pulls in the upstream patch - by @gaborbernat. (#1704)
Fixed¶
Fix discovery of interpreter by name from
PATHthat does not match a spec format - by @gaborbernat. (#1746)
Packaging¶
Upgrade embedded setuptools for Python
3.5+to46.1.1, for Python2.7to44.1.0- by @gaborbernat. (PR #1745)
v20.0.13 (2020-03-19)¶
Fixed¶
Do not fail when the pyc files is missing for the host Python 2 - by @gaborbernat. (#1738)
Support broken Packaging pythons that put the include headers under distutils pattern rather than sysconfig one - by @gaborbernat. (#1739)
v20.0.12 (2020-03-19)¶
Fixed¶
Fix relative path discovery of interpreters - by @gaborbernat. (PR #1734)
v20.0.11 (2020-03-18)¶
Added¶
Improve error message when the host python does not satisfy invariants needed to create virtual environments (now we print which host files are incompatible/missing and for which creators when no supported creator can be matched, however we found creators that can describe the given Python interpreter - will still print no supported creator for Jython, however print exactly what host files do not allow creation of virtual environments in case of CPython/PyPy) - by @gaborbernat. (#1716)
Fixed¶
Support Python 3 Framework distributed via XCode in macOs Catalina and before - by @gaborbernat. (#1663)
Fix Windows Store Python support, do not allow creation via symlink as that’s not going to work by design - by @gaborbernat. (#1709)
Fix
activate_this.pythrowsAttributeErroron Windows when virtual environment was created via cross python mechanism - by @gaborbernat. (#1710)Fix
--no-pip,--no-setuptools,--no-wheelnot being respected - by @gaborbernat. (#1712)Allow missing
.pyfiles if a compiled.pycversion is available - by @tucked and @gaborbernat. (PR #1714)Do not fail if the distutils/setuptools patch happens on a C-extension loader (such as
zipimporteron Python 3.7 or earlier) - by @gaborbernat. (#1715)Support Python 2 implementations that require the landmark files and
site.pyto be in platform standard library instead of the standard library path of the virtual environment (notably some RHEL ones, such as the Docker imageamazonlinux:1) - by @gaborbernat. (#1719)Allow the test suite to pass even when called with the system Python - to help repackaging of the tool for Linux distributions - by @gaborbernat. (#1721)
Also generate
pipx.yconsole script besidepip-x.yto be compatible with how pip installs itself - by @gaborbernat. (#1723)Automatically create the application data folder if it does not exists - by @gaborbernat. (PR #1728)
Documentation¶
supports details now explicitly what Python installations we support - by @gaborbernat and @tucked. (PR #1714)
v20.0.10 (2020-03-10)¶
Fixed¶
Fix acquiring python information might be altered by distutils configuration files generating incorrect layout virtual environments - by @gaborbernat. (#1663)
Documentation¶
Document requirements (pip + index server) when installing via pip under the installation section - by @gaborbernat. (#1618)
Document installing from non PEP-518 systems - @gaborbernat. (#1619)
Document installing latest unreleased version from Github - @gaborbernat. (#1620)
Packaging¶
Upgrade embedded setuptools to
46.0.0from45.3.0on Python3.5+- by @gaborbernat. (PR #1702)
v20.0.9 (2020-03-08)¶
Fixed¶
pythonw.exeworks aspython.exeon Windows - by @gaborbernat. (#1686)Handle legacy loaders for virtualenv import hooks used to patch distutils configuration load - by @gaborbernat. (#1690)
Support for python 2 platforms that store landmark files in
platstdliboverstdlib(e.g. RHEL) - by @gaborbernat. (#1694)
Packaging¶
Upgrade embedded setuptools to
45.3.0from45.2.0for Python3.5+- by @gaborbernat. (PR #1699)
v20.0.8 (2020-03-04)¶
Fixed¶
Having distutils configuration files that set
prefixandinstall_scriptscause installation of packages in the wrong location - by @gaborbernat. (#1663)Fix
PYTHONPATHbeing overridden on Python 2 — by @jd and @gaborbernat. (PR #1673)Fix list configuration value parsing from config file or environment variable - by @gaborbernat. (#1674)
Fix Batch activation script shell prompt to display environment name by default - by @spetafree and @gaborbernat. (PR #1679)
Fix startup on Python 2 is slower for virtualenv - this was due to setuptools calculating it’s working set distribution - by @gaborbernat. (#1682)
Fix entry points are not populated for editable installs on Python 2 due to setuptools working set being calculated before
easy_install.pthruns - by @gaborbernat. (#1684)Fix
attr:import fails for setuptools - by @gaborbernat. (#1685)
v20.0.7 (2020-02-26)¶
Fixed¶
Disable distutils fixup for python 3 until pypa/pip #7778 is fixed and released - by @gaborbernat. (#1669)
v20.0.6 (2020-02-26)¶
Fixed¶
Fix global site package always being added with bundled macOs python framework builds - by @gaborbernat. (#1561)
Fix generated scripts use host version info rather than target - by @gaborbernat. (#1600)
Fix circular prefix reference with single elements (accept these as if they were system executables, print a info about them referencing themselves) - by @gaborbernat. (#1632)
Handle the case when the application data folder is read-only:
the application data folder is now controllable via
app-data,clear-app-datanow cleans the entire application data folder, not just theapp-dataseeder path,check if the application data path passed in does not exist or is read-only, and fallback to a temporary directory,
temporary directory application data is automatically cleaned up at the end of execution,
symlink-app-datais alwaysFalsewhen the application data is temporary
by @gaborbernat. (#1640)
Fix PyPy 2 builtin modules are imported from standard library, rather than from builtin - by @gaborbernat. (#1652)
Fix creation of entry points when path contains spaces - by @nsoranzo and @gaborbernat. (PR #1660)
Fix relative paths for the zipapp (for python
3.7+) - by @gaborbernat. (PR #1666)
v20.0.5 (2020-02-21)¶
Added¶
Also create
pythonX.Xexecutables when creating pypy virtualenvs - by @asottile (#1612)Fail with better error message if trying to install source with unsupported
setuptools, allowsetuptools-scm >= 2and move to legacysetuptools-scmformat to support better older platforms (CentOS 7and such) - by @gaborbernat. (#1621)Report of the created virtual environment is now split across four short lines rather than one long - by @gaborbernat (PR #1641)
Fixed¶
Add macOs Python 2 Framework support (now we test it with the CI via brew) - by @gaborbernat (#1561)
Fix losing of libpypy-c.so when the pypy executable is a symlink - by @asottile (#1614)
Discover python interpreter in a case insensitive manner - by @PrajwalM2212 (#1624)
Fix cross interpreter support when the host python sets
sys.base_executablebased on__PYVENV_LAUNCHER__- by @cjolowicz (#1643)
v20.0.4 (2020-02-14)¶
Added¶
Fixed¶
Allow the use of
/as pathname component separator on Windows - by @vphilippon (#1582)Lower minimal version of six required to 1.9 (PR #1606) - by @ssbarnea.
v20.0.3 (2020-02-12)¶
Fixed¶
On Python 2 with Apple Framework builds the global site package is no longer added when the
system-site-packagesis not specified - by @gaborbernat. (#1561)Fix system python discovery mechanism when prefixes contain relative parts (e.g.
..) by resolving paths within the python information query - by @gaborbernat. (#1583)Expose a programmatic API as
from virtualenv import cli_run- by @gaborbernat. (#1585)Fix
app-dataseederinjects a extra.dist-info.virtualenvpath that breaksimportlib.metadata, now we inject an extra.virtualenv- by @gaborbernat. (#1589)
Documentation¶
Document a programmatic API as
from virtualenv import cli_rununder Python - by @gaborbernat. (#1585)
v20.0.2 (2020-02-11)¶
Added¶
Print out a one line message about the created virtual environment when no
verboseis set, this can now be silenced to get back the original behavior via thequietflag - by @pradyunsg. (#1557)Allow virtualenv’s app data cache to be overridden by
VIRTUALENV_OVERRIDE_APP_DATA- by @asottile. (PR #1559)Passing in the virtual environment name/path is now required (no longer defaults to
venv) - by @gaborbernat and @pradyunsg. (PR #1568)Add a CLI flag
with-tracebackthat allows displaying the stacktrace of the virtualenv when a failure occurs - by @gaborbernat. (PR #1572)
Fixed¶
Support long path names for generated virtual environment console entry points (such as
pip) when using theapp-dataseeder- by @gaborbernat. (#997)Improve python discovery mechanism:
do not fail if there are executables that fail to query (e.g. for not having execute access to it) on the
PATH,beside the prefix folder also try with the platform dependent binary folder within that,
by @gaborbernat. (#1545)
When copying (either files or trees) do not copy the permission bits, last access time, last modification time, and flags as access to these might be forbidden (for example in case of the macOs Framework Python) and these are not needed for the user to use the virtual environment - by @gaborbernat. (#1561)
While discovering a python executables interpreters that cannot be queried are now displayed with info level rather than warning, so now they’re no longer shown by default (these can be just executables to which we don’t have access or that are broken, don’t warn if it’s not the target Python we want) - by @gaborbernat. (PR #1574)
The
app-dataseederno longer symlinks the packages on UNIX and copies on Windows. Instead by default always copies, however now has thesymlink-app-dataflag allowing users to request this less robust but faster method - by @gaborbernat. (PR #1575)
Documentation¶
Add link to the legacy documentation for the changelog by @jezdez and @gaborbernat. (PR #1547)
Fine tune the documentation layout: default width of theme, allow tables to wrap around, soft corners for code snippets - by @pradyunsg and @gaborbernat. (PR #1548)
v20.0.1 (2020-02-10)¶
Fixed¶
Virtual environments created via relative path on Windows creates bad console executables - by @gaborbernat. (#1552)
Seems sometimes venvs created set their base executable to themselves; we accept these without question, so we handle virtual environments as system pythons causing issues - by @gaborbernat. (#1553)
Packaging¶
upgrade embedded setuptools to
45.2.0from45.1.0for Python3.4+- by @gaborbernat. (PR #1554)
v20.0.0 (2020-02-10)¶
Documentation¶
Fixes typos, repeated words and inconsistent heading spacing. Rephrase parts of the development documentation and CLI documentation. Expands shorthands like
env varandconfigto their full forms. Uses descriptions from respective documentation, for projects listed inrelated links- by @pradyunsg. (PR #1540)
v20.0.0b2 (2020-02-04)¶
Added¶
Improve base executable discovery mechanism:
print at debug level why we refuse some candidates,
when no candidates match exactly, instead of hard failing fallback to the closest match where the priority of matching attributes is: python implementation, major version, minor version, architecture, patch version, release level and serial (this is to facilitate things to still work when the OS upgrade replace/upgrades the system python with a never version, than what the virtualenv host python was created with),
always resolve system_executable information during the interpreter discovery, and the discovered environment is the system interpreter instead of the venv/virtualenv (this happened before lazily the first time we accessed, and caused reporting that the created virtual environment is of type of the virtualenv host python version, instead of the system pythons version - these two can differ if the OS upgraded the system python underneath and the virtualenv host was created via copy),
by @gaborbernat. (#1515)
Generate
bashandfishactivators on Windows too (as these can be available with git bash, cygwin or mysys2) - by @gaborbernat. (#1527)Upgrade the bundled
wheelpackage from0.34.0to0.34.2- by @gaborbernat. (PR #1531)
Fixed¶
Bash activation script should have no extensions instead of
.sh(this fixes the virtualenvwrapper integration) - by @gaborbernat. (#1508)Show less information when we run with a single verbosity (
-v):no longer shows accepted interpreters information (as the last proposed one is always the accepted one),
do not display the
str_specattribute forPythonSpecas these can be deduced from the other attributes,for the
app-dataseeder do not show the type of lock, only the path to the app data directory,
By @gaborbernat. (#1510)
Fixed cannot discover a python interpreter that has already been discovered under a different path (such is the case when we have multiple symlinks to the same interpreter) - by @gaborbernat. (#1512)
Support relative paths for
-p- by @gaborbernat. (#1514)Creating virtual environments in parallel fail with cannot acquire lock within app data - by @gaborbernat. (#1516)
pth files were not processed under Debian CPython2 interpreters - by @gaborbernat. (#1517)
Fix prompt not displayed correctly with upcoming fish 3.10 due to us not preserving
$pipestatus- by @krobelus. (PR #1530)Stable order within
pyenv.cfgand addinclude-system-site-packagesonly for creators that reference a global Python (PR #1535) - by @gaborbernat.
Documentation¶
Create the first iteration of the new documentation - by @gaborbernat. (#1465)
Project readme is now of type MarkDown instead of reStructuredText - by @gaborbernat. (PR #1531)
v20.0.0b1 (2020-01-28)¶
Added¶
First public release of the rewrite.
Changes¶
--downloaddefaults toFalse.
Removed¶
Stop replacing the built-in
sitemodule with a custom version baked into virtualenv. A shim remains for Python 2.
Warning
The current virtualenv is the second iteration of implementation. From version 0.8 all the way to 16.7.9 we
numbered the first iteration. Version 20.0.0b1 is a complete rewrite of the package, and as such this release
history starts from there. The old changelog is still available in the legacy branch documentation.