14
0

Accepting request 854670 from home:bnavigator:branches:devel:languages:python

- Add pr_672-remove-OpenSSL-tsafe.patch to support pyopenssl 20

OBS-URL: https://build.opensuse.org/request/show/854670
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-eventlet?expand=0&rev=77
This commit is contained in:
2020-12-11 00:26:56 +00:00
committed by Git OBS Bridge
parent c158895f58
commit 406033f67e
3 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
From be0d520c9bc9e3b3959f84d80c65e418e6081887 Mon Sep 17 00:00:00 2001
From: Sergey Shepelev <temotor@gmail.com>
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

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Dec 10 22:43:44 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Add pr_672-remove-OpenSSL-tsafe.patch to support pyopenssl 20
-------------------------------------------------------------------
Mon Dec 7 00:14:23 UTC 2020 - Benjamin Greiner <code@bnavigator.de>

View File

@@ -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}