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.