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

Direct URL constraints are ignored #1467

Closed
sbidoul opened this issue Feb 16, 2024 · 3 comments · Fixed by #1565
Closed

Direct URL constraints are ignored #1467

sbidoul opened this issue Feb 16, 2024 · 3 comments · Fixed by #1565
Assignees
Labels
bug Something isn't working

Comments

@sbidoul
Copy link

sbidoul commented Feb 16, 2024

It seems that uv does not honor constraints that are Direct URLs.

Assuming you have a direct URL for pkga in constraints.txt, uv pip install pkga -c constraints.txt fails saying pkga is not found in the package registry.

Here is a reproducer:

#/bin/bash

cd $(mktemp -d)

mkdir pkga
cat <<EOF > pkga/pyproject.toml
[project]
name="pkga"
version="1.0"
EOF

cat <<EOF > constraints.txt
pkga @ file://$PWD/pkga
EOF

uv venv
source .venv/bin/activate

uv pip install pkga -c constraints.txt
@charliermarsh charliermarsh added the bug Something isn't working label Feb 16, 2024
@charliermarsh
Copy link
Member

Thanks! Will fix.

@charliermarsh charliermarsh self-assigned this Feb 17, 2024
charliermarsh added a commit that referenced this issue Feb 17, 2024
## Summary

This was just a missing line -- we have `dependencies.remove(&package);`
in the ~identical branch above, but it must've been an oversight to omit
it here.

Closes #1467.

## Test Plan

`cargo test`
@charliermarsh
Copy link
Member

Sorry about this, silly oversight in the code. Will go out in the next release, thanks!

@sbidoul
Copy link
Author

sbidoul commented Feb 17, 2024

That was quick, thanks!

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