Prioritize forks based on Python narrowing (#5642)
## Summary First part of: https://github.com/astral-sh/uv/issues/4926. We should solve forks that _don't_ expand the world of supported versions (e.g., `python_version >= '3.11'` enables us to select new packages, since we narrow the supported version range).
This commit is contained in:
@@ -350,6 +350,12 @@ impl<'de> serde::Deserialize<'de> for RequiresPython {
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
|
||||
pub struct RequiresPythonBound(Bound<Version>);
|
||||
|
||||
impl Default for RequiresPythonBound {
|
||||
fn default() -> Self {
|
||||
Self(Bound::Unbounded)
|
||||
}
|
||||
}
|
||||
|
||||
impl RequiresPythonBound {
|
||||
pub fn new(bound: Bound<Version>) -> Self {
|
||||
Self(match bound {
|
||||
|
||||
Reference in New Issue
Block a user