mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Determine if pre-release Python downloads should be allowed using the version specifiers (#7638)
Closes #7637 ``` ❯ uv python install '>=3.11' Installed Python 3.12.6 in 1.70s + cpython-3.12.6-macos-aarch64-none ❯ uv python install 3.13 Installed Python 3.13.0rc2 in 1.89s + cpython-3.13.0rc2-macos-aarch64-none ❯ uv python uninstall --all Searching for Python installations Uninstalled 2 versions in 94ms - cpython-3.12.6-macos-aarch64-none - cpython-3.13.0rc2-macos-aarch64-none ❯ uv python install '>=3.11a1' Installed Python 3.13.0rc2 in 1.89s + cpython-3.13.0rc2-macos-aarch64-none ```
This commit is contained in:
parent
b14696ca7c
commit
bbb1d3f85a
1 changed files with 5 additions and 1 deletions
|
@ -278,7 +278,11 @@ impl PythonDownloadRequest {
|
|||
}
|
||||
|
||||
pub fn allows_prereleases(&self) -> bool {
|
||||
self.prereleases.unwrap_or_else(|| self.version.is_some())
|
||||
self.prereleases.unwrap_or_else(|| {
|
||||
self.version
|
||||
.as_ref()
|
||||
.is_some_and(VersionRequest::allows_prereleases)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn satisfied_by_interpreter(&self, interpreter: &Interpreter) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue