Avoid panicking when encountering an invalid Python version during uv python list (#7131)

Closes https://github.com/astral-sh/uv/issues/7129

Not entirely sure about the best approach yet.
This commit is contained in:
Zanie Blue
2024-09-06 18:23:16 -05:00
committed by GitHub
parent 8a0e1fde33
commit 8eff8aab0b
6 changed files with 44 additions and 11 deletions
+3 -1
View File
@@ -529,7 +529,9 @@ impl ManagedPythonDownload {
}
pub fn python_version(&self) -> PythonVersion {
self.key.version()
self.key
.version()
.expect("Managed Python downloads should always have valid versions")
}
/// Return the [`Url`] to use when downloading the distribution. If a mirror is set via the