Release History

[UNRELEASED DRAFT] (2026-11-10)

Fixed

  • Leave a FIFO named .venv in the parent folder alone when --venv-redirect is on, instead of hanging forever after the environment is created while waiting to read from it.

  • Make VIRTUALENV_VENV_REDIRECT=1 write the .venv redirect when no_venv_redirect = true is set in the configuration file, since environment variables rank above the configuration file.

  • Match a pinned seed version such as --pip 26.3.0 or --pip v26.3 against 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. The embed, bundle and none keywords now accept surrounding whitespace, such as a trailing carriage return.

  • Name the option, the value and the available choices when VIRTUALENV_CREATOR, VIRTUALENV_SEEDER or virtualenv.ini sets a creator or seeder that is not available, as VIRTUALENV_DISCOVERY already does. The error used to be No implementation for PythonInfo(...), which blamed the interpreter.

  • Preserve separate file records when seeding from a wheel whose RECORD file has no final newline.

  • Reject an empty or whitespace-only --app-data, and a whitespace-only VIRTUALENV_APP_DATA. An empty one, and on Windows one made only of spaces, made the current directory the cache, so --reset-app-data deleted 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 PYTHONHOME during 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 PATH entries 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 PYTHONHOME during 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

21.15.3 (2026-11-03)

Fixed

  • Add the environment’s lib/pkgconfig to PKG_CONFIG_PATH when activating from xonsh, and restore the previous value or unset it again on deactivate, as the other activators already do (PR #3505) by @darrenhuai and @gaborbernat.

  • Read virtualenv.ini values without interpolation, as environment variables and command line flags already are. A value holding a %, such as prompt = 50% done, was ignored without any message. %% and %(name)s are 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 a NotADirectoryError once creation has started. A regular file now gets the same is not a directory message instead of is a file (PR #3504) by @darrenhuai and @gaborbernat.

  • Set TCL_LIBRARY and TK_LIBRARY to the interpreter’s Tcl/Tk paths in activate.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_ARRAYS is set at activation. Since 21.14.13 the prompt read an empty psvar entry under that option and showed () instead of the name (PR #3506) by @PDGGK and @gaborbernat.

  • Treat an empty or blank VIRTUALENV_OVERRIDE_APP_DATA and an empty VIRTUALENV_CONFIG_FILE as 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-data deleted 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_DATA or the configuration file, so --read-only-app-data with an explicit folder works when the default folder is missing, and writable runs stop creating an unused one. Folders from VIRTUALENV_APP_DATA and 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, RECORD or INSTALLER (PR #3487) by @darrenhuai and @gaborbernat.

  • Make -p/--python and --try-first-with replace the interpreters set by VIRTUALENV_PYTHON, VIRTUALENV_TRY_FIRST_WITH or the configuration file instead of being merged with them, so the configured interpreter no longer wins over the one asked for and a -p that finds nothing fails instead of falling back to it. Try several VIRTUALENV_PYTHON values 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 with PermissionError (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 VENV in virtualenv --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.bat when PROMPT was undefined at activation, instead of leaving the environment name in front of it (PR #3489) by @darrenhuai.

  • Undefine PATH again in deactivate.bat when it was undefined at activation, instead of leaving the environment’s Scripts folder on it, and stop a second activate.bat from adding that folder twice (PR #3493) by @darrenhuai and @gaborbernat.

21.15.1 (2026-10-28)

Fixed

  • Keep the name of a seeded console_scripts entry that contains digits but does not end in a version, such as python3-config or 2to3, instead of truncating it at the first digit; python3-config overwrote the environment’s python executable (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, -p and --try-first-with option once instead of once per internal parsing pass, so Session.verbosity is 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_DATA or symlink_app_data in 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 (-vv output and Creator.debug) without PYTHONPATH and with the environment passed to cli_run, so the reported sys.path no longer lists the caller’s PYTHONPATH entries (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 --prompt or an environment name containing $(...), backticks or a backslash after shopt -s promptvars, set -o posix, or in a child shell that inherits an exported PS1 (GHSA-cx6f-vjhg-g3cc); reported by @rozzkml. zsh now draws the prompt from psvar[9], which is never parsed as shell syntax. (PR #3466) - by @gaborbernat.

  • Write the .venv redirect and the wheel RECORD with exclusive create, so a link planted after the existence check cannot redirect the write. On POSIX, replace a read-only .venv redirect that points at a virtualenv. (PR #3466) - by @gaborbernat.

v21.14.12 (2026-10-21)

Packaging

  • Upgrade the embedded setuptools wheel from 84.0.0 to 84.2.1 and the embedded pip wheel from 26.2.1 to 26.2.2. (PR #3452)

v21.14.11 (2026-10-18)

Fixed

  • Search all directories supplied by repeated --extra-search-dir options 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_INSECURE as a boolean, so 0, false, no and off keep 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.cfg when 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 .venv redirect 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.py when 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.cfg is 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 PATH unchanged, 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 no pyvenv.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=python remain 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_quote option 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 -VenvDir arguments 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 PS1 unchanged when sourcing the POSIX activation script in a shell other than bash or zsh, whose prompt escaping rules virtualenv handles; VIRTUAL_ENV_PROMPT stays available to custom prompts in other shells.

    In bash, keep the prompt literal under older compatibility levels, with promptvars disabled and in posix mode, and avoid nounset errors after VIRTUAL_ENV_PROMPT is unset. (PR #3418) - by @gaborbernat.

  • Remove Python’s implicit working-directory import entry before handling python -m virtualenv commands, 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 --clear when 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 --clear remains supported. (PR #3422) - by @gaborbernat.

  • Detach seed-package and launcher symlinks before running the pip seeder. Reseeding an environment created with --symlink-app-data no 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 venv creator, 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. (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.txt line names site-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 --clear to 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 .venv redirects 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.cfg instead 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 PS1 passes, so a name or --prompt value 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 activate running commands from a virtual environment name or --prompt that holds $(...), backticks or ${...} when zsh has PROMPT_SUBST set, 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’s Requires-Python when picking a wheel for the target Python, and skip a wheel whose Requires-Python is not a valid specifier instead of failing - by @pasmud and @gaborbernat. (PR #3369)

v21.14.2 (2026-10-01)

Fixed

  • Fix pyvenv.cfg getting an absolute path in python-version, include-system-site-packages and the other keys that hold no path when the working directory has an entry named like the value, such as 3.14 for virtualenv 3.14 or true with --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), and activate.fish running commands from a path or --prompt that 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 distlib and python-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.txt pins 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_LICENSES in tasks/license_policy.py as the list of accepted licenses. (PR #3339) - by @gaborbernat.

  • Document what a maintainer checks when reviewing a pull request and what the main ruleset 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 Changelog and Funding links to the PyPI project metadata, and replace the 2020-202x placeholder in LICENSE with 2020-present so 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+201B in the PowerShell activator’s quote so 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 --prompt value 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 filelock releases 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 verify and gh 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 .venv redirect to folders holding a pyproject.toml and no .venv yet, so virtualenv foo in 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-redirect writes 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-version key into pyvenv.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 .venv redirect 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 .venv folder alone, and a redirect pointing at an environment it did not create.

    • Pass --no-venv-redirect to 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 the virtualenv.pyz.cdx.json release 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.toml pins 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 the SOURCE_DATE_EPOCH timestamp 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 filelock 4.x on Python 3.10+ by relaxing the upper bound from <4 to <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 from SOURCE_DATE_EPOCH for reproducibility) and metadata.tools naming 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 vendor key 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 serialNumber a 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 bundled pip and setuptools wheels 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.csh rendering 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 PATH on deactivate in the bash and fish activators, and stop bash leaving the prompt in PS1 when it was unset before activation. (PR #3259) - by @gaborbernat.

  • Fix activate.csh failing to restore PATH and other saved variables on deactivate when PATH was already empty. (PR #3260) - by @gaborbernat.

v21.7.14 (2026-09-18)

Fixed

  • Fix activate.csh failing with Event not found when the virtual environment path contains !. (PR #3256) - by @gaborbernat.

v21.7.13 (2026-09-18)

Fixed

  • Fix activate and activate.fish running 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.bat running 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.bat again before deactivate no longer makes deactivate leave the environment’s PKG_CONFIG_PATH, TCL_LIBRARY and TK_LIBRARY behind, or lose values the user had set before the first activation - by @darrenhuai. (PR #3245)

  • Write pyvenv.cfg values on a single line, so a prompt carrying a line boundary can no longer inject configuration. --prompt, the VIRTUALENV_PROMPT environment variable and the config file all set the prompt, and pyvenv.cfg has no escape syntax, so a newline, a carriage return, or any other boundary str.splitlines recognizes, such as U+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, including home. (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 = in pyvenv.cfg instead of raising ValueError - by @r3wretrhy and @gaborbernat. (PR #3232)

  • deactivate in bash, fish and PowerShell unsets PKG_CONFIG_PATH when activation found it unset, instead of keeping the environment’s lib/pkgconfig. csh activation no longer drops a PKG_CONFIG_PATH the user had set. Activation in batch, fish, nushell and PowerShell no longer adds a trailing separator when PKG_CONFIG_PATH is 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_LIBRARY and TK_LIBRARY, and deactivate restores 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 after deactivate when 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 FileExistsError with --symlinks and writes outside the environment with --copies - by @darrenhuai and @gaborbernat. (PR #3229)

  • Ignore malformed or unreadable virtualenv.ini files 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 compared RefWhen values against RefMust members, so creation went on to fail with a FileNotFoundError or a dangling symlink - by @darrenhuai. (PR #3227)

v21.7.7 (2026-08-28)

Fixed

  • Bump the python-discovery minimum to >=1.6 for PythonInfo.system_exe, which reports the system interpreter without the nullable typing of system_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, virtualenv no longer copies the CPython 3.13+ venvlauncher.exe shim into Scripts under the shim’s own name, and a host such as python_d.exe gets 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-discovery 1.5.2, whose annotations allow a None prefix and integer sysconfig_vars values: config var substitution now skips a missing prefix and locating the shared libpython requires string INSTSONAME/LIBDIR values. (PR #3211) - by @gaborbernat.

  • ExePathRef.can_run now checks the group and other execute bits instead of only the owner one, and returns False rather than None when a file carries none of the three - by @darrenhuai and @gaborbernat. (PR #3217)

  • safe_delete no longer passes ignore_errors=True to shutil.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, which set_tree marks - survived, so --reset-app-data and --clear kept 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

v21.7.3 (2026-08-08)

Fixed

  • ListType.split_values now returns a list you can iterate more than once, and accepts bytes input instead of raising TypeError - by @darrenhuai and @gaborbernat. (PR #3207)

v21.7.2 (2026-08-07)

Packaging

v21.7.1 (2026-07-30)

Documentation

  • Document that virtualenv.png is the official logo and virtualenv.svg is a simplified favicon-only mark - by @gaborbernat. (#3199)

Packaging

  • Upgrade the embedded pip wheel from 26.1.2 to 26.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.15t build, and the Programming Language :: Python :: 3.15 classifier 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, echo and source/. through builtin stops 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

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-seed and 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 wheel seed package, which virtualenv bundled only for Python 3.8. The --wheel and --no-wheel options 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 wheel package at version 0.47.0 - by @gaborbernat.

v21.4.3 (2026-06-11)

Fixed

  • Resolve executable-only symlinks when recording home and base-executable in pyvenv.cfg, mirroring CPython’s getpath.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 PS1 from 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.1 to 26.1.2.

v21.4.2 (2026-05-31)

Fixed

  • Stop deactivate in the bash/zsh activation script from aborting under set -e when hash -r fails (for example with shell hashing disabled) by appending || true, matching CPython venv (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.exe substitution never triggering because executables() compared the source executable name instead of the target name, and fix AttributeError on debug_build attribute 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 and has_shim version guard, drop unreachable Python 3.7 branch from pyvenv_launch_patch_active, and fix wheel deprecation message to say >= 3.9 - by @gaborbernat. (PR #3150)

v21.3.3 (2026-05-13)

Fixed

  • recognize GraalPy interpreters using the normalized GraalPy name - by @timfel. (PR #3144)

v21.3.2 (2026-05-12)

v21.3.1 (2026-05-05)

Packaging

v21.3.0 (2026-04-27)

Added

  • Re-introduce xonsh shell 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

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_SUPPORT by tasks/upgrade_wheels.py. (PR #3119) - by @gaborbernat.

  • Security hardening: validate the distribution name and version specifier passed to pip download when 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.zipapp with Path.relative_to so 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=1 to 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-discovery minimum to >=1.2.2 to include normalize_isa support - by @rahuldevikar. (PR #3117)

v21.2.1 (2026-04-09)

Fixed

  • Use terminal width for help formatting instead of hardcoded 240. (PR #3110) - by @Bahtya.

Packaging

v21.2.0 (2026-03-09)

Fixed

  • Pass --without-scm-ignore-files to subprocess venv on Python 3.13+ so virtualenv controls .gitignore creation, fixing flaky test_create_no_seed and --no-vcs-ignore being ignored in subprocess path - by @gaborbernat. (#3089)

  • Use BASH_SOURCE[0] instead of $0 in the bash activate script relocation fallback, fixing incorrect PATH when 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.typed marker 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-discovery package 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 to from python_discovery import PythonInfo. Backward-compatibility re-export shims are provided at virtualenv.discovery.py_info, virtualenv.discovery.py_spec, and virtualenv.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

  • Add support for creating virtual environments with RustPython - by @elmjag. (PR #3010)

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 --python spec string (e.g. cpython3.12-64-arm64) to distinguish between interpreters that share the same version and bitness but target different architectures. Uses sysconfig.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. ~/.cache on Linux, ~/Library/Caches on macOS) where they are excluded from backups and can be cleaned by system tools - by @rahuldevikar. (#1884) (#1884)

  • Add PKG_CONFIG_PATH environment variable support to all activation scripts (Bash, Batch, PowerShell, Fish, C Shell, Nushell, and Python). The virtualenv’s lib/pkgconfig directory is now automatically prepended to PKG_CONFIG_PATH on activation and restored on deactivation, enabling packages that use pkg-config during build/install to find their configuration files - by @rahuldevikar. (#2637)

  • Replace ty: ignore comments 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 in site-packages/pywin32_system32 by its own post-install script - by @rahuldevikar. (#2662)

  • Preserve symlinks in pyvenv.cfg paths to match venv behavior. Use os.path.abspath() instead of os.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.exe path, preventing failures when Python is installed in a path with spaces (e.g., C:\Program Files) and a file named C:\Program exists 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 unset PKG_CONFIG_PATH - by @Fridayai700. (#3044)

  • Gracefully handle corrupted on-disk cache and invalid JSON from Python interrogation subprocess instead of crashing with unhandled JSONDecodeError or KeyError - by @gaborbernat. (PR #3054)

Packaging

  • Upgrade embedded pip to 26.0.1 from 25.3 and setuptools to 82.0.0, 75.3.4 from 75.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 --python flag. 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

  • Fix race condition in _virtualenv.py when file is overwritten during import, preventing NameError when _DISTUTILS_PATCH is accessed - by @gracetyy. (#2969)

Packaging

v20.35.3 (2025-10-10)

Fixed

  • Accept RuntimeError in test_too_many_open_files, by @esafak (#2935)

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

  • Add AppData and Cache protocols to discovery for decoupling - by @esafak. (#2074)

  • Ensure python3.exe and python3 on Windows for Python 3 - by @esafak. (#2774)

Fixed

  • Replaced direct references to tcl/tk library paths with getattr - by @esafak (#2944)

  • Restore absolute import of fs_is_case_sensitive - by @esafak. (#2955)

v20.34.0 (2025-08-13)

Added

Fixed

Packaging

v20.33.1 (2025-08-05)

Fixed

  • Correctly unpack _get_tcl_tk_libs() response in PythonInfo. Contributed by @esafak. (#2930)

  • Restore py_info.py timestamp in test_py_info_cache_invalidation_on_py_info_change Contributed by @esafak. (#2933)

v20.33.0 (2025-08-03)

Added

  • Added support for Tcl and Tkinter. You’re welcome. Contributed by @esafak. (#425)

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 --optional flag for Nushell get command on version 0.106.0 and newer, while retaining the deprecated -i flag 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

  • Ignore missing absolute paths for python discovery - by @esafak (#2870)

Packaging

v20.31.2 (2025-05-08)

v20.31.1 (2025-05-05)

Packaging

  • Upgrade embedded wheels:

v20.31.0 (2025-05-05)

Added

  • No longer bundle wheel wheels (except on Python 3.8), setuptools includes native bdist_wheel support. Update pip to 25.1. (PR #2868) - by @stefanor.

Fixed

  • get_embed_wheel() no longer fails with a TypeError when it is called with an unknown distribution. (PR #2877) - by @tiran.

  • Fix HelpFormatter error with Python 3.14.0b1. (PR #2878) - by @cdce8p.

v20.30.0 (2025-03-31)

Added

Packaging

v20.29.3 (2025-03-06)

Fixed

v20.29.2 (2025-02-10)

Fixed

  • Remove old virtualenv wheel from the source distribution - by @gaborbernat. (#2841)

Packaging

v20.29.1 (2025-01-17)

Fixed

v20.29.0 (2025-01-15)

Added

Packaging

v20.28.1 (2025-01-02)

Fixed

v20.28.0 (2024-11-25)

Added

v20.27.2 (2024-11-25)

Fixed

Packaging

  • Upgrade embedded wheels:

  • Upgrade embedded wheels:

  • Upgrade embedded wheels:

v20.27.1 (2024-10-28)

Packaging

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 $PATH entry 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.0 from 75.1.0

    • Removed pip of 24.0

    • Removed setuptools of 68.0.0

    • Removed wheel of 0.42.0

    • by @gaborbernat. (PR #2783)

v20.26.6 (2024-09-27)

Fixed

  • Properly quote string placeholders in activation script templates to mitigate potential command injection - by @y5c4l3. (#2768)

v20.26.5 (2024-09-17)

Packaging

v20.26.4 (2024-09-07)

Fixed

  • Stop printing () during activation through a batch file. (#2728) - by @ShootGan.

Packaging

  • Upgrade embedded wheels:

    • wheel to 0.44.0 from 0.43.0

    • pip to 24.2 from 24.1

    • setuptools to 74.1.2 from 70.1.0 (PR #2760) - by @gaborbernat.

v20.26.3 (2024-06-21)

Packaging

  • Upgrade embedded wheels:

v20.26.2 (2024-05-13)

Fixed

v20.26.1 (2024-04-29)

Fixed

  • fix PATH-based Python discovery on Windows - by @ofek. (PR #2712)

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

v20.25.2 (2024-04-16)

Packaging

  • Upgrade embedded wheels:

v20.25.1 (2024-02-21)

Packaging

  • Upgrade embedded wheels:

  • Upgrade embedded wheels:

v20.25.0 (2023-12-01)

Packaging

  • Upgrade embedded wheels:

v20.24.7 (2023-11-21)

Packaging

v20.24.6 (2023-10-23)

Fixed

  • Use get_hookimpls method instead of the private attribute in tests. (PR #2649) - by @danigm.

Packaging

  • Upgrade embedded wheels:

v20.24.5 (2023-09-08)

Fixed

Packaging

v20.24.4 (2023-08-30)

Packaging

  • Upgrade embedded wheels:

    • setuptools to 68.1.2 from 68.1.0 on 3.8+

    • wheel to 0.41.2 from 0.41.1 on 3.7+ (PR #2628)

v20.24.3 (2023-08-11)

Fixed

  • Fix ResourceWarning on exit from the periodic update subprocess (#2472) - by @sigma67.

Packaging

v20.24.2 (2023-07-24)

Packaging

  • Upgrade embedded wheels:

v20.24.1 (2023-07-19)

Packaging

v20.24.0 (2023-07-14)

Added

  • Export the prompt prefix as VIRTUAL_ENV_PROMPT when activating a virtual environment - by @jimporter. (#2194)

Fixed

Packaging

v20.23.1 (2023-06-16)

Fixed

  • update and simplify nushell activation script, fixes an issue on Windows resulting in consecutive command not found - by @melMass. (PR #2572)

Packaging

v20.23.0 (2023-04-27)

Added

  • Do not install wheel and setuptools seed packages for Python 3.12+. To restore the old behavior use:

    • for wheel use VIRTUALENV_WHEEL=bundle environment variable or --wheel=bundle CLI flag,

    • for setuptools use VIRTUALENV_SETUPTOOLS=bundle environment variable or --setuptools=bundle CLI flag.

    By @chrysle. (#2487)

  • 3.12 support - by @gaborbernat and @chrysle. (PR #2558)

Fixed

  • Prevent PermissionError when using venv creator on systems that deliver files without user write permission - by @kulikjak. (PR #2543)

Packaging

  • Upgrade setuptools to 67.7.2 from 67.6.1 and pip to 23.1.2 from 23.1 - by @szleb. (#2560)

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 of 0.37.1; setuptools of 59.6.0, 44.1.1, 50.3.2- by @gaborbernat. (PR #2548)

v20.21.1 (2023-04-19)

Fixed

  • Add tox.ini to sdist - by @mtelka. (#2511)

  • 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.0 from 0.38.4

    • setuptools to 67.6.1 from 67.4.0

    • pip to 23.1 from 23.0.1 (PR #2546) - by @gaborbernat.

v20.21.0 (2023-03-12)

Added

Fixed

  • Add print command 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.

  • Do not assume the default encoding. (PR #2515) - by @FFY00.

  • Make ReentrantFileLock thread-safe and, thereby, fix race condition in virtualenv.cli_run - by @radoering. (#2516)

v20.20.0 (2023-02-28)

Added

  • Change environment variable existence check in Nushell activation script to not use deprecated command. (PR #2506) - by @kubouch.

Fixed

  • Discover CPython implementations distributed on Windows by any organization - by @faph. (PR #2504)

Packaging

  • Upgrade embedded setuptools to 67.4.0 from 67.1.0 and pip to 23.0.1 from 23.0 - by @gaborbernat. (PR #2510)

v20.19.0 (2023-02-07)

Added

v20.18.0 (2023-02-06)

Added

Fixed

Packaging

v20.17.1 (2022-12-05)

Fixed

  • A py or python spec means any Python rather than CPython - by @gaborbernat. (PR #2460)

  • Make activate.nu respect VIRTUAL_ENV_DISABLE_PROMPT and not set the prompt if requested - by @m-lima. (#2461)

v20.17.0 (2022-11-27)

Added

  • Change Nushell activation script to be a module meant to be activated as an overlay. (PR #2422) - by @kubouch.

  • Update operator used in Nushell activation script to be compatible with future versions. (PR #2450) - by @kubouch.

Fixed

  • Do not use deprecated API from importlib.resources on Python 3.10 or later - by @gaborbernat. (PR #2448)

Packaging

v20.16.7 (2022-11-12)

Fixed

  • Use parent directory of python executable for pyvenv.cfg “home” value per PEP 405 - by @vfazio. (#2440)

  • In POSIX virtual environments, try alternate binary names if sys._base_executable does not exist - by @vfazio. (PR #2442)

Packaging

  • Upgrade embedded wheel to 0.38.4 and pip to 22.3.1 from 22.3 and setuptools to 65.5.1 from 65.5.0 - by @gaborbernat. (PR #2443)

v20.16.6 (2022-10-25)

Added

  • Drop unneeded shims for PyPy3 directory structure (PR #2426) - by @mattip.

Fixed

  • Fix selected scheme on debian derivatives for python 3.10 when python3-distutils is not installed or the venv scheme 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.0 from 65.3.0 and pip to 22.3 from 22.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.bat and deactivate.bat) - by @pawelszramowski. (#2411)

v20.16.4 (2022-08-29)

Packaging

v20.16.3 (2022-08-04)

Packaging

  • Upgrade embedded pip to 22.2.2 from 22.2.1 and setuptools to 63.4.1 from 63.2.0 - by @gaborbernat. (PR #2395)

v20.16.2 (2022-07-27)

Packaging

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.2 from 22.1.2 and setuptools to 63.2.0 from 62.6.0 - by @gaborbernat. (PR #2383)

v20.15.1 (2022-06-28)

Fixed

  • Fix the incorrect operation when setuptools plugins output something into stdout. (PR #2335) - by @KOLANICH.

  • CPython3Windows creator ignores missing DLLs dir. (#2368) - by @reksar.

v20.15.0 (2022-06-25)

Added

  • Support for Windows embeddable Python package: includes python<VERSION>.zip in the creator sources - by @reksarka. (#1774)

Fixed

Packaging

  • Upgrade embedded setuptools to 62.3.3 from 62.6.0 and pip to 22.1.2 from 22.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

v20.14.0 (2022-03-25)

Added

  • Support Nushell activation scripts with nu version 0.60 - by @kubouch. (PR #2321)

Packaging

v20.13.4 (2022-03-18)

Performance

  • Improve performance of python startup inside created virtualenvs - by @asottile. (PR #2317)

Packaging

v20.13.3 (2022-03-07)

Fixed

Packaging

v20.13.2 (2022-02-24)

Packaging

v20.13.1 (2022-02-05)

Fixed

  • Fix “execv() arg 2 must contain only strings” on M1 macOS (#2282) - by @isac322.

Packaging

v20.13.0 (2022-01-02)

Added

  • Add downloaded wheel information in the relevant JSON embed file to prevent additional downloads of the same wheel. - by @mayeut. (#2268)

Fixed

  • Fix AttributeError: 'bool' object has no attribute 'error' when creating a Python 2.x virtualenv on macOS - by @moreati. (#2269)

  • Fix PermissionError: [Errno 1] Operation not permitted when creating a Python 2.x virtualenv on macOS/arm64 - by @moreati. (#2271)

v20.12.1 (2022-01-01)

Fixed

  • Try using previous updates of pip, setuptools & wheel when inside an update grace period rather than always falling back to embedded wheels - by @mayeut. (#2265)

  • New patch versions of pip, setuptools & wheel are now returned in the expected timeframe. - by @mayeut. (#2266)

  • Manual upgrades of pip, setuptools & wheel are not discarded by a periodic update - by @mayeut. (#2267)

v20.12.0 (2021-12-31)

Added

Fixed

Packaging

v20.11.2 (2021-12-29)

Fixed

  • Fix installation of pinned versions of pip, setuptools & wheel - by @mayeut. (#2203)

v20.11.1 (2021-12-29)

Packaging

v20.11.0 (2021-12-28)

Added

Packaging

v20.10.0 (2021-11-01)

Added

  • If a "venv" install scheme exists in sysconfig, 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 --prompt attribute, and matches virtualenv’s behavior on par with venv. (PR #2224) - by @tusharsadhwani.

Fixed

v20.9.0 (2021-10-23)

Added

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.0 from 58.1.0 and pip to 21.3.1 from 21.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-info directories may be present, confounding entrypoint discovery - by @arcivanov (#2185)

Packaging

v20.8.0 (2021-09-16)

Added

Packaging

  • Upgrade embedded setuptools to 58.0.4 from 57.4.0 and pip to 21.2.4 from 21.2.3 - by @gaborbernat.

v20.7.2 (2021-08-10)

Packaging

  • Upgrade embedded pip to 21.2.3 from 21.2.2 and wheel to 0.37.0 from 0.36.2 - by @gaborbernat. (PR #2168)

v20.7.1 (2021-08-09)

Fixed

v20.7.0 (2021-07-31)

Removed

  • Removed xonsh activator 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.2 from 21.1.3 and setuptools to 57.4.0 from 57.1.0 - by @gaborbernat (PR #2159)

v20.6.0 (2021-07-14)

Added

  • Support Python interpreters without distutils (fallback to syconfig in these cases) - by @gaborbernat. (#1910)

v20.5.0 (2021-07-13)

Added

Packaging

v20.4.7 (2021-05-24)

Packaging

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-packages on python2 - by @freundTech. (#2106)

Packaging

v20.4.4 (2021-04-20)

Fixed

  • Built in discovery class is always preferred over plugin supplied classes. (#2087) - by @AWhetter.

Packaging

v20.4.3 (2021-03-16)

Fixed

Packaging

v20.4.2 (2021-02-01)

Fixed

v20.4.1 (2021-01-31)

Packaging

  • Bump embedded pip and setuptools packages to latest upstream supported (21.0.1 and 52.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.environ if not specified - by @gaborbernat. (PR #2054)

Packaging

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 -f and unfunction exit 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

v20.3.0 (2021-01-10)

Added

  • The builtin discovery takes now a --try-first-with argument 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 PythonCore releases 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

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 default False. (#2003) - by @compwiztobe.

  • Add --read-only-app-data option 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
    

    Patch by @asottile. (PR #2009)

Fixed

  • Fix processing of the VIRTUALENV_PYTHON environment variable and make it multi-value as well (separated by comma) - by @pneff. (PR #1998)

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

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 None type 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

v20.0.31 (2020-08-17)

Packaging

  • Upgrade embedded pip to 20.2.1, setuptools to 49.6.0 and wheel to 0.35.1 - by @gaborbernat. (PR #1918)

v20.0.30 (2020-08-04)

Packaging

v20.0.29 (2020-07-31)

Packaging

v20.0.28 (2020-07-24)

Fixed

  • Fix test suite failing if run from system Python - by @gaborbernat. (#1882)

  • Provide setup_logging flag to python API so that users can bypass logging handling if their application already performs this - by @gaborbernat. (#1896)

  • Use \n instead if \r\n as 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

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_INLINE may 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

v20.0.25 (2020-06-23)

Fixed

  • Fix that when the app-data seeders 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-wheels

    • periodically (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 .gitignore if it already exists at destination path - by @gaborbernat. (#1862)

  • Improve error message for no .dist-info inside the app-data copy seeder - by @gaborbernat. (PR #1867)

Documentation

Packaging

  • Upgrade embed wheel content:

    • ship wheels for Python 3.9 and 3.10

    • upgrade setuptools for Python 3.5+ from 47.1.1 to 47.3.1

    by @gaborbernat and @pradyunsg. (PR #1841)

v20.0.23 (2020-06-12)

Fixed

v20.0.22 (2020-06-12)

Fixed

Packaging

  • Upgrade embedded setuptools to 44.1.1 for python 2 and 47.1.1 for 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-data conflicts with clear flag when abbreviation is turned on. To bypass this while allowing abbreviated flags on the command line we had to move it to reset-app-data - by @gaborbernat. (#1824)

  • Upgrade embedded setuptools to 46.4.0 from 46.1.3 on Python 3.5+, and pip from 20.1 to 20.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_filename instead of get_makefile_filename on sysconfig - by @ianw. (#1810)

  • Fix download is True by default - by @gaborbernat. (PR #1813)

  • Fail app-data seed 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-data seeder raised Invalid 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_filename exists 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 copies and symlinks. 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

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_COPIES or VIRTUALENV_ALWAYS_COPY will work) - by @gaborbernat. (PR #1763)

v20.0.16 (2020-04-04)

Fixed

  • Allow seed wheel files inside the extra-search-dir folders that do not have Requires-Python metadata specified, these are considered compatible with all python versions - by @gaborbernat. (#1757)

v20.0.15 (2020-03-27)

Packaging

v20.0.14 (2020-03-25)

Added

  • Remove __PYVENV_LAUNCHER__ on macOs for Python 3.7.(<8) and 3.8.(<3) on interpreter startup via pth file, this pulls in the upstream patch - by @gaborbernat. (#1704)

Fixed

  • Fix discovery of interpreter by name from PATH that does not match a spec format - by @gaborbernat. (#1746)

Packaging

  • Upgrade embedded setuptools for Python 3.5+ to 46.1.1, for Python 2.7 to 44.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

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.py throws AttributeError on Windows when virtual environment was created via cross python mechanism - by @gaborbernat. (#1710)

  • Fix --no-pip, --no-setuptools, --no-wheel not being respected - by @gaborbernat. (#1712)

  • Allow missing .py files if a compiled .pyc version is available - by @tucked and @gaborbernat. (PR #1714)

  • Do not fail if the distutils/setuptools patch happens on a C-extension loader (such as zipimporter on Python 3.7 or earlier) - by @gaborbernat. (#1715)

  • Support Python 2 implementations that require the landmark files and site.py to be in platform standard library instead of the standard library path of the virtual environment (notably some RHEL ones, such as the Docker image amazonlinux: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.y console script beside pip-x.y to 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

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

v20.0.9 (2020-03-08)

Fixed

  • pythonw.exe works as python.exe on 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 platstdlib over stdlib (e.g. RHEL) - by @gaborbernat. (#1694)

Packaging

v20.0.8 (2020-03-04)

Fixed

  • Having distutils configuration files that set prefix and install_scripts cause installation of packages in the wrong location - by @gaborbernat. (#1663)

  • Fix PYTHONPATH being 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.pth runs - by @gaborbernat. (#1684)

  • Fix attr: import fails for setuptools - by @gaborbernat. (#1685)

v20.0.7 (2020-02-26)

Fixed

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-data now cleans the entire application data folder, not just the app-data seeder 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-data is always False when 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.X executables when creating pypy virtualenvs - by @asottile (#1612)

  • Fail with better error message if trying to install source with unsupported setuptools, allow setuptools-scm >= 2 and move to legacy setuptools-scm format to support better older platforms (CentOS 7 and 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_executable based on __PYVENV_LAUNCHER__ - by @cjolowicz (#1643)

v20.0.4 (2020-02-14)

Added

  • When aliasing interpreters, use relative symlinks - by @asottile. (#1596)

Fixed

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-packages is 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-data seeder injects a extra .dist-info.virtualenv path that breaks importlib.metadata, now we inject an extra .virtualenv - by @gaborbernat. (#1589)

Documentation

v20.0.2 (2020-02-11)

Added

  • Print out a one line message about the created virtual environment when no verbose is set, this can now be silenced to get back the original behavior via the quiet flag - 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-traceback that 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 the app-data seeder - 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-data seeder no longer symlinks the packages on UNIX and copies on Windows. Instead by default always copies, however now has the symlink-app-data flag allowing users to request this less robust but faster method - by @gaborbernat. (PR #1575)

Documentation

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

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 var and config to their full forms. Uses descriptions from respective documentation, for projects listed in related 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 bash and fish activators on Windows too (as these can be available with git bash, cygwin or mysys2) - by @gaborbernat. (#1527)

  • Upgrade the bundled wheel package from 0.34.0 to 0.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_spec attribute for PythonSpec as these can be deduced from the other attributes,

    • for the app-data seeder 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.cfg and add include-system-site-packages only for creators that reference a global Python (PR #1535) - by @gaborbernat.

Documentation

v20.0.0b1 (2020-01-28)

Added

  • First public release of the rewrite.

Changes

  • --download defaults to False.

Removed

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.