From 0e36622c72460bf037193ffe01329a1284e66bc1 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 14 Jan 2023 13:11:17 -0500 Subject: [PATCH] Resolve stubtest allowlist entries for `ldap3` (#9532) --- stubs/ldap3/@tests/requirements-stubtest.txt | 1 + stubs/ldap3/@tests/stubtest_allowlist.txt | 1 - stubs/ldap3/METADATA.toml | 6 ++++++ tests/check_consistent.py | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 stubs/ldap3/@tests/requirements-stubtest.txt delete mode 100644 stubs/ldap3/@tests/stubtest_allowlist.txt diff --git a/stubs/ldap3/@tests/requirements-stubtest.txt b/stubs/ldap3/@tests/requirements-stubtest.txt new file mode 100644 index 000000000..be66cd022 --- /dev/null +++ b/stubs/ldap3/@tests/requirements-stubtest.txt @@ -0,0 +1 @@ +gssapi diff --git a/stubs/ldap3/@tests/stubtest_allowlist.txt b/stubs/ldap3/@tests/stubtest_allowlist.txt deleted file mode 100644 index 71eb99da0..000000000 --- a/stubs/ldap3/@tests/stubtest_allowlist.txt +++ /dev/null @@ -1 +0,0 @@ -ldap3.protocol.sasl.kerberos # requires gssapi package to import diff --git a/stubs/ldap3/METADATA.toml b/stubs/ldap3/METADATA.toml index d47a19ed3..64cb8f7c3 100644 --- a/stubs/ldap3/METADATA.toml +++ b/stubs/ldap3/METADATA.toml @@ -1,2 +1,8 @@ version = "2.9.*" requires = ["types-pyasn1"] + +[tool.stubtest] +apt_dependencies = ["libkrb5-dev"] +# No need to install on the CI. Leaving here as information for MacOs/Windows contributors. +# brew_dependencies = ["krb5"] +# choco_dependencies = ["mitkerberos"] diff --git a/tests/check_consistent.py b/tests/check_consistent.py index bb48404a0..9106e07c2 100755 --- a/tests/check_consistent.py +++ b/tests/check_consistent.py @@ -191,7 +191,7 @@ def check_metadata() -> None: assert key in tk, f"Unrecognised {tool} key {key} for {distribution}" tool_stubtest = data.get("tool", {}).get("stubtest", {}) - specified_stubtest_platforms = set(tool_stubtest.get("platforms", [])) + specified_stubtest_platforms = set(tool_stubtest.get("platforms", ["linux"])) assert ( specified_stubtest_platforms <= supported_stubtest_platforms ), f"Unrecognised platforms specified: {supported_stubtest_platforms - specified_stubtest_platforms} for {distribution}"