File tree Expand file tree Collapse file tree 3 files changed +2
-20
lines changed Expand file tree Collapse file tree 3 files changed +2
-20
lines changed Original file line number Diff line number Diff line change 1+ Removed support for ``SETUPTOOLS_DANGEROUSLY_SKIP_PYPROJECT_VALIDATION ``, as it
2+ is deemed prone to errors.
Original file line number Diff line number Diff line change @@ -41,19 +41,6 @@ def load_file(filepath: StrPath) -> dict:
4141
4242
4343def validate (config : dict , filepath : StrPath ) -> bool :
44- skip = os .getenv ("SETUPTOOLS_DANGEROUSLY_SKIP_PYPROJECT_VALIDATION" , "false" )
45- if skip .lower () == "true" : # https://github.com/pypa/setuptools/issues/4459
46- SetuptoolsWarning .emit (
47- "Skipping the validation of `pyproject.toml`." ,
48- """
49- Please note that some setuptools functionalities rely on the validation of
50- `pyproject.toml` against misconfiguration to ensure proper operation.
51- By skipping the automatic checks, you taking responsibility for making sure
52- the file is valid. Otherwise unexpected behaviours may occur.
53- """ ,
54- )
55- return True
56-
5744 from . import _validate_pyproject as validator
5845
5946 trove_classifier = validator .FORMAT_FUNCTIONS .get ("trove-classifier" )
Original file line number Diff line number Diff line change 1717)
1818from setuptools .dist import Distribution
1919from setuptools .errors import OptionError
20- from setuptools .warnings import SetuptoolsWarning
2120
2221import distutils .core
2322
@@ -395,9 +394,3 @@ def test_warn_tools_typo(tmp_path):
395394
396395 with pytest .warns (_ToolsTypoInMetadata ):
397396 read_configuration (pyproject )
398-
399-
400- def test_warn_skipping_validation (monkeypatch ):
401- monkeypatch .setenv ("SETUPTOOLS_DANGEROUSLY_SKIP_PYPROJECT_VALIDATION" , "true" )
402- with pytest .warns (SetuptoolsWarning , match = "Skipping the validation" ):
403- assert validate ({"completely-wrong" : "data" }, "pyproject.toml" ) is True
You can’t perform that action at this time.
0 commit comments