Skip to content

requires-poetry should run before validating the pyproject.toml schema #10582

@mscheifer

Description

@mscheifer

Issue Kind

Change in current behaviour

Description

I recently hit #10558 which is solved by upgrading to poetry 2.2.1. I also increased my requires-poetry version to 2.2.1 hoping that it would give a cleaner error message for others but it does not, as poetry checks that the schema of pyproject.toml before checking requires-poetry.

It seems to me that schema changes to pyproject.toml are the primary type of change where you would want to increase your requires-poetry version. So it would be nice if poetry would have a simple code path to check the required poetry version that bypasses schema validation.

Expected Output:

This project requires Poetry >=2.2.1, but you are using Poetry 2.2.0

Actual Output:

The Poetry configuration is invalid:
  - tool.poetry.group.editor cannot be validated by any definition

Impact

Developers would not be confused when projects update to use new poetry versions.

Workarounds

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions