File tree 3 files changed +2
-20
lines changed
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:
41
41
42
42
43
43
def 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
-
57
44
from . import _validate_pyproject as validator
58
45
59
46
trove_classifier = validator .FORMAT_FUNCTIONS .get ("trove-classifier" )
Original file line number Diff line number Diff line change 17
17
)
18
18
from setuptools .dist import Distribution
19
19
from setuptools .errors import OptionError
20
- from setuptools .warnings import SetuptoolsWarning
21
20
22
21
import distutils .core
23
22
@@ -395,9 +394,3 @@ def test_warn_tools_typo(tmp_path):
395
394
396
395
with pytest .warns (_ToolsTypoInMetadata ):
397
396
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