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.
Poetry 2.3 added support for build constraints, e.g.:
uv also supports this feature, but contrarily to Poetry, it is a list that applies to all packages, e.g.:
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-constraintsand convert them totool.uv.build-constraint-dependenciesif 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.