From 16dee40cc442247b1d37e424e03cb8bbed62f09e3b633e0dba9776b31d3b6de1 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 3 May 2023 14:41:34 +0000 Subject: [PATCH 1/4] Accepting request 1084371 from home:dirkmueller:acdc:as_python3_module - Switch documentation to be within the main package. OBS-URL: https://build.opensuse.org/request/show/1084371 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gevent?expand=0&rev=87 --- python-gevent.changes | 5 +++++ python-gevent.spec | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/python-gevent.changes b/python-gevent.changes index 4702d30..e837200 100644 --- a/python-gevent.changes +++ b/python-gevent.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Apr 23 23:15:24 UTC 2023 - Matej Cepl + +- Switch documentation to be within the main package. + ------------------------------------------------------------------- Fri Apr 21 12:25:42 UTC 2023 - Dirk Müller diff --git a/python-gevent.spec b/python-gevent.spec index 2460dcc..b47ed10 100644 --- a/python-gevent.spec +++ b/python-gevent.spec @@ -91,6 +91,7 @@ gevent is inspired by eventlet but features more consistent API, simpler implementation and better performance. Read why others use gevent and check out the list of the open source projects based on gevent. +%if 0%{?suse_version} > 1500 %package -n python-gevent-doc Summary: Documentation for %{name} Group: Documentation/Other @@ -99,6 +100,7 @@ BuildArch: noarch %description -n python-gevent-doc Documentation and examples for %{name}. +%endif %prep %setup -q -n gevent-%{version} @@ -172,8 +174,10 @@ fi %{python_sitearch}/gevent-%{version}*-info %{python_sitearch}/gevent +%if 0%{?suse_version} > 1500 %files -n python-gevent-doc %license LICENSE* +%endif %doc examples/ %changelog From 00ba438c4a1aa600ffe82849da3a992a63ca962b7f8b2af6e04da50ca91d6d99 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 4 May 2023 20:36:18 +0000 Subject: [PATCH 2/4] - 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. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gevent?expand=0&rev=88 --- gevent-22.10.1.tar.gz | 3 --- gevent-22.10.2.tar.gz | 3 +++ python-gevent.changes | 10 ++++++++++ python-gevent.spec | 6 +++--- 4 files changed, 16 insertions(+), 6 deletions(-) delete mode 100644 gevent-22.10.1.tar.gz create mode 100644 gevent-22.10.2.tar.gz diff --git a/gevent-22.10.1.tar.gz b/gevent-22.10.1.tar.gz deleted file mode 100644 index 5239fa4..0000000 --- a/gevent-22.10.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a7ef503d3f2623013f0685861d571ad129bca9f1550bd60eead0b67eac30a78 -size 4797676 diff --git a/gevent-22.10.2.tar.gz b/gevent-22.10.2.tar.gz new file mode 100644 index 0000000..4a9ac22 --- /dev/null +++ b/gevent-22.10.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01ea78981520c9cdbe3722e1760a8ed0165a0b576cb5209f67881595561509da +size 4800293 diff --git a/python-gevent.changes b/python-gevent.changes index e837200..78b301a 100644 --- a/python-gevent.changes +++ b/python-gevent.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu May 4 20:28:36 UTC 2023 - Dirk Müller + +- 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 diff --git a/python-gevent.spec b/python-gevent.spec index b47ed10..eba7109 100644 --- a/python-gevent.spec +++ b/python-gevent.spec @@ -25,7 +25,7 @@ %endif %{?sle15_python_module_pythons} Name: python-gevent -Version: 22.10.1 +Version: 22.10.2 Release: 0 Summary: Python network library that uses greenlet and libevent License: MIT @@ -43,7 +43,7 @@ BuildRequires: %{python_module Cython} BuildRequires: %{python_module cffi} BuildRequires: %{python_module devel} 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 psutil} BuildRequires: %{python_module requests} @@ -60,7 +60,7 @@ BuildRequires: pkgconfig(libcares) BuildRequires: pkgconfig(libuv) Requires: python-cffi Requires: python-dnspython -Requires: python-greenlet +Requires: python-greenlet >= 2.0.0 Requires: python-requests Requires: python-zope.event Requires: python-zope.interface From 3cd7eab8db9f5ae514cda6ec89221d4c3d83c08c23a576af2a17493024d9834b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 15 May 2023 13:44:59 +0000 Subject: [PATCH 3/4] - skip one more test from testsuite OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gevent?expand=0&rev=90 --- python-gevent.changes | 5 +++++ python-gevent.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/python-gevent.changes b/python-gevent.changes index 78b301a..618539f 100644 --- a/python-gevent.changes +++ b/python-gevent.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 15 13:44:48 UTC 2023 - Dirk Müller + +- skip one more test from testsuite + ------------------------------------------------------------------- Thu May 4 20:28:36 UTC 2023 - Dirk Müller diff --git a/python-gevent.spec b/python-gevent.spec index eba7109..5fa88c4 100644 --- a/python-gevent.spec +++ b/python-gevent.spec @@ -147,6 +147,7 @@ test__example_portforwarder.py test__getaddrinfo_import.py test__resolver_dnspython.py test__socket_dns.py +test__issue1686.py EOF if [ %{$python_version_nodots} -lt 37 ]; then echo "test__threading_2.py" >> skip_tests.txt From 315b425294b27c840851573c5e06d9c29801b2e28a3bee914452ea7754491ee5 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 15 May 2023 14:19:08 +0000 Subject: [PATCH 4/4] - Add patch handle-python-ssl-changes.patch: * Handle ssl.shared_ciphers() behaviour changing in Python 3.10. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gevent?expand=0&rev=91 --- handle-python-ssl-changes.patch | 26 ++++++++++++++++++++++++++ python-gevent.changes | 7 +++++++ python-gevent.spec | 4 ++++ 3 files changed, 37 insertions(+) create mode 100644 handle-python-ssl-changes.patch diff --git a/handle-python-ssl-changes.patch b/handle-python-ssl-changes.patch new file mode 100644 index 0000000..e2d1d51 --- /dev/null +++ b/handle-python-ssl-changes.patch @@ -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: diff --git a/python-gevent.changes b/python-gevent.changes index 618539f..8afbd79 100644 --- a/python-gevent.changes +++ b/python-gevent.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon May 15 14:18:03 UTC 2023 - Steve Kowalik + +- 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 diff --git a/python-gevent.spec b/python-gevent.spec index 5fa88c4..9f54f14 100644 --- a/python-gevent.spec +++ b/python-gevent.spec @@ -39,6 +39,7 @@ Source100: %{name}-rpmlintrc # let's selectively disable the warning around the offending code Patch0: fix-no-return-in-nonvoid-function.patch Patch1: skip-tests-in-leap.patch +Patch2: handle-python-ssl-changes.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module cffi} BuildRequires: %{python_module devel} @@ -111,6 +112,9 @@ Documentation and examples for %{name}. %if 0%{?sle_version} <= 150300 %patch1 -p1 %endif +%if 0%{?is_opensuse} +%patch2 -p1 +%endif sed -i -e '1s!bin/env python!bin/python!' examples/*.py sed -i -e '1{/bin.*python/d}' src/gevent/tests/*.py