pybuild-plugin-pyproject can be used along with dh-python to build Python packages using the system described in PEP 517 rather than the old-style setup.py build and setup.py install. This is a requirement for packages that use any of the newer Python build systems (flit, hatchling, poetry-core, etc.), but it can also be used for packages using setuptools.

Since setup.py install is deprecated upstream, we need to switch all packages that use dh-python (or dh-sequence-python3) over to use pybuild-plugin-pyproject as well, unless they override all the debhelper commands that call setup.py. In simple cases, this can be done by adding pybuild-plugin-pyproject to Build-Depends. debdiff should show the same binary package contents, except that /usr/lib/python3/dist-packages/*.egg-info/ directories are replaced by /usr/lib/python3/dist-packages/*.dist-info/ directories with somewhat different files.

However, there are various things that can go wrong with the conversion process:

Previous problems, now fixed:

1121735 requests a Lintian tag for packages using the deprecated system.