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 d4153258d6
commit bc394a0f09
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)]
{
match uv_python::windows_registry::create_registry_entry(installation) {

View file

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

View file

@ -435,3 +435,18 @@ are not yet available for musl Linux on ARM).
### PyPy distributions
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.