Skip to content

Migrate tool.poetry.build-constraints to tool.uv.build-constraint-dependencies #655

@mkniewallner

Description

@mkniewallner

Poetry 2.3 added support for build constraints, e.g.:

[tool.poetry.build-constraints]
some-package = { setuptools = "<78" }

uv also supports this feature, but contrarily to Poetry, it is a list that applies to all packages, e.g.:

[tool.uv]
build-constraint-dependencies = ["setuptools<78"]

There is an issue to support build constraints per package (astral-sh/uv#14461).

Until this gets implemented, we could try to combine all constraints from tool.poetry.build-constraints and convert them to tool.uv.build-constraint-dependencies if there are no conflicts, or error out if there are conflicts.

It does change the behaviour, as constraints would apply to all packages when migrated, but it might be better than completely loosing the constraints. We could print a warning in case we are able to perform the migration, to warn about the behaviour change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmanager:poetryRelates to Poetry package manager

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions