Repository navigation
Releases
Releases Β· pypa/virtualenv
21.15.7
Immutable
release. Only release title and notes can be modified.
Bug fixes
- Fix seeding from a deep
--app-datafolder on Windows without long path support, which failed withWinError 206orWinError 3. The check for whether the seed wheel image needs its 8.3 short path now counts the separator and the 248 character limit on directories, and the install reads the image through its short path whether it was just built or reused from an earlier run (#3545) by @darrenhuai and @gaborbernat. - Honor
VIRTUALENV_NO_DOWNLOAD=1andno_download = true: the parser ignored both, sodownload = truein the configuration file overrode the environment variable. The opt-out now wins when both flags are set at the same level, as it does for--no-venv-redirect(#3533) by @darrenhuai and @gaborbernat. - Keep a version specifier such as
>=3.9,<3.10as one value when it is given throughVIRTUALENV_PYTHONor the config file on a single line. It was split at the comma, so the upper bound was dropped and a newer interpreter could be picked (#3552) by @hemtilva and @gaborbernat. - 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 (#3523) by @darrenhuai and @gaborbernat. - Make
VIRTUALENV_VENV_REDIRECT=1write the.venvredirect whenno_venv_redirect = trueis set in the configuration file, since environment variables rank above the configuration file (#3525) by @darrenhuai and @gaborbernat. - 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 (#3526) by @darrenhuai and @gaborbernat. - 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 (#3524) by @darrenhuai and @gaborbernat. - Pass the environment supplied to the Python API to the stdlib venv creator, symlink seed compilation and periodic wheel update subprocesses instead of inheriting the parent process environment (#3542) by @Muneer320 and @gaborbernat.
- Point
sys.exec_prefixat the environment whenactivate_this.pyactivates it, assys.prefixalready is. Before,sysconfigkept theplatlibpath at the base Python on POSIX, so pip in the activated process installed compiled packages into the systemsite-packagesinstead of the environment (#3547) by @HarshJamgaonkar05 and @gaborbernat. - Preserve separate file records when seeding from a wheel whose
RECORDfile has no final newline (#3527) by @Jinyong-Li and @gaborbernat. - Read and write seed package
RECORDfiles as CSV, preserving filenames containing commas, quotes or newlines during seeding and removal of an existing seed package (#3559) by @Ramji-Purwar and @gaborbernat. - 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 (#3522) by @darrenhuai and @gaborbernat. - Release the thread lock for each nested app-data lock acquisition, so waiting threads can acquire it after the outermost context exits (#3558) by @Ramji-Purwar and @gaborbernat.
- Restore an existing PowerShell
pydocfunction when deactivating an environment, including after repeated activation or switching environments (#3529) by @subotac and @gaborbernat. - Restore module exports renamed or removed by the simplint 0.11.0 update so existing imports continue to work (#3548) by @gaborbernat.
- Stop logging
SystemExit: Noneas an error after a successfulvirtualenv --upgrade-embed-wheels. The command already exited with status 0; its output now ends with the upgrade summary instead of a line that looks like a crash (#3532) by @darrenhuai and @gaborbernat.
Documentation
- Name
virtualenv.seed.embed.base_embedas the module distributions patch to turnPERIODIC_UPDATE_ON_BY_DEFAULToff in the distribution maintainer guide; it pointed atvirtualenv.seed.wheels.embed, which has no such name (#3534) by @darrenhuai and @gaborbernat.
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 (#3530) by @gaborbernat.
New Contributors
- @Jinyong-Li made their first contribution in #3527
- @AP24110011695 made their first contribution in #3528
- @subotac made their first contribution in #3529
- @ninglinLiu made their first contribution in #3544
- @Muneer320 made their first contribution in #3542
- @HarshJamgaonkar05 made their first contribution in #3547
- @Ramji-Purwar made their first contribution in #3558
- @hemtilva made their first contribution in #3552
21.15.6
Immutable
release. Only release title and notes can be modified.
Bug fixes
- 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 (#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 (#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 (#3514) by @abhishekcpp007 and @gaborbernat.
New Contributors
- @abhishekcpp007 made their first contribution in #3514
21.15.5
Immutable
release. Only release title and notes can be modified.
21.15.4
Immutable
release. Only release title and notes can be modified.
Bug fixes
- Upgrade embedded wheels: pip to
26.3from26.2.2(#3508) by @gaborbernat.
21.15.3
Immutable
release. Only release title and notes can be modified.
Bug fixes
- 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 (#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%(#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(#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 (#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 (#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 (#3503) by @darrenhuai and @gaborbernat.
New Contributors
- @duriantaco made their first contribution in #3500
- @PDGGK made their first contribution in #3506
21.15.2
Immutable
release. Only release title and notes can be modified.
Bug fixes
- 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(#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(#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 (#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(#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 (#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 (#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 (#3493) by @darrenhuai and @gaborbernat.
21.15.1
Immutable
release. Only release title and notes can be modified.
Bug fixes
- 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 (#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 (#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(#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 (#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 (#3474) by @RaphaelFakhri and @gaborbernat.
New Contributors
- @JingHao-Leon made their first contribution in #3454
- @RaphaelFakhri made their first contribution in #3474
- @FliegendeWurst made their first contribution in #3468
21.15.0
Immutable
release. Only release title and notes can be modified.
Features
- Bundle dependencies for Python 3.15 in the standalone zipapp and stop bundling Python 3.8, which is outside the package's supported range (#3458) by @gaborbernat.
Packaging
- Publish GitHub Releases with categorized notes from the tagged changelog, retaining the zipapp, SBOM, and PyPI links (#3458) by @gaborbernat.
21.14.13
Immutable
release. Only release title and notes can be modified.
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. (#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. (#3466) by @gaborbernat.
21.14.12
Immutable
release. Only release title and notes can be modified.
Packaging
- Upgrade the embedded setuptools wheel from
84.0.0to84.2.1and the embedded pip wheel from26.2.1to26.2.2. (#3452)
New Contributors
- @qodelicious made their first contribution in #3460