Skip to content

Commit

Permalink
deprecate support for openssl < 1.1.1
Browse files Browse the repository at this point in the history
Python3.10 has dropped support for 1.1.1  https://peps.python.org/pep-0644/
  • Loading branch information
graingert committed Jun 14, 2022
1 parent fd36bdd commit d7e25cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions distributed/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import sys
import tempfile
import warnings

try:
import ssl
Expand Down Expand Up @@ -120,6 +121,12 @@ class Security:
)

def __init__(self, require_encryption=None, **kwargs):
if _OPENSSL_VERSION_INFO < (1, 1, 1):
warnings.warn(
f"support for {ssl.OPENSSL_VERSION} is deprecated,"
" and will be removed in a future release",
DeprecationWarning,
)
extra = set(kwargs).difference(self.__slots__)
if extra:
raise TypeError("Unknown parameters: %r" % sorted(extra))
Expand Down

0 comments on commit d7e25cd

Please sign in to comment.