uv
cc4600ce - Fix dropped support of `-` in pip constraints/overrides/excludes/build_constraints (#17188)

Commit
15 days ago
Fix dropped support of `-` in pip constraints/overrides/excludes/build_constraints (#17188) Since #16923, `-` stdin paths are suddenly only supported on the `RequirementsSource::Extensionless`. However, parsing of cli arguments using `from_requirements_txt`, `from_constraints_txt` `from_overrides_txt` would always output a `RequirementsSource::RequirementsTxt`. Resulting in the error: ``` $ cat overrides.txt | cargo run --bin uv --profile dev --manifest-path ./uv/crates/uv/Cargo.toml pip install 'numpy' --overrides=- Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.22s Running `./uv/target/debug/uv pip install 'numpy' --overrides=-` error: File not found: `-` ``` In this PR, I've added a small check in those for the `-` paths to use `RequirementsSource::ExtensionLess`. I'm not too sure about this change though, as it would also implicitly start allowing PEP 723 scripts as input to overrides/constraints. I don't see the direct issue in that, but then maybe we should explicitly handle it so that an `--overrides=script.py` would also be supported. @zanieb what do you think? Relates to #17227
Author
Parents
Loading