mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Respect release-only semantics of python_full_version when constructing markers (#6171)
## Summary In the resolver, we use release-only semantics to normalize `python_full_version`. So, if we see `python_full_version < '3.13'`, we treat that as `(Unbounded, Exclude(3.13))`. `3.13b0` evaluates as `true` to that range, so we were accepting pre-releases for these markers. Instead, we need to exclude pre-release segments when performing these evaluations. Closes https://github.com/astral-sh/uv/issues/6169. ## Test Plan Hard to write a test for this because you need a pre-release Python locally... so: `echo "sqlalchemy==2.0.32" | cargo run pip compile - --python 3.13 -n`
This commit is contained in:
parent
ad8e3a2c32
commit
5ac0b98e00
7 changed files with 61 additions and 8 deletions
|
@ -155,7 +155,7 @@ impl<'a> BuildContext for BuildDispatch<'a> {
|
|||
.index_strategy(self.index_strategy)
|
||||
.build(),
|
||||
&python_requirement,
|
||||
ResolverMarkers::SpecificEnvironment(markers.clone()),
|
||||
ResolverMarkers::specific_environment(markers.clone()),
|
||||
Some(tags),
|
||||
self.flat_index,
|
||||
self.index,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue