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 lock to use overrides from tool.uv (#4108) #4446

Closed
wants to merge 1 commit into from

Conversation

idlsoft
Copy link
Contributor

@idlsoft idlsoft commented Jun 21, 2024

Summary

This will make uv lock read override-dependencies from the [tool.uv] section of pyproject.toml.
Resolves #4108

Alternative to #4369, an implementation more consistent with pip compile and pip install.

Test Plan

Unit test

@idlsoft idlsoft marked this pull request as ready for review June 21, 2024 23:32
@charliermarsh
Copy link
Member

I find it a bit strange that overrides are read as configuration (via the settings schema) rather than as part of the pyproject.toml itself, i.e., part of the workspace data (similar to, like, tool.uv.dev-dependencies). I guess this is necessary to respect these overrides in the pip API in addition to uv lock etc.?

@charliermarsh
Copy link
Member

charliermarsh commented Jun 23, 2024

I feel like the approach in #4369 is, perhaps, more correct (but only reading from the workspace root)? What do you think @konstin - which approach is more natural to you? Here we're reading the overrides as settings, but we then have the workspace root available to us in uv lock.

charliermarsh pushed a commit that referenced this pull request Jun 24, 2024
## Summary

This will make `uv lock` read `override-dependencies` from the
`[tool.uv]` section of `pyproject.toml`.
Resolves #4108

This [other](#4446) implementation
touches more code but seems more consistent.

## Test Plan

Unit test
@charliermarsh
Copy link
Member

Closing in favor of #4369. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pyproject defined override dependencies ignored by uv lock and uv sync
3 participants