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 export --without-hashes #6944

Closed
maxfirman opened this issue Sep 2, 2024 · 6 comments · Fixed by #6954
Closed

uv export --without-hashes #6944

maxfirman opened this issue Sep 2, 2024 · 6 comments · Fixed by #6954
Assignees
Labels
configuration Settings and such needs-decision Undecided if this should be done

Comments

@maxfirman
Copy link

Please could you add a --without-hashes option to uv export similar to pdm export

@charliermarsh
Copy link
Member

What's the motivation for excluding hashes?

@charliermarsh charliermarsh added configuration Settings and such needs-decision Undecided if this should be done labels Sep 2, 2024
@maxfirman
Copy link
Author

I'm trying to migrate an existing process. There is a CI pipeline stage which installs dependencies with a requirements.txt which fails with:

ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    sqlglot[rs] from .....

Previously I was generating the requirements.txt using pdm export --without-hashes and this was working. I'm not 100% sure why it doesn't like the hashes. I'm guessing it could be related to the order in which the index and extra-index-urls are specified, perhaps there is a different index resolution order between the environments where I ran uv lock.

Unfortunately I don't own the code in the ci pipeline stage, otherwise I would just change it to use uv sync

@maxfirman
Copy link
Author

I wonder whether this could be mitigated if uv export were to include the index-url and extra-index-url in the requirements.txt. I know that pip-compile does this. I will test this theory.

@charliermarsh
Copy link
Member

Thanks. Is that error coming from a pip install call or a uv call?

@maxfirman
Copy link
Author

pip install

@charliermarsh
Copy link
Member

I suppose it's reasonable to allow this given that pip doesn't have a way to turn it off.

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

Closes #6944.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Settings and such needs-decision Undecided if this should be done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants