diff --git a/pr_672-remove-OpenSSL-tsafe.patch b/pr_672-remove-OpenSSL-tsafe.patch new file mode 100644 index 0000000..4307832 --- /dev/null +++ b/pr_672-remove-OpenSSL-tsafe.patch @@ -0,0 +1,37 @@ +From be0d520c9bc9e3b3959f84d80c65e418e6081887 Mon Sep 17 00:00:00 2001 +From: Sergey Shepelev +Date: Wed, 2 Dec 2020 01:10:02 +0300 +Subject: [PATCH] pyopenssl tsafe module was deprecated and removed in v20.0.0 + +https://github.com/eventlet/eventlet/issues/671 +https://github.com/pyca/pyopenssl/pull/913 +--- + eventlet/green/OpenSSL/__init__.py | 7 ++++++- + tests/openssl_test.py | 1 - + 4 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/eventlet/green/OpenSSL/__init__.py b/eventlet/green/OpenSSL/__init__.py +index d86147645..1b2500971 100644 +--- a/eventlet/green/OpenSSL/__init__.py ++++ b/eventlet/green/OpenSSL/__init__.py +@@ -1,4 +1,9 @@ + from . import crypto + from . import SSL +-from . import tsafe ++try: ++ # pyopenssl tsafe module was deprecated and removed in v20.0.0 ++ # https://github.com/pyca/pyopenssl/pull/913 ++ from . import tsafe ++except ImportError: ++ pass + from .version import __version__ +diff --git a/tests/openssl_test.py b/tests/openssl_test.py +index a127408b8..1108adaf6 100644 +--- a/tests/openssl_test.py ++++ b/tests/openssl_test.py +@@ -12,5 +12,4 @@ def test_import(): + + import eventlet.green.OpenSSL.SSL + import eventlet.green.OpenSSL.crypto +- import eventlet.green.OpenSSL.tsafe + import eventlet.green.OpenSSL.version diff --git a/python-eventlet.changes b/python-eventlet.changes index aa4b079..83aedfa 100644 --- a/python-eventlet.changes +++ b/python-eventlet.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Dec 10 22:43:44 UTC 2020 - Benjamin Greiner + +- Add pr_672-remove-OpenSSL-tsafe.patch to support pyopenssl 20 + ------------------------------------------------------------------- Mon Dec 7 00:14:23 UTC 2020 - Benjamin Greiner diff --git a/python-eventlet.spec b/python-eventlet.spec index 8acfbc9..96d4dc0 100644 --- a/python-eventlet.spec +++ b/python-eventlet.spec @@ -35,6 +35,8 @@ Patch1: newdnspython.patch Patch2: pr_639.patch # Really remove the dependency on nose Patch3: remove_nose_part_2.patch +# PATCH-FIX-UPSTREAM -- gh#eventlet/eventlet#672 remove OpenSSL.tsafe +Patch4: pr_672-remove-OpenSSL-tsafe.patch BuildRequires: %{python_module dnspython >= 1.15.0} BuildRequires: %{python_module greenlet >= 0.3} BuildRequires: %{python_module pyOpenSSL}