Per PEP 440, a version specifier must contain a comparison operator (i.e. >, ==, etc). Connect expects a PEP-440 compliant version specifier for the environment.python.requires manifest property.
A few options that I see:
- Ensure that
.python-version is a valid version specifier; otherwise, skip.
- Modify the version that we get from
.python-version to make it a compliant version specifier (i.e. prepend ==)
- Do not use
.python-version at all 🤷
I'm fine with any of these, but here's my 2 cents:
Given that .python-version appears to be pretty bespoke for uv and can contain a wide variety of non-version-specifier values (see https://docs.astral.sh/uv/concepts/python-versions/#requesting-a-version), then I'd vote to drop the precedence of .python-version below pyproject.toml and setup.cfg, and then (1) skip if not a valid version specifier.
@amol- What do you think?