astral-sh / uv

An extremely fast Python package installer and resolver, written in Rust.
https://astral.sh/
Apache License 2.0
14.72k stars 419 forks source link

Python version limited requirement in universal locking #4668

Open davidfritzsche opened 1 week ago

davidfritzsche commented 1 week ago

With uv 0.2.18 the following fails

$ echo 'uv;python_version>="3.8"' | uv pip compile -p 3.7 --universal -
warning: uv is only compatible with Python 3.8+, found Python 3.7.17.
  × No solution found when resolving dependencies:

Which on one hand makes sense, as there really is no version of uv supporting Python 3.7. On the other hand, uv==X; python_version>="3.8" could be installed under Python 3.7 for any version X.

In non-universal locking, uv;python_version>="3.8" can be compiled for Python 3.7:

$ echo 'uv;python_version>="3.8"' | uv pip compile -p 3.7 -
warning: uv is only compatible with Python 3.8+, found Python 3.7.17.
Resolved 0 packages in 0.77ms
# This file was autogenerated by uv via the following command:
#    uv pip compile -p 3.7 -
charliermarsh commented 1 week ago

Oh thank you, I think this is the same as #4669 -- sorry, I missed that you created this.

charliermarsh commented 1 week ago

I'm going to merge into #4669. Good bug!

charliermarsh commented 6 days ago

Re-opening because this case is a little different than the NumPy one and they'll have separate PRs.