fix: Update venv redirector detection for Python 3.13 on Windows#2920
Merged
gaborbernat merged 5 commits intopypa:mainfrom Aug 2, 2025
Merged
Conversation
* Detect the new `venvlauncher.exe` and `venvwlauncher.exe` on Windows for Python 3.13 and later. * Previously, virtualenv expected `python.exe` which is no longer the case on newer Python versions. * This ensures that virtualenv can correctly create environments using the system Python interpreter on Windows for Python 3.13+. Fixes pypa#2851 Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Contributor
|
Marked this as a draft for now 🚧—let’s get the CI sorted, and then feel free to mark it ready for review! 😊 |
* Handle pythonw.exe redirection for venvwlauncher.exe on Python 3.13+. * This ensures the correct launcher is used when creating virtual environments. Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
* Modify the `executables` method in `cpython3.py` to correctly handle launcher paths for Python 3.13 and newer on Windows. * The change ensures that `venvlauncher.exe` and `venvwlauncher.exe` are used as sources when available, improving the creation of virtual environments with specific interpreter versions. * Introduces new `ExePathRefToDest` objects with updated source paths for the executables. Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
* Correctly create ExePathRefToDest instances for Python 3.13+
launchers.
* Update source paths for `venvlauncher.exe` and `venvwlauncher.exe`.
* Ensure `targets` are correctly populated for the new refs.
* Import ExePathRefToDest from ref module.
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
for more information, see https://pre-commit.ci
gaborbernat
approved these changes
Aug 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
venvlauncher.exeandvenvwlauncher.exeon Windows for Python 3.13 and later.python.exewhich is no longer the case on newer Python versions.Fixes #2851
tox -e fix)docs/changelogfolder