-
-
Notifications
You must be signed in to change notification settings - Fork 355
Open
Description
Problem: Some uv settings, set in pyproject.toml, aren't respected, whereas some are.
Steps to reproduce:
# pyproject.toml
[tool.uv.sources]
pytest = { index = "pypi" }
[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple/"
explicit = true
[[tool.uv.index]]
name = "another"
url = "https://something.wrong"
default = true
[tool.hatch.envs.example]
installer = "uv"
dependencies = [
"pytest",
]Run command:
% hatch run example:trueExpected output: The command finishes successfully, as a package is found in https://pypi.org/simple/.
Actual output:
error: Failed to fetch: `https://something.wrong/pytest/`
Caused by: Could not connect, are you offline?
Caused by: Request failed after 3 retries
Caused by: error sending request for url (https://something.wrong/pytest/)
Caused by: client error (Connect)
Caused by: dns error: failed to lookup address information: nodename nor servname provided, or not known
Caused by: failed to lookup address information: nodename nor servname provided, or not knownIn case default and explicit are swapped:
# pyproject.toml
[tool.uv.sources]
pytest = { index = "another" }
[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple/"
default = true
[[tool.uv.index]]
name = "another"
url = "https://something.wrong"
explicit = true
[tool.hatch.envs.example]
installer = "uv"
dependencies = [
"pytest",
]Then the command finishes successfully. It means that [[tool.uv.index]] seems to be respected, whereas [tool.uv.sources] is not.
ods, nikitagashkov and tongke6
Metadata
Metadata
Assignees
Labels
No labels