From f84dca699df5b181a60931e252cb3c510440a967 Mon Sep 17 00:00:00 2001 From: Avasam Date: Fri, 13 Jan 2023 03:14:37 -0500 Subject: [PATCH] Fix passlib stubtest on windows (#9523) --- stubs/passlib/@tests/stubtest_allowlist_win32.txt | 2 ++ stubs/passlib/passlib/hosts.pyi | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 stubs/passlib/@tests/stubtest_allowlist_win32.txt diff --git a/stubs/passlib/@tests/stubtest_allowlist_win32.txt b/stubs/passlib/@tests/stubtest_allowlist_win32.txt new file mode 100644 index 000000000..217d59c71 --- /dev/null +++ b/stubs/passlib/@tests/stubtest_allowlist_win32.txt @@ -0,0 +1,2 @@ +# Only exists if crypt is present +passlib.hosts.host_context diff --git a/stubs/passlib/passlib/hosts.pyi b/stubs/passlib/passlib/hosts.pyi index 6c4040d1c..732e02106 100644 --- a/stubs/passlib/passlib/hosts.pyi +++ b/stubs/passlib/passlib/hosts.pyi @@ -1,8 +1,11 @@ from typing import Any +from passlib.context import CryptContext + linux_context: Any linux2_context: Any freebsd_context: Any openbsd_context: Any netbsd_context: Any -host_context: Any +# Only exists if crypt is present +host_context: CryptContext