Support for PEP 517 / pyproject.toml to avoid legacy build deprecation warnings
Hi,
While installing pytest-dependency, we’re seeing the following deprecation warning from pip:
DEPRECATION: Building 'pytest-dependency' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the --use-pep517option, (possibly combined with--no-build-isolation), or adding a pyproject.toml file to the source tree of 'pytest-dependency'. Discussion can be found at https://github.com/pypa/pip/issues/6334
We are currently planning to migrate from pytest-depends to pytest-dependency due to its support for class-scoped dependencies, which are critical for our use case.
Before committing to this change across our codebase, we’d like to confirm whether there's a plan to support PEP 517 and add a pyproject.toml file to the project.
If not, we may need to look into alternative solutions that are actively maintained and compatible with the latest Python packaging standards.
Thanks again for your work on this plugin, it’s solving a real problem for us.
Regards,
Mehmet ERMIS
Same here. Would you accept help to move to a more current build system?
Options for the build backend include:
- setuptools, like pytest or pluggy, pretty standard but complex because of the burden of compatibility with old projects
- flit, simpler for pure Python projects that (re)start from scratch
- hatch, suggested for pytest-cov in https://github.com/pytest-dev/pytest-cov/pull/551
Thanks for your efforts in modernizing the build system — much appreciated. Looking forward to seeing the PR merged!
Dear @makifermis, you will git rid of this deprecation warning if you install pytest-dependency using:
$ pip install --use-pep517 pytest-dependency
pytest-dependency installs flawlessly in this mode.
As I understand the discussion page cited in the warning, this is exactly what will change with pip 25.3 that this option will be implied. So there is no change to worry about.