Open
Description
Summary
uv pip
doesn't support constraint files with spaces:
$ echo "pytest~=7" > "constraints file.txt"
$ uv pip install pytest -c "constraints file.txt"
error: File not found: `constraints`
While pip does:
$ .venv/bin/pip install pytest -c "constraints file.txt"
ERROR: Invalid requirement: 'pytest~=7': Expected end or semicolon (after name and no valid version specifier)
pytest~=7
^ (from line 1 of constraints file.txt)
(Ignore the fact I don't know how to write a constraint file, oops)
Note this is different than PIP_CONSTRAINT
, which does not support spaces, and instead requires URIs since spaces are used to input multiple files.
I was trying to use uv in more places in cibuildwheel and ran into this, we test paths with spaces since they are common on Windows. pypa/cibuildwheel#2322
Platform
All
Version
uv 0.6.10 (Homebrew 2025-03-26) (and others)
Python version
No response