Stabilize addition of Python versions to the Windows registry (#14625)

Following #14614 this is non-fatal and has an opt-out so it should be
safe to stabilize.
This commit is contained in:
Zanie Blue 2025-07-16 14:26:42 -05:00
parent 3c9aea87b4
commit 25e69458b1
3 changed files with 17 additions and 2 deletions

View File

@ -501,7 +501,7 @@ pub(crate) async fn install(
); );
} }
if preview.is_enabled() && !matches!(registry, Some(false)) { if !matches!(registry, Some(false)) {
#[cfg(windows)] #[cfg(windows)]
{ {
match uv_python::windows_registry::create_registry_entry(installation) { match uv_python::windows_registry::create_registry_entry(installation) {

View File

@ -211,7 +211,7 @@ async fn do_uninstall(
} }
#[cfg(windows)] #[cfg(windows)]
if preview.is_enabled() { {
uv_python::windows_registry::remove_registry_entry( uv_python::windows_registry::remove_registry_entry(
&matching_installations, &matching_installations,
all, all,

View File

@ -435,3 +435,18 @@ are not yet available for musl Linux on ARM).
### PyPy distributions ### PyPy distributions
PyPy distributions are provided by the PyPy project. PyPy distributions are provided by the PyPy project.
## Registration in the Windows registry
On Windows, installation of managed Python versions will register them with the Windows registry as
defined by [PEP 514](https://peps.python.org/pep-0514/).
After installation, the Python versions can be selected with the `py` launcher, e.g.:
```console
$ uv python install 3.13.1
$ py -V:Astral/CPython3.13.1
```
On uninstall, uv will remove the registry entry for the target version as well as any broken
registry entries.