forked from pool/python-gevent
Accepting request 1272642 from home:pmonrealgonzalez:branches:devel:languages:python
- Update to 25.4.2: [bsc#1241067, bsc#1241037]
* Make gevent's queue classes subscriptable to match the standard
library. See issue #2102.
* Make the c-ares resolver build on Windows.
* The gevent testsuite runs a copy of the test_ssl from cpython but
the follwoing change has not been ported yet:
- gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError
in ConnectionHandler [gh#python/cpython/pull/126503]
- Rebase gevent-openssl35-test-fix.patch
- Upstream PR: [gh#gevent/gevent/pull/2103]
- Update to 25.4.1
* Remove some legacy code that supported Python 2 for compatibility
with the upcoming releases of Cython 3.1.
* Add a new environment variable and configuration setting to control
whether blocking reports are printed by the monitor thread.
* Add initial support for Python 3.14a7.
* Fix using gevent’s BackdoorServer with Unix sockets.
* Do not use pywsgi in a security-conscious environment. Fix one
security issue related to HTTP 100 Continue handling. See issue #2075.
OBS-URL: https://build.opensuse.org/request/show/1272642
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gevent?expand=0&rev=119
This commit is contained in:
BIN
gevent-24.10.3.tar.gz
LFS
BIN
gevent-24.10.3.tar.gz
LFS
Binary file not shown.
BIN
gevent-25.4.2.tar.gz
LFS
Normal file
BIN
gevent-25.4.2.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,27 +1,185 @@
|
||||
From 366178299fe8d85b34e5f27da505e807470cfae4 Mon Sep 17 00:00:00 2001
|
||||
From: Pedro Monreal <pmgdeb@gmail.com>
|
||||
Date: Tue, 22 Apr 2025 15:32:21 +0200
|
||||
Subject: [PATCH] Deal with BrokenPipeError since openssl 3.4.x. Follows from
|
||||
gh-127257 and gh-115627.
|
||||
|
||||
---
|
||||
src/gevent/ssl.py | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/gevent/ssl.py b/src/gevent/ssl.py
|
||||
index a2cd5ca4c..55831e050 100644
|
||||
--- a/src/gevent/ssl.py
|
||||
+++ b/src/gevent/ssl.py
|
||||
@@ -451,6 +451,12 @@ def read(self, nbytes=2014, buffer=None):
|
||||
if self.suppress_ragged_eofs:
|
||||
return b'' if buffer is None else bytes_read
|
||||
raise
|
||||
+ except BrokenPipeError:
|
||||
+ # Deal with BrokenPipeError from openssl 3.4.x and up
|
||||
+ # Follows from gh-127257 and gh-115627
|
||||
+ if self.suppress_ragged_eofs:
|
||||
+ return b'' if buffer is None else bytes_read
|
||||
+ raise
|
||||
except SSLError as ex:
|
||||
# All the other SSLxxxxxError classes extend SSLError,
|
||||
# so catch it last.
|
||||
Index: gevent-25.4.2/src/greentest/3.11/test_ssl.py
|
||||
===================================================================
|
||||
--- gevent-25.4.2.orig/src/greentest/3.11/test_ssl.py
|
||||
+++ gevent-25.4.2/src/greentest/3.11/test_ssl.py
|
||||
@@ -2492,7 +2492,6 @@ class ThreadedEchoServer(threading.Threa
|
||||
# See also http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/
|
||||
if e.errno != errno.EPROTOTYPE and sys.platform != "darwin":
|
||||
self.running = False
|
||||
- self.server.stop()
|
||||
self.close()
|
||||
return False
|
||||
else:
|
||||
@@ -2627,10 +2626,6 @@ class ThreadedEchoServer(threading.Threa
|
||||
self.close()
|
||||
self.running = False
|
||||
|
||||
- # normally, we'd just stop here, but for the test
|
||||
- # harness, we want to stop the server
|
||||
- self.server.stop()
|
||||
-
|
||||
def __init__(self, certificate=None, ssl_version=None,
|
||||
certreqs=None, cacerts=None,
|
||||
chatty=True, connectionchatty=False, starttls_server=False,
|
||||
@@ -2664,21 +2659,33 @@ class ThreadedEchoServer(threading.Threa
|
||||
self.conn_errors = []
|
||||
threading.Thread.__init__(self)
|
||||
self.daemon = True
|
||||
+ self._in_context = False
|
||||
|
||||
def __enter__(self):
|
||||
+ if self._in_context:
|
||||
+ raise ValueError('Re-entering ThreadedEchoServer context')
|
||||
+ self._in_context = True
|
||||
self.start(threading.Event())
|
||||
self.flag.wait()
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
+ assert self._in_context
|
||||
+ self._in_context = False
|
||||
self.stop()
|
||||
self.join()
|
||||
|
||||
def start(self, flag=None):
|
||||
+ if not self._in_context:
|
||||
+ raise ValueError(
|
||||
+ 'ThreadedEchoServer must be used as a context manager')
|
||||
self.flag = flag
|
||||
threading.Thread.start(self)
|
||||
|
||||
def run(self):
|
||||
+ if not self._in_context:
|
||||
+ raise ValueError(
|
||||
+ 'ThreadedEchoServer must be used as a context manager')
|
||||
self.sock.settimeout(1.0)
|
||||
self.sock.listen(5)
|
||||
self.active = True
|
||||
Index: gevent-25.4.2/src/greentest/3.10/test_ssl.py
|
||||
===================================================================
|
||||
--- gevent-25.4.2.orig/src/greentest/3.10/test_ssl.py
|
||||
+++ gevent-25.4.2/src/greentest/3.10/test_ssl.py
|
||||
@@ -2485,7 +2485,6 @@ class ThreadedEchoServer(threading.Threa
|
||||
# See also http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/
|
||||
if e.errno != errno.EPROTOTYPE and sys.platform != "darwin":
|
||||
self.running = False
|
||||
- self.server.stop()
|
||||
self.close()
|
||||
return False
|
||||
else:
|
||||
@@ -2620,9 +2619,6 @@ class ThreadedEchoServer(threading.Threa
|
||||
self.close()
|
||||
self.running = False
|
||||
|
||||
- # normally, we'd just stop here, but for the test
|
||||
- # harness, we want to stop the server
|
||||
- self.server.stop()
|
||||
|
||||
def __init__(self, certificate=None, ssl_version=None,
|
||||
certreqs=None, cacerts=None,
|
||||
@@ -2657,21 +2653,33 @@ class ThreadedEchoServer(threading.Threa
|
||||
self.conn_errors = []
|
||||
threading.Thread.__init__(self)
|
||||
self.daemon = True
|
||||
+ self._in_context = False
|
||||
|
||||
def __enter__(self):
|
||||
+ if self._in_context:
|
||||
+ raise ValueError('Re-entering ThreadedEchoServer context')
|
||||
+ self._in_context = True
|
||||
self.start(threading.Event())
|
||||
self.flag.wait()
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
+ assert self._in_context
|
||||
+ self._in_context = False
|
||||
self.stop()
|
||||
self.join()
|
||||
|
||||
def start(self, flag=None):
|
||||
+ if not self._in_context:
|
||||
+ raise ValueError(
|
||||
+ 'ThreadedEchoServer must be used as a context manager')
|
||||
self.flag = flag
|
||||
threading.Thread.start(self)
|
||||
|
||||
def run(self):
|
||||
+ if not self._in_context:
|
||||
+ raise ValueError(
|
||||
+ 'ThreadedEchoServer must be used as a context manager')
|
||||
self.sock.settimeout(1.0)
|
||||
self.sock.listen(5)
|
||||
self.active = True
|
||||
Index: gevent-25.4.2/src/greentest/3.12/test_ssl.py
|
||||
===================================================================
|
||||
--- gevent-25.4.2.orig/src/greentest/3.12/test_ssl.py
|
||||
+++ gevent-25.4.2/src/greentest/3.12/test_ssl.py
|
||||
@@ -2300,7 +2300,6 @@ class ThreadedEchoServer(threading.Threa
|
||||
# See also http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/
|
||||
if e.errno != errno.EPROTOTYPE and sys.platform != "darwin":
|
||||
self.running = False
|
||||
- self.server.stop()
|
||||
self.close()
|
||||
return False
|
||||
else:
|
||||
@@ -2435,10 +2434,6 @@ class ThreadedEchoServer(threading.Threa
|
||||
self.close()
|
||||
self.running = False
|
||||
|
||||
- # normally, we'd just stop here, but for the test
|
||||
- # harness, we want to stop the server
|
||||
- self.server.stop()
|
||||
-
|
||||
def __init__(self, certificate=None, ssl_version=None,
|
||||
certreqs=None, cacerts=None,
|
||||
chatty=True, connectionchatty=False, starttls_server=False,
|
||||
@@ -2472,21 +2467,33 @@ class ThreadedEchoServer(threading.Threa
|
||||
self.conn_errors = []
|
||||
threading.Thread.__init__(self)
|
||||
self.daemon = True
|
||||
+ self._in_context = False
|
||||
|
||||
def __enter__(self):
|
||||
+ if self._in_context:
|
||||
+ raise ValueError('Re-entering ThreadedEchoServer context')
|
||||
+ self._in_context = True
|
||||
self.start(threading.Event())
|
||||
self.flag.wait()
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
+ assert self._in_context
|
||||
+ self._in_context = False
|
||||
self.stop()
|
||||
self.join()
|
||||
|
||||
def start(self, flag=None):
|
||||
+ if not self._in_context:
|
||||
+ raise ValueError(
|
||||
+ 'ThreadedEchoServer must be used as a context manager')
|
||||
self.flag = flag
|
||||
threading.Thread.start(self)
|
||||
|
||||
def run(self):
|
||||
+ if not self._in_context:
|
||||
+ raise ValueError(
|
||||
+ 'ThreadedEchoServer must be used as a context manager')
|
||||
self.sock.settimeout(1.0)
|
||||
self.sock.listen(5)
|
||||
self.active = True
|
||||
Index: gevent-25.4.2/src/greentest/3.9/test_ssl.py
|
||||
===================================================================
|
||||
--- gevent-25.4.2.orig/src/greentest/3.9/test_ssl.py
|
||||
+++ gevent-25.4.2/src/greentest/3.9/test_ssl.py
|
||||
@@ -2559,10 +2559,6 @@ class ThreadedEchoServer(threading.Threa
|
||||
self.close()
|
||||
self.running = False
|
||||
|
||||
- # normally, we'd just stop here, but for the test
|
||||
- # harness, we want to stop the server
|
||||
- self.server.stop()
|
||||
-
|
||||
def __init__(self, certificate=None, ssl_version=None,
|
||||
certreqs=None, cacerts=None,
|
||||
chatty=True, connectionchatty=False, starttls_server=False,
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 25 07:37:04 UTC 2025 - Pedro Monreal <pmonreal@suse.com>
|
||||
|
||||
- Update to 25.4.2: [bsc#1241067, bsc#1241037]
|
||||
* Make gevent's queue classes subscriptable to match the standard
|
||||
library. See issue #2102.
|
||||
* Make the c-ares resolver build on Windows.
|
||||
* The gevent testsuite runs a copy of the test_ssl from cpython but
|
||||
the follwoing change has not been ported yet:
|
||||
- gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError
|
||||
in ConnectionHandler [gh#python/cpython/pull/126503]
|
||||
- Rebase gevent-openssl35-test-fix.patch
|
||||
- Upstream PR: [gh#gevent/gevent/pull/2103]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 24 09:55:27 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Update to 25.4.1
|
||||
* Remove some legacy code that supported Python 2 for compatibility
|
||||
with the upcoming releases of Cython 3.1.
|
||||
* Add a new environment variable and configuration setting to control
|
||||
whether blocking reports are printed by the monitor thread.
|
||||
* Add initial support for Python 3.14a7.
|
||||
* Fix using gevent’s BackdoorServer with Unix sockets.
|
||||
* Do not use pywsgi in a security-conscious environment. Fix one
|
||||
security issue related to HTTP 100 Continue handling. See issue #2075.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 22 08:44:56 UTC 2025 - Pedro Monreal <pmonreal@suse.com>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
%bcond_with colortest
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-gevent
|
||||
Version: 24.10.3
|
||||
Version: 25.4.2
|
||||
Release: 0
|
||||
Summary: Python network library that uses greenlet and libevent
|
||||
License: MIT
|
||||
@@ -39,6 +39,7 @@ Patch2: gevent-opensuse-nocolor-tests.patch
|
||||
# PATCH-FEATURE-OPENSUSE gevent-openssl35-test-fix.patch pmonreal@suse.com -- Handle BrokenPipeError
|
||||
Patch3: gevent-openssl35-test-fix.patch
|
||||
BuildRequires: %{python_module Cython >= 3.0.2}
|
||||
BuildRequires: %{python_module backports.entry_points_selectable}
|
||||
BuildRequires: %{python_module cffi}
|
||||
BuildRequires: %{python_module devel >= 3.8}
|
||||
BuildRequires: %{python_module dnspython}
|
||||
@@ -58,6 +59,7 @@ BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: pkgconfig(libcares)
|
||||
BuildRequires: pkgconfig(libuv)
|
||||
Requires: python-backports.entry_points_selectable
|
||||
Requires: python-cffi
|
||||
Requires: python-dnspython
|
||||
Requires: python-greenlet >= 3.0.0
|
||||
|
||||
Reference in New Issue
Block a user