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