Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiple source entries for each package in
tool.uv.sources
(#…
…7745) ## Summary This PR enables users to provide multiple source entries in `tool.uv.sources`, e.g.: ```toml [tool.uv.sources] httpx = [ { git = "https://github.com/encode/httpx", tag = "0.27.2", marker = "sys_platform == 'darwin'" }, { git = "https://github.com/encode/httpx", tag = "0.24.1", marker = "sys_platform == 'linux'" }, ] ``` The implementation is relatively straightforward: when we lower the requirement, we now return an iterator rather than a single requirement. In other words, the above is transformed into two requirements: ```txt httpx @ git+https://github.com/encode/httpx@0.27.2 ; sys_platform == 'darwin' httpx @ git+https://github.com/encode/httpx@0.24.1 ; sys_platform == 'linux' ``` We verify (at deserialization time) that the markers are non-overlapping. Closes #3397.
- Loading branch information