Allow Python pre-releases to be used if they are first on the PATH (#7470)

Closes https://github.com/astral-sh/uv/issues/7469
This commit is contained in:
Zanie Blue 2024-09-18 10:19:10 -05:00 committed by GitHub
parent 67cfb4a9c0
commit 4611412757
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -1370,8 +1370,9 @@ impl PythonSource {
/// Whether a pre-release Python installation from the source should be used without opt-in.
pub(crate) fn allows_prereleases(self) -> bool {
match self {
Self::Managed | Self::Registry | Self::SearchPath | Self::MicrosoftStore => false,
Self::CondaPrefix
Self::Managed | Self::Registry | Self::MicrosoftStore => false,
Self::SearchPath
| Self::CondaPrefix
| Self::ProvidedPath
| Self::ParentInterpreter
| Self::ActiveEnvironment