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

Understand --editable=. also in requirements.txt #10941

Closed
amotl opened this issue Jan 24, 2025 · 4 comments · Fixed by #10954
Closed

Understand --editable=. also in requirements.txt #10941

amotl opened this issue Jan 24, 2025 · 4 comments · Fixed by #10954
Assignees
Labels
bug Something isn't working compatibility Compatibility with a specification or another tool needs-decision Undecided if this should be done

Comments

@amotl
Copy link

amotl commented Jan 24, 2025

Hi. Thanks a stack for conceiving uv. It is a true game changer in so many scenarios. 💯

Summary

requirements.txt files can reference dependencies of the local package at hand inside the working tree by using different option syntax like -e ., --editable ., or --editable=., iirc.

We are using the latter variant throughout our projects 1, but it trips uv:

$ uv pip install -r docs/requirements.txt
error: Couldn't parse requirement in `docs/requirements.txt` at position 122
  Caused by: Expected package name starting with an alphanumeric character, found `=`
=.
^

Maybe this little report can help to make uv more universal in edge case situations like ours. It is certainly not a blocking issue for us, as we can easily update the offending line to use -e . instead of --editable=..

References

Platform

Darwin 22.6.0 x86_64

Version

uv 0.5.23 (Homebrew 2025-01-23)

Python version

Python 3.13.1

Footnotes

  1. Example: https://github.com/crate/crate-docs-theme/blob/0.37.2/docs/requirements.txt

@amotl amotl added the bug Something isn't working label Jan 24, 2025
@zanieb
Copy link
Member

zanieb commented Jan 24, 2025

Thanks for the clear report. I'm of the opinion that we shouldn't support this, but am curious what others think.

@zanieb zanieb added compatibility Compatibility with a specification or another tool needs-decision Undecided if this should be done labels Jan 24, 2025
@charliermarsh
Copy link
Member

I'm sort of fine with it, since it seems pretty trivial.

@charliermarsh charliermarsh self-assigned this Jan 25, 2025
@charliermarsh
Copy link
Member

Oh interesting, we already support this for most values (but not --editable), that seems like an oversight.

charliermarsh added a commit that referenced this issue Jan 25, 2025
## Summary

We allow this for all other argument flags; seems like an oversight.

Closes #10941.
@amotl
Copy link
Author

amotl commented Jan 25, 2025

That was fast. Thank you for improving per GH-10954 so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility Compatibility with a specification or another tool needs-decision Undecided if this should be done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants