Accepting request 1087248 from devel:languages:python

- Add patch handle-python-ssl-changes.patch:
  * Handle Python 3.10 changes where ssl.shared_ciphers() changes
    behaviour. 

- skip one more test from testsuite 

- update to 22.10.2:
  * Update to greenlet 2.0. This fixes a deallocation issue that
    required a change in greenlet's ABI. The design of greenlet 2.0 is
    intended to prevent future fixes and enhancements from
    requiring an ABI change, making it easier to update gevent
    and greenlet independently.

- Switch documentation to be within the main package.

OBS-URL: https://build.opensuse.org/request/show/1087248
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-gevent?expand=0&rev=41
This commit is contained in:
Dominique Leuenberger 2023-05-19 09:55:21 +00:00 committed by Git OBS Bridge
commit 5f810356d3
5 changed files with 68 additions and 6 deletions

BIN
gevent-22.10.1.tar.gz (Stored with Git LFS)

Binary file not shown.

3
gevent-22.10.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:01ea78981520c9cdbe3722e1760a8ed0165a0b576cb5209f67881595561509da
size 4800293

View File

@ -0,0 +1,26 @@
Index: gevent-22.10.2/src/greentest/3.10/test_ssl.py
===================================================================
--- gevent-22.10.2.orig/src/greentest/3.10/test_ssl.py
+++ gevent-22.10.2/src/greentest/3.10/test_ssl.py
@@ -2306,13 +2306,19 @@ class SimpleBackgroundTests(unittest.Tes
self.assertIs(sslobj._sslobj.owner, sslobj)
self.assertIsNone(sslobj.cipher())
self.assertIsNone(sslobj.version())
- self.assertIsNotNone(sslobj.shared_ciphers())
+ try:
+ self.assertIsNotNone(sslobj.shared_ciphers())
+ except AssertionError:
+ self.assertIsNone(sslobj.shared_ciphers())
self.assertRaises(ValueError, sslobj.getpeercert)
if 'tls-unique' in ssl.CHANNEL_BINDING_TYPES:
self.assertIsNone(sslobj.get_channel_binding('tls-unique'))
self.ssl_io_loop(sock, incoming, outgoing, sslobj.do_handshake)
self.assertTrue(sslobj.cipher())
- self.assertIsNotNone(sslobj.shared_ciphers())
+ try:
+ self.assertIsNotNone(sslobj.shared_ciphers())
+ except AssertionError:
+ self.assertIsNone(sslobj.shared_ciphers())
self.assertIsNotNone(sslobj.version())
self.assertTrue(sslobj.getpeercert())
if 'tls-unique' in ssl.CHANNEL_BINDING_TYPES:

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Mon May 15 14:18:03 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch handle-python-ssl-changes.patch:
* Handle Python 3.10 changes where ssl.shared_ciphers() changes
behaviour.
-------------------------------------------------------------------
Mon May 15 13:44:48 UTC 2023 - Dirk Müller <dmueller@suse.com>
- skip one more test from testsuite
-------------------------------------------------------------------
Thu May 4 20:28:36 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 22.10.2:
* Update to greenlet 2.0. This fixes a deallocation issue that
required a change in greenlet's ABI. The design of greenlet 2.0 is
intended to prevent future fixes and enhancements from
requiring an ABI change, making it easier to update gevent
and greenlet independently.
-------------------------------------------------------------------
Sun Apr 23 23:15:24 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Switch documentation to be within the main package.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 21 12:25:42 UTC 2023 - Dirk Müller <dmueller@suse.com> Fri Apr 21 12:25:42 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -25,7 +25,7 @@
%endif %endif
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-gevent Name: python-gevent
Version: 22.10.1 Version: 22.10.2
Release: 0 Release: 0
Summary: Python network library that uses greenlet and libevent Summary: Python network library that uses greenlet and libevent
License: MIT License: MIT
@ -39,11 +39,12 @@ Source100: %{name}-rpmlintrc
# let's selectively disable the warning around the offending code # let's selectively disable the warning around the offending code
Patch0: fix-no-return-in-nonvoid-function.patch Patch0: fix-no-return-in-nonvoid-function.patch
Patch1: skip-tests-in-leap.patch Patch1: skip-tests-in-leap.patch
Patch2: handle-python-ssl-changes.patch
BuildRequires: %{python_module Cython} BuildRequires: %{python_module Cython}
BuildRequires: %{python_module cffi} BuildRequires: %{python_module cffi}
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module dnspython} BuildRequires: %{python_module dnspython}
BuildRequires: %{python_module greenlet >= 1.1.0} BuildRequires: %{python_module greenlet >= 2.0.0}
BuildRequires: %{python_module objgraph} BuildRequires: %{python_module objgraph}
BuildRequires: %{python_module psutil} BuildRequires: %{python_module psutil}
BuildRequires: %{python_module requests} BuildRequires: %{python_module requests}
@ -60,7 +61,7 @@ BuildRequires: pkgconfig(libcares)
BuildRequires: pkgconfig(libuv) BuildRequires: pkgconfig(libuv)
Requires: python-cffi Requires: python-cffi
Requires: python-dnspython Requires: python-dnspython
Requires: python-greenlet Requires: python-greenlet >= 2.0.0
Requires: python-requests Requires: python-requests
Requires: python-zope.event Requires: python-zope.event
Requires: python-zope.interface Requires: python-zope.interface
@ -91,6 +92,7 @@ gevent is inspired by eventlet but features more consistent API, simpler
implementation and better performance. Read why others use gevent and check implementation and better performance. Read why others use gevent and check
out the list of the open source projects based on gevent. out the list of the open source projects based on gevent.
%if 0%{?suse_version} > 1500
%package -n python-gevent-doc %package -n python-gevent-doc
Summary: Documentation for %{name} Summary: Documentation for %{name}
Group: Documentation/Other Group: Documentation/Other
@ -99,6 +101,7 @@ BuildArch: noarch
%description -n python-gevent-doc %description -n python-gevent-doc
Documentation and examples for %{name}. Documentation and examples for %{name}.
%endif
%prep %prep
%setup -q -n gevent-%{version} %setup -q -n gevent-%{version}
@ -109,6 +112,9 @@ Documentation and examples for %{name}.
%if 0%{?sle_version} <= 150300 %if 0%{?sle_version} <= 150300
%patch1 -p1 %patch1 -p1
%endif %endif
%if 0%{?is_opensuse}
%patch2 -p1
%endif
sed -i -e '1s!bin/env python!bin/python!' examples/*.py sed -i -e '1s!bin/env python!bin/python!' examples/*.py
sed -i -e '1{/bin.*python/d}' src/gevent/tests/*.py sed -i -e '1{/bin.*python/d}' src/gevent/tests/*.py
@ -145,6 +151,7 @@ test__example_portforwarder.py
test__getaddrinfo_import.py test__getaddrinfo_import.py
test__resolver_dnspython.py test__resolver_dnspython.py
test__socket_dns.py test__socket_dns.py
test__issue1686.py
EOF EOF
if [ %{$python_version_nodots} -lt 37 ]; then if [ %{$python_version_nodots} -lt 37 ]; then
echo "test__threading_2.py" >> skip_tests.txt echo "test__threading_2.py" >> skip_tests.txt
@ -172,8 +179,10 @@ fi
%{python_sitearch}/gevent-%{version}*-info %{python_sitearch}/gevent-%{version}*-info
%{python_sitearch}/gevent %{python_sitearch}/gevent
%if 0%{?suse_version} > 1500
%files -n python-gevent-doc %files -n python-gevent-doc
%license LICENSE* %license LICENSE*
%endif
%doc examples/ %doc examples/
%changelog %changelog