Use max rather than min to sort managed Pythons (#5205)

## Summary

See: https://github.com/astral-sh/uv/issues/5139 and
https://github.com/astral-sh/uv/pull/5201#discussion_r1683636935.

## Test Plan

Verified that 3.12 was chosen above 3.8 in:

- `cargo run -- python uninstall --all`
- `cargo run -- python install 3.8 3.12`
- `cargo run -- tool run -v httpx`
This commit is contained in:
Charlie Marsh 2024-07-19 08:35:17 -04:00 committed by GitHub
parent 93ba676f2e
commit bb84cbb39d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View file

@ -12,16 +12,16 @@ pub enum Error {
#[derive(Debug, Eq, PartialEq, Clone, Copy, Default, PartialOrd, Ord, Hash)]
pub enum ImplementationName {
GraalPy,
PyPy,
#[default]
CPython,
PyPy,
GraalPy,
}
#[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd, Hash)]
pub enum LenientImplementationName {
Known(ImplementationName),
Unknown(String),
Known(ImplementationName),
}
impl ImplementationName {