Skip to content
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

uv pip sync requirements.txt does nothing on 0.2.6 with python_full_version specified #4044

Closed
sterliakov opened this issue Jun 5, 2024 · 3 comments · Fixed by #4051
Closed
Assignees
Labels
bug Something isn't working

Comments

@sterliakov
Copy link

With the following requirements.txt:

annotated-types==0.7.0 ; python_full_version >= "3.11.7" and python_full_version < "3.12.0"

(generated by poetry export, with hashes removed manually because they change nothing in this report)

Runnning

uv pip sync requirements.txt

I get

Resolved 0 packages in 1ms
Audited 0 packages in 0.02ms

Full repro script:

python -m venv venv
. venv/bin/activate
pip install 'uv == 0.2.6'
#Collecting uv==0.2.6
#  Obtaining dependency information for uv==0.2.6 from https://files.pythonhosted.org/packages/c3/b9/9d3e14257af3e06ee8ec865b22985ba9b5a6ca59411fc99197bfac0c5973/uv-0.2.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
#  Using cached uv-0.2.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (32 kB)
#Using cached uv-0.2.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.5 MB)
#Installing collected packages: uv
#Successfully installed uv-0.2.6
#
#[notice] A new release of pip is available: 23.2.1 -> 24.0
#[notice] To update, run: pip install --upgrade pip
uv --version
#uv 0.2.6
python --version
#Python 3.11.7
which python
#/tmp/venv/bin/python
which uv
#/tmp/venv/bin/uv
echo 'annotated-types==0.7.0 ; python_full_version >= "3.11.7" and python_full_version < "3.12.0"' > requirements.txt
uv pip sync requirements.txt 
#Resolved 0 packages in 1ms
#Audited 0 packages in 0.02ms
ls venv/lib/python3.11/site-packages/
# _distutils_hack  distutils-precedence.pth  pip  pip-23.2.1.dist-info  pkg_resources  setuptools  setuptools-65.5.0.dist-info  uv  uv-0.2.6.dist-info

This repro's with uv 0.2.6 on Ubuntu 22.04 and in docker (public.ecr.aws/docker/library/python:3.11-slim-bookworm). Pinning to 0.2.5 resolves the issue.

@sterliakov
Copy link
Author

This has nothing to do with the specific python versions: requiring

annotated-types==0.7.0 ; python_full_version >= "3.11.6" and python_full_version < "3.12.0"

(so that current version is strictly greater) or even

annotated-types==0.7.0 ; python_full_version < "3.12.0"
# or
annotated-types==0.7.0 ; python_full_version > "3.10.0"

does not help.

@charliermarsh
Copy link
Member

I can take a look. Not obvious to me what changed.

@charliermarsh charliermarsh self-assigned this Jun 5, 2024
@charliermarsh charliermarsh added the bug Something isn't working label Jun 5, 2024
@charliermarsh
Copy link
Member

Ah ok, it's an issue that's specific to pip sync. pip install should work if you need a workaround. But I will fix it today.

charliermarsh added a commit that referenced this issue Jun 5, 2024
## Summary

Thankfully this is pretty rare since `pip sync` is usually run on `pip
compile` output, and `pip compile` never outputs markers.

Closes #4044
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants