summaryrefslogtreecommitdiff
path: root/setuptools/config/_validate_pyproject/formats.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/config/_validate_pyproject/formats.py')
-rw-r--r--setuptools/config/_validate_pyproject/formats.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/setuptools/config/_validate_pyproject/formats.py b/setuptools/config/_validate_pyproject/formats.py
index 4f23d98a..f41fce38 100644
--- a/setuptools/config/_validate_pyproject/formats.py
+++ b/setuptools/config/_validate_pyproject/formats.py
@@ -131,12 +131,17 @@ class _TroveClassifier:
def __init__(self):
self.downloaded: typing.Union[None, False, typing.Set[str]] = None
+ self._skip_download = False
# None => not cached yet
# False => cache not available
self.__name__ = "trove_classifier" # Emulate a public function
+ def _disable_download(self):
+ # This is a private API. Only setuptools has the consent of using it.
+ self._skip_download = True
+
def __call__(self, value: str) -> bool:
- if self.downloaded is False:
+ if self.downloaded is False or self._skip_download is True:
return True
if os.getenv("NO_NETWORK") or os.getenv("VALIDATE_PYPROJECT_NO_NETWORK"):