mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-31 07:47:27 +00:00
Show PyPy downloads during uv python list
(#12915)
Fixes #12914. When `PythonDownloadRequest` does not have the `implementation` set, do not set it to CPython when calling `fill`, otherwise only CPython interpreters are shown when listing interpreters available for download, with `uv python list`.
This commit is contained in:
parent
89b221d72b
commit
451c834ebb
2 changed files with 12 additions and 7 deletions
|
@ -206,10 +206,7 @@ impl PythonDownloadRequest {
|
|||
/// Fill empty entries with default values.
|
||||
///
|
||||
/// Platform information is pulled from the environment.
|
||||
pub fn fill(mut self) -> Result<Self, Error> {
|
||||
if self.implementation.is_none() {
|
||||
self.implementation = Some(ImplementationName::CPython);
|
||||
}
|
||||
pub fn fill_platform(mut self) -> Result<Self, Error> {
|
||||
if self.arch.is_none() {
|
||||
self.arch = Some(Arch::from_env());
|
||||
}
|
||||
|
@ -222,6 +219,14 @@ impl PythonDownloadRequest {
|
|||
Ok(self)
|
||||
}
|
||||
|
||||
pub fn fill(mut self) -> Result<Self, Error> {
|
||||
if self.implementation.is_none() {
|
||||
self.implementation = Some(ImplementationName::CPython);
|
||||
}
|
||||
self = self.fill_platform()?;
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
/// Construct a new [`PythonDownloadRequest`] with platform information from the environment.
|
||||
pub fn from_env() -> Result<Self, Error> {
|
||||
Ok(Self::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue