summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-03-30 21:17:46 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-03-30 21:17:46 +0100
commit7a66ab24766002c8dff8bb0d8a315c23a3fbc9fd (patch)
tree2434de384ce9f685c1586020fd83746eaae364ad
parent85c815d97500c8ab7efb8ed41b525b3927daf70c (diff)
downloadpython-setuptools-git-7a66ab24766002c8dff8bb0d8a315c23a3fbc9fd.tar.gz
Update validate-pyproject to v0.7.1
-rw-r--r--setuptools/config/_validate_pyproject/error_reporting.py2
-rw-r--r--setuptools/config/_validate_pyproject/formats.py7
-rw-r--r--tox.ini2
3 files changed, 8 insertions, 3 deletions
diff --git a/setuptools/config/_validate_pyproject/error_reporting.py b/setuptools/config/_validate_pyproject/error_reporting.py
index 3a4d4e9e..f78e4838 100644
--- a/setuptools/config/_validate_pyproject/error_reporting.py
+++ b/setuptools/config/_validate_pyproject/error_reporting.py
@@ -313,6 +313,6 @@ class _SummaryWriter:
def _separate_terms(word: str) -> List[str]:
"""
>>> _separate_terms("FooBar-foo")
- "foo bar foo"
+ ['foo', 'bar', 'foo']
"""
return [w.lower() for w in _CAMEL_CASE_SPLITTER.split(word) if w]
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"):
diff --git a/tox.ini b/tox.ini
index e3dd03fb..973f3763 100644
--- a/tox.ini
+++ b/tox.ini
@@ -68,7 +68,7 @@ commands =
[testenv:generate-validation-code]
skip_install = True
deps =
- validate-pyproject[all]==0.7
+ validate-pyproject[all]==0.7.1
commands =
python -m tools.generate_validation_code