diff options
| author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-03-30 21:18:23 +0100 |
|---|---|---|
| committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-03-30 21:18:23 +0100 |
| commit | 93d8b0d917e805360649ebfdae9c223494943faa (patch) | |
| tree | 26243659a4b7531ec75127de87b2d0b3ec8c2e10 /setuptools | |
| parent | 7a66ab24766002c8dff8bb0d8a315c23a3fbc9fd (diff) | |
| download | python-setuptools-git-93d8b0d917e805360649ebfdae9c223494943faa.tar.gz | |
Disable automatic download of trove classifiers by default
This helps to improve reproducibility.
See #abravalheri/validate-pyproject#31.
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/config/pyprojecttoml.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/setuptools/config/pyprojecttoml.py b/setuptools/config/pyprojecttoml.py index 2481b63a..d4024956 100644 --- a/setuptools/config/pyprojecttoml.py +++ b/setuptools/config/pyprojecttoml.py @@ -29,6 +29,11 @@ def load_file(filepath: _Path) -> dict: def validate(config: dict, filepath: _Path) -> bool: from . import _validate_pyproject as validator + trove_classifier = validator.FORMAT_FUNCTIONS.get("trove-classifier") + if hasattr(trove_classifier, "_disable_download"): + # Improve reproducibility by default. See issue 31 for validate-pyproject. + trove_classifier._disable_download() # type: ignore + try: return validator.validate(config) except validator.ValidationError as ex: |
