astral-sh/uv

Add a hint when free-threaded selector is used in `requires-python`

Open

Aperta il 3 dic 2025

Vedi su GitHub
 (5 commenti) (1 reazione) (0 assegnatari)Rust (84.934 star) (3111 fork)batch import
enhancementerror messageshelp wanted

Descrizione

Summary

See https://github.com/astral-sh/uv/issues/16951

We should be able to suggest a resolution here

Example

error: Failed to parse: `pyproject.toml`
  Caused by: TOML parse error at line 4, column 19
  |
4 | requires-python = ">=3.14t"
  |                   ^^^^^^^^^
Failed to parse version: after parsing `3.14`, found `t`, which is not part of a valid version:
>=3.14t
^^^^^^^

hint: `requires-python` cannot include a free-threaded selector, consider using `uv python pin 3.14t` instead

Guida contributor