Accepting request 782871 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/782871 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-M2Crypto?expand=0&rev=34
This commit is contained in:
commit
03c398b4da
24
001-fix-buffering-for-python38.patch
Normal file
24
001-fix-buffering-for-python38.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
diff --git a/M2Crypto/SSL/Connection.py b/M2Crypto/SSL/Connection.py
|
||||||
|
index 7053aa6..6503935 100644
|
||||||
|
--- a/M2Crypto/SSL/Connection.py
|
||||||
|
+++ b/M2Crypto/SSL/Connection.py
|
||||||
|
@@ -12,6 +12,7 @@ Copyright 2008 Heikki Toivonen. All rights reserved.
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import socket
|
||||||
|
+import io
|
||||||
|
|
||||||
|
from M2Crypto import BIO, Err, X509, m2, py27plus, six, util # noqa
|
||||||
|
from M2Crypto.SSL import Checker, Context, timeout # noqa
|
||||||
|
@@ -584,7 +585,10 @@ class Connection(object):
|
||||||
|
def makefile(self, mode='rb', bufsize=-1):
|
||||||
|
# type: (AnyStr, int) -> socket._fileobject
|
||||||
|
if six.PY3:
|
||||||
|
- return socket.SocketIO(self, mode)
|
||||||
|
+ raw = socket.SocketIO(self, mode)
|
||||||
|
+ if 'rw' in mode:
|
||||||
|
+ return io.BufferedRWPair(raw, raw)
|
||||||
|
+ return io.BufferedReader(raw, io.DEFAULT_BUFFER_SIZE)
|
||||||
|
else:
|
||||||
|
return socket._fileobject(self, mode, bufsize)
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 9 09:56:49 UTC 2020 - Marco Strigl <marco.strigl@suse.com>
|
||||||
|
|
||||||
|
- in python3.8 the fp is wrapped in a Buffer. SSL.Connection.makefile
|
||||||
|
returns a socketIO which is no buffer.
|
||||||
|
Added: 001-fix-buffering-for-python38.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 10 13:59:24 CEST 2019 - Matej Cepl <mcepl@suse.com>
|
Mon Jun 10 13:59:24 CEST 2019 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-M2Crypto
|
# spec file for package python-M2Crypto
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -24,8 +24,9 @@ Release: 0
|
|||||||
Summary: Crypto and SSL toolkit for Python
|
Summary: Crypto and SSL toolkit for Python
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://gitlab.com/m2crypto/m2crypto
|
URL: https://gitlab.com/m2crypto/m2crypto
|
||||||
Source: https://files.pythonhosted.org/packages/source/M/M2Crypto/M2Crypto-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/M/M2Crypto/M2Crypto-%{version}.tar.gz
|
||||||
|
Patch1: 001-fix-buffering-for-python38.patch
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module typing}
|
BuildRequires: %{python_module typing}
|
||||||
@ -78,7 +79,9 @@ Documentation for the Crypto and SSL toolkit for Python
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n M2Crypto-%{version}
|
%setup -q -n M2Crypto-%{version}
|
||||||
%autopatch -p1
|
%if 0%{?suse_version} > 1500
|
||||||
|
%patch1 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
|
Loading…
Reference in New Issue
Block a user