Open blueraft opened 1 month ago
Huh can't reproduce this anymore, I'll close this.
I don't believe --universal
reads requires-python
from the input files, you have to specify -p 3.9
. By default it will use the major and minor version of the current interpreter as a lower bound.
Oh that's why the resolution got fixed.
Is there a reason why it doesn't read the requires-python
from the pyproject.toml
file?
--universal Perform a universal resolution, attempting to generate a single `requirements.txt` output file that is compatible with all operating systems,
architectures, and Python implementations
The 'and Python implementations' gives me the impression that it'd be compatible with requires-python
in the project metadata.
I think we don't want uv pip compile
to implicitly read a pyproject.toml but maybe if it's explicitly provided we should use the metadata? I believe we discussed this previously cc @charliermarsh
I'm a little hesitant to read from them but we can consider it.
Maybe only for --universal
, since that's a uv only thing?
I think it probably does make sense to pick a Python that meets the requires-python for all provided pyproject.toml files.
Happy to make a PR for this if you decide to support it!
Simple MRE:
The output is not universal since
networkx==3.3
only supports>=py3.10
.The lock file is correct though.
uv 0.2.35