-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to check python version compatibility of the package when installing or locking #7915
Comments
We don't respect upper-bounds on |
But |
No, because from our perspective the package has |
But then uv is incompatible with pip and pip-tools right? Because when i used “pip install .” It installed proper version of typing, which is 3.7.4.3 in python 3.8.13 environment. While uv insisted on 3.10.0.0. Also, when i used uv to compile requirements.txt file to install inside the docker container with pip, it just failed. If I compiled that file using pip-tools, everything works just fine. |
Yes, our handling of |
I read the discussion above and can understand the reason behind the decision. But the main problem here is the pip compatibility. In the Readme file, it says that uv provide "A pip-compatible interface". That's not correct right? Because |
uv is a drop-in replacement for common pip commands and operations (as stated in the README), but it’s not guaranteed that every command will behave in exactly the same way — we intentionally deviate when we think it’s correct or necessary to do so (and IMO it’s not really even possible to build a tool that upholds the contract that strictly). You can read more here: https://docs.astral.sh/uv/pip/compatibility/. (It’s definitely not common for the requires-python upper-bound to play a role in resolution like this, which is why it almost never comes up in issues.) If anything, I think it should be gated with a PEP 508 marker such that it’s not installed on Python 3.5 or later as per the package documentation. |
Thanks for your explanation. Now I'm more clear on how uv works. One last question though, the whole purpose of the command I hope that the Thanks a lot for creating a great tool with amazing performance. |
UV seems to not check the python version compatibility when installing new package using
uv pip install
oruv add
or locking package usinguv pip compile
oruv lock
. The bug found in uv latest version0.4.18
. The platform I'm using is fedora version 40To reproduce the bug, please take the following steps:
pyenv
pyenv local 3.8.13
python -m venv .venv source .venv/bin/activate pip install uv
pyproject.toml
file with the following content:typing
3.10.0.0
is installedYou should get the following error
When checking the html response at url https://pypi.org/simple/typing/, you can clearly see that for typing version 3.10.0.0, the required python version is
data-requires-python=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <3.5"
, which requires-python = ">=3.8,<3.9" inpyproject.toml
file does not satisfy.The text was updated successfully, but these errors were encountered: