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 compile skips optional dependencies #3343

Closed
nmichlo opened this issue May 3, 2024 · 2 comments
Closed

uv pip compile skips optional dependencies #3343

nmichlo opened this issue May 3, 2024 · 2 comments
Labels
duplicate This issue or pull request already exists question Asking for clarification or support

Comments

@nmichlo
Copy link

nmichlo commented May 3, 2024

Create r.txt

qdrant-client~=1.6.1

uv:

Now compile:

uv pip compile r.txt

Gives:

# This file was autogenerated by uv via the following command:
#    uv pip compile r.txt
annotated-types==0.6.0
    # via pydantic
anyio==4.3.0
    # via httpx
certifi==2024.2.2
    # via
    #   httpcore
    #   httpx
exceptiongroup==1.2.1
    # via anyio
grpcio==1.63.0
    # via
    #   grpcio-tools
    #   qdrant-client
grpcio-tools==1.63.0
    # via qdrant-client
h11==0.14.0
    # via httpcore
h2==4.1.0
    # via httpx
hpack==4.0.0
    # via h2
httpcore==1.0.5
    # via httpx
httpx==0.27.0
    # via qdrant-client
hyperframe==6.0.1
    # via h2
idna==3.7
    # via
    #   anyio
    #   httpx
numpy==1.26.4
    # via qdrant-client
portalocker==2.8.2
    # via qdrant-client
protobuf==5.26.1
    # via grpcio-tools
pydantic==2.7.1
    # via qdrant-client
pydantic-core==2.18.2
    # via pydantic
qdrant-client==1.6.9
setuptools==69.5.1
    # via grpcio-tools
sniffio==1.3.1
    # via
    #   anyio
    #   httpx
typing-extensions==4.11.0
    # via
    #   anyio
    #   pydantic
    #   pydantic-core
urllib3==1.26.18
    # via qdrant-client

The important difference to look for is httpx==0.27.0

pip-tools v7:

Compare this to pip-tools

pip-compile r.txt -o out.txt

Output

#
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
#    pip-compile --output-file=out.txt r.txt
#
annotated-types==0.6.0
    # via pydantic
anyio==4.3.0
    # via httpx
certifi==2024.2.2
    # via
    #   httpcore
    #   httpx
exceptiongroup==1.2.1
    # via anyio
grpcio==1.63.0
    # via
    #   grpcio-tools
    #   qdrant-client
grpcio-tools==1.63.0
    # via qdrant-client
h11==0.14.0
    # via httpcore
h2==4.1.0
    # via httpx
hpack==4.0.0
    # via h2
httpcore==1.0.5
    # via httpx
httpx[http2]==0.27.0
    # via qdrant-client
hyperframe==6.0.1
    # via h2
idna==3.7
    # via
    #   anyio
    #   httpx
numpy==1.26.4
    # via qdrant-client
portalocker==2.8.2
    # via qdrant-client
protobuf==5.26.1
    # via grpcio-tools
pydantic==2.7.1
    # via qdrant-client
pydantic-core==2.18.2
    # via pydantic
qdrant-client==1.6.9
    # via -r r.txt
sniffio==1.3.1
    # via
    #   anyio
    #   httpx
typing-extensions==4.11.0
    # via
    #   anyio
    #   pydantic
    #   pydantic-core
urllib3==1.26.18
    # via qdrant-client

# The following packages are considered to be unsafe in a requirements file:
# setuptools

The important difference to look for is httpx[http2]==0.27.0

ALTHOUGH, in version v8 the --strip-extras flag is being added which can remove this.

@zanieb
Copy link
Member

zanieb commented May 3, 2024

Hi looks like a duplicate of #2163 — the default behavior is changing in pip-tools to match ours. You can use --no-strip-extras if you want it.

@zanieb zanieb closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
@zanieb zanieb added duplicate This issue or pull request already exists question Asking for clarification or support labels May 3, 2024
@nmichlo
Copy link
Author

nmichlo commented May 7, 2024

Oops, thank you! Didn't realise that --no-strip-extras was already added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

2 participants