uv
bf79d985 - Allow incompatible `requires-python` for source distributions with static metadata (#8768)

Commit
1 year ago
Allow incompatible `requires-python` for source distributions with static metadata (#8768) ## Summary At present, when we have a Python requirement and we see a wheel, we verify that the Python requirement is compatible with the wheel. For source distributions, though, we verify that both the Python requirement _and_ the currently-installed version are compatible, because we assume that we'll need to build the source distribution in order to get metadata. However, we can often extract source distribution metadata _without_ building (e.g., if there's a `pyproject.toml` with no dynamic keys). This PR thus modifies the source distribution handling to defer that incompatibility ("We couldn't get metadata for this project, because it has no static metadata and requires a higher Python version to run / build") until we actually try to build the package. As a result, you can now resolve source distribution-only packages using Python versions below their `requires-python`, as long as they include static metadata. Closes https://github.com/astral-sh/uv/issues/8767.
Author
Parents
Loading