diff --git a/pyproject.toml b/pyproject.toml index f5441ddf0af..9f3c41127bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -129,19 +129,15 @@ eager_resources = "setuptools.dist:assert_string_list" namespace_packages = "setuptools.dist:check_nsp" extras_require = "setuptools.dist:check_extras" install_requires = "setuptools.dist:check_requirements" -tests_require = "setuptools.dist:check_requirements" setup_requires = "setuptools.dist:check_requirements" python_requires = "setuptools.dist:check_specifier" entry_points = "setuptools.dist:check_entry_points" -test_suite = "setuptools.dist:check_test_suite" zip_safe = "setuptools.dist:assert_bool" package_data = "setuptools.dist:check_package_data" exclude_package_data = "setuptools.dist:check_package_data" include_package_data = "setuptools.dist:assert_bool" packages = "setuptools.dist:check_packages" dependency_links = "setuptools.dist:assert_string_list" -test_loader = "setuptools.dist:check_importable" -test_runner = "setuptools.dist:check_importable" use_2to3 = "setuptools.dist:invalid_unless_false" [project.entry-points."egg_info.writers"] diff --git a/setuptools/config/setupcfg.py b/setuptools/config/setupcfg.py index 80ebe3d9bd5..7dbcbe60ece 100644 --- a/setuptools/config/setupcfg.py +++ b/setuptools/config/setupcfg.py @@ -646,7 +646,6 @@ def parsers(self): self._parse_requirements_list, "install_requires" ), 'setup_requires': self._parse_list_semicolon, - 'tests_require': self._parse_list_semicolon, 'packages': self._parse_packages, 'entry_points': self._parse_file_in_root, 'py_modules': parse_list, diff --git a/setuptools/dist.py b/setuptools/dist.py index 32e8d43c64a..a93c26deb5c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -170,11 +170,6 @@ def check_entry_points(dist, attr, value): raise DistutilsSetupError(e) from e -def check_test_suite(dist, attr, value): - if not isinstance(value, str): - raise DistutilsSetupError("test_suite must be a string") - - def check_package_data(dist, attr, value): """Verify that value is a dictionary of package names to glob lists""" if not isinstance(value, dict): @@ -235,12 +230,6 @@ class Distribution(_Distribution): EasyInstall and requests one of your extras, the corresponding additional requirements will be installed if needed. - 'test_suite' -- the name of a test suite to run for the 'test' command. - If the user runs 'python setup.py test', the package will be installed, - and the named test suite will be run. The format is the same as - would be used on a 'unittest.py' command line. That is, it is the - dotted name of an object to import and call to generate a test suite. - 'package_data' -- a dictionary mapping package names to lists of filenames or globs to use to find data files contained in the named packages. If the dictionary has filenames or globs listed under '""' (the empty diff --git a/setuptools/tests/config/setupcfg_examples.txt b/setuptools/tests/config/setupcfg_examples.txt index 5db3565464e..6aab887ff1f 100644 --- a/setuptools/tests/config/setupcfg_examples.txt +++ b/setuptools/tests/config/setupcfg_examples.txt @@ -15,7 +15,6 @@ https://github.com/pallets/click/raw/6411f425fae545f42795665af4162006b36c5e4a/se https://github.com/sqlalchemy/sqlalchemy/raw/533f5718904b620be8d63f2474229945d6f8ba5d/setup.cfg https://github.com/pytest-dev/pluggy/raw/461ef63291d13589c4e21aa182cd1529257e9a0a/setup.cfg https://github.com/pytest-dev/pytest/raw/c7be96dae487edbd2f55b561b31b68afac1dabe6/setup.cfg -https://github.com/tqdm/tqdm/raw/fc69d5dcf578f7c7986fa76841a6b793f813df35/setup.cfg https://github.com/platformdirs/platformdirs/raw/7b7852128dd6f07511b618d6edea35046bd0c6ff/setup.cfg https://github.com/pandas-dev/pandas/raw/bc17343f934a33dc231c8c74be95d8365537c376/setup.cfg https://github.com/django/django/raw/4e249d11a6e56ca8feb4b055b681cec457ef3a3d/setup.cfg diff --git a/setuptools/tests/config/test_apply_pyprojecttoml.py b/setuptools/tests/config/test_apply_pyprojecttoml.py index 6b3ee9cf1ec..9c07b285ea9 100644 --- a/setuptools/tests/config/test_apply_pyprojecttoml.py +++ b/setuptools/tests/config/test_apply_pyprojecttoml.py @@ -51,7 +51,6 @@ def test_apply_pyproject_equivalent_to_setupcfg(url, monkeypatch, tmp_path): dist_toml = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject_example) dist_cfg = setupcfg.apply_configuration(makedist(tmp_path), setupcfg_example) - _port_tests_require(dist_cfg) pkg_info_toml = core_metadata(dist_toml) pkg_info_cfg = core_metadata(dist_cfg) @@ -479,15 +478,3 @@ def core_metadata(dist) -> str: result.append(line + "\n") return "".join(result) - - -def _port_tests_require(dist): - """ - ``ini2toml`` "forward fix" deprecated tests_require definitions by moving - them into an extra called ``testing``. - """ - tests_require = getattr(dist, "tests_require", None) or [] - if tests_require: - dist.tests_require = [] - dist.extras_require.setdefault("testing", []).extend(tests_require) - dist._finalize_requires() diff --git a/setuptools/tests/config/test_setupcfg.py b/setuptools/tests/config/test_setupcfg.py index bf9777c6682..502b6eb5dc2 100644 --- a/setuptools/tests/config/test_setupcfg.py +++ b/setuptools/tests/config/test_setupcfg.py @@ -465,7 +465,6 @@ def test_basic(self, tmpdir): 'scripts = bin/one.py, bin/two.py\n' 'eager_resources = bin/one.py, bin/two.py\n' 'install_requires = docutils>=0.3; pack ==1.1, ==1.3; hey\n' - 'tests_require = mock==0.7.2; pytest\n' 'setup_requires = docutils>=0.3; spack ==1.1, ==1.3; there\n' 'dependency_links = http://some.com/here/1, ' 'http://some.com/there/2\n' @@ -494,7 +493,6 @@ def test_basic(self, tmpdir): 'spack ==1.1, ==1.3', 'there', ]) - assert dist.tests_require == ['mock==0.7.2', 'pytest'] assert dist.python_requires == '>=1.0, !=2.8' assert dist.py_modules == ['module1', 'module2'] @@ -521,9 +519,6 @@ def test_multiline(self, tmpdir): ' docutils>=0.3\n' ' pack ==1.1, ==1.3\n' ' hey\n' - 'tests_require = \n' - ' mock==0.7.2\n' - ' pytest\n' 'setup_requires = \n' ' docutils>=0.3\n' ' spack ==1.1, ==1.3\n' @@ -552,7 +547,6 @@ def test_multiline(self, tmpdir): 'spack ==1.1, ==1.3', 'there', ]) - assert dist.tests_require == ['mock==0.7.2', 'pytest'] def test_package_dir_fail(self, tmpdir): fake_env(tmpdir, '[options]\npackage_dir = a b\n') diff --git a/setuptools/tests/test_bdist_wheel.py b/setuptools/tests/test_bdist_wheel.py index 232b66d3685..46fcff548e7 100644 --- a/setuptools/tests/test_bdist_wheel.py +++ b/setuptools/tests/test_bdist_wheel.py @@ -98,7 +98,6 @@ setup_requires=["setuptools"], install_requires=["quux", "splort"], extras_require={"simple": ["simple.dist"]}, - tests_require=["foo", "bar>=10.0.0"], entry_points={ "console_scripts": [ "complex-dist=complexdist:main",