From ccd3874d7a62d1cd44f6d2483d8112d980f6c0f5 Mon Sep 17 00:00:00 2001 From: James Myatt Date: Mon, 11 Oct 2021 13:28:27 +0100 Subject: [PATCH] Recommend not integrating with setuptools (#9185) --- doc/en/explanation/goodpractices.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/en/explanation/goodpractices.rst b/doc/en/explanation/goodpractices.rst index 90765dd92..33db40867 100644 --- a/doc/en/explanation/goodpractices.rst +++ b/doc/en/explanation/goodpractices.rst @@ -248,3 +248,20 @@ dependencies and then executing a pre-configured test command with options. It will run tests against the installed package and not against your source code checkout, helping to detect packaging glitches. + +Do not run via setuptools +------------------------- + +Integration with setuptools is **not recommended**, +i.e. you should not be using ``python setup.py test`` or ``pytest-runner``, +and may stop working in the future. + +This is deprecated since it depends on deprecated features of setuptools +and relies on features that break security mechanisms in pip. +For example 'setup_requires' and 'tests_require' bypass ``pip --require-hashes``. +For more information and migration instructions, +see the `pytest-runner notice `_. +See also `pypa/setuptools#1684 `_. + +setuptools intends to +`remove the test command `_.