Skip to content

Misleading error message when requires-python doesn’t match environment Python #2181

@flying-sheep

Description

@flying-sheep

I recently changed requires-python to >=3.12 and forgot to change CI.

In CI I then saw

Environment hatch-test.py3.11 is incompatible: cannot locate Python: 3.11

which is misleading: it shouldn’t say it “cannot locate” it when it doesn’t consider it since it’s incompatible.

I think if the specified Python version for an environment isn’t possible, Hatch should say that more clearly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions