Import cryptography early since importing openssl is not thread-safe (#111768)

This commit is contained in:
J. Nick Koston 2024-02-28 14:00:17 -10:00 committed by GitHub
parent 220e66faad
commit 61f6df527e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,6 +14,9 @@ import threading
from time import monotonic
from typing import TYPE_CHECKING, Any
# Import cryptography early since import openssl is not thread-safe
# _frozen_importlib._DeadlockError: deadlock detected by _ModuleLock('cryptography.hazmat.backends.openssl.backend')
import cryptography # noqa: F401
import voluptuous as vol
import yarl