Do not match cpython 3.10 for cpython-3.1 (#17972)
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> bug fix, in find version 3.1 should not match 3.10 ## Test Plan <!-- How was it tested? --> --------- Co-authored-by: konstin <konstin@mailbox.org> Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
@@ -27,7 +27,7 @@ use which::{which, which_all};
|
||||
|
||||
use crate::downloads::{ManagedPythonDownloadList, PlatformRequest, PythonDownloadRequest};
|
||||
use crate::implementation::ImplementationName;
|
||||
use crate::installation::PythonInstallation;
|
||||
use crate::installation::{PythonInstallation, PythonInstallationKey};
|
||||
use crate::interpreter::Error as InterpreterError;
|
||||
use crate::interpreter::{StatusCodeError, UnexpectedResponseError};
|
||||
use crate::managed::{ManagedPythonInstallations, PythonMinorVersionLink};
|
||||
@@ -2975,6 +2975,14 @@ impl VersionRequest {
|
||||
}
|
||||
}
|
||||
|
||||
/// Check if a [`PythonInstallationKey`] is compatible with the request.
|
||||
///
|
||||
/// WARNING: Use [`VersionRequest::matches_interpreter`] too. This method is only suitable to
|
||||
/// avoid querying interpreters if it's clear it cannot fulfill the request.
|
||||
pub(crate) fn matches_installation_key(&self, key: &PythonInstallationKey) -> bool {
|
||||
self.matches_major_minor_patch_prerelease(key.major, key.minor, key.patch, key.prerelease())
|
||||
}
|
||||
|
||||
/// Whether a patch version segment is present in the request.
|
||||
fn has_patch(&self) -> bool {
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user