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