From d93f678d49fcb9763a26364a44ab41ac9a635d2d Mon Sep 17 00:00:00 2001 From: Vincent Vanlaer Date: Wed, 30 Aug 2023 23:07:15 +0200 Subject: [PATCH] Fix unconditional openssl import in DTLS --- trio/_dtls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trio/_dtls.py b/trio/_dtls.py index 08b7672a2f..541144de07 100644 --- a/trio/_dtls.py +++ b/trio/_dtls.py @@ -30,7 +30,6 @@ from weakref import ReferenceType, WeakValueDictionary import attr -from OpenSSL import SSL import trio @@ -39,6 +38,8 @@ if TYPE_CHECKING: from types import TracebackType + # See DTLSEndpoint.__init__ for why this is imported here + from OpenSSL import SSL from OpenSSL.SSL import Context from typing_extensions import Self, TypeAlias