Skip to content

Commit e1ccc29

Browse files
committed
Remove deprecated pytest-runner support
The pytest-runner package is deprecated and its use is discouraged. See: https://github.com/pytest-dev/pytest-runner/ > pytest-runner 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. See > also pypa/setuptools#1684. > > It is recommended that you: > > - Remove 'pytest-runner' from your 'setup_requires', preferably > removing the setup_requires option. > - Remove 'pytest' and any other testing requirements from > 'tests_require', preferably removing the setup_requires option. > - Select a tool to bootstrap and then run tests such as tox Running tests should go through the tox entrypoint.
1 parent 5965437 commit e1ccc29

3 files changed

Lines changed: 1 addition & 10 deletions

File tree

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ co:
1515
done
1616

1717
coverage:
18-
python3 selftest.py
19-
python3 setup.py test
18+
pytest -qq
2019
rm -r htmlcov || true
2120
coverage report
2221

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[aliases]
2-
test=pytest
3-
41
[flake8]
52
extend-ignore = E203, W503
63
max-line-length = 88

setup.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -845,9 +845,6 @@ def debug_build():
845845
return hasattr(sys, "gettotalrefcount")
846846

847847

848-
needs_pytest = {"pytest", "test", "ptr"}.intersection(sys.argv)
849-
pytest_runner = ["pytest-runner"] if needs_pytest else []
850-
851848
try:
852849
setup(
853850
name=NAME,
@@ -884,8 +881,6 @@ def debug_build():
884881
cmdclass={"build_ext": pil_build_ext},
885882
ext_modules=[Extension("PIL._imaging", ["_imaging.c"])],
886883
include_package_data=True,
887-
setup_requires=pytest_runner,
888-
tests_require=["pytest"],
889884
packages=["PIL"],
890885
package_dir={"": "src"},
891886
keywords=["Imaging"],

0 commit comments

Comments
 (0)