diff --git a/stub_uploader/metadata.py b/stub_uploader/metadata.py index 84e4d6a4..71b8de7e 100644 --- a/stub_uploader/metadata.py +++ b/stub_uploader/metadata.py @@ -214,6 +214,7 @@ def verify_typeshed_req(req: Requirement) -> None: "Pillow", "Werkzeug", "arrow", + "backports.zoneinfo", # Remove after we drop Python 3.8 support. "click", "cryptography", "django-stubs", @@ -289,7 +290,7 @@ def verify_external_req( if req.name not in EXTERNAL_REQ_ALLOWLIST and not _unsafe_ignore_allowlist: raise InvalidRequires( - f"Expected dependency {req} to be present in the allowlist" + f"Expected dependency {req.name} to be present in the stub_uploader allowlist" ) resp = requests.get(f"https://pypi.org/pypi/{upstream_distribution}/json") diff --git a/tests/test_integration.py b/tests/test_integration.py index 68cbda15..916163f3 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -83,7 +83,9 @@ def test_verify_external_req() -> None: Requirement("mypy-extensions"), "mypy", _unsafe_ignore_allowlist=True ) - with pytest.raises(InvalidRequires, match="to be present in the allowlist"): + with pytest.raises( + InvalidRequires, match="to be present in the stub_uploader allowlist" + ): verify_external_req(Requirement("typing-extensions"), "mypy") m = Metadata("pandas", {"version": "0.1", "requires": ["numpy"]})