Skip to content

Comments

uv lock to use overrides from tool.uv (#4108)#4446

Closed
idlsoft wants to merge 1 commit intoastral-sh:mainfrom
idlsoft:lock_with_overrides_fs
Closed

uv lock to use overrides from tool.uv (#4108)#4446
idlsoft wants to merge 1 commit intoastral-sh:mainfrom
idlsoft:lock_with_overrides_fs

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 force-pushed the lock_with_overrides_fs branch from 2ae60ae to a73a073 Compare June 21, 2024 23:19
@idlsoft idlsoft marked this pull request as ready for review June 21, 2024 23:32
@konstin konstin requested a review from charliermarsh June 23, 2024 19:20
@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.

@idlsoft idlsoft force-pushed the lock_with_overrides_fs branch from a73a073 to fd96561 Compare June 24, 2024 14:00
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