diff --git a/gevent-openssl35-test-fix.patch b/gevent-openssl35-test-fix.patch new file mode 100644 index 0000000..bbd67d6 --- /dev/null +++ b/gevent-openssl35-test-fix.patch @@ -0,0 +1,27 @@ +From 366178299fe8d85b34e5f27da505e807470cfae4 Mon Sep 17 00:00:00 2001 +From: Pedro Monreal +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. diff --git a/python-gevent.changes b/python-gevent.changes index 426b09e..65296dd 100644 --- a/python-gevent.changes +++ b/python-gevent.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Apr 22 08:44:56 UTC 2025 - Pedro Monreal + +- Handle BrokenPipeError in src/gevent/ssl.py [bsc#1241037] + * Upstream PR: https://github.com/gevent/gevent/pull/2103 + * Add gevent-openssl35-test-fix.patch + ------------------------------------------------------------------- Wed Oct 23 11:07:00 UTC 2024 - John Paul Adrian Glaubitz diff --git a/python-gevent.spec b/python-gevent.spec index 271fc52..caac09e 100644 --- a/python-gevent.spec +++ b/python-gevent.spec @@ -1,7 +1,7 @@ # # spec file for package python-gevent # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -36,6 +36,8 @@ Source0: https://github.com/gevent/gevent/archive/%{version}.tar.gz#/geve Source100: %{name}-rpmlintrc # PATCH-FEATURE-OPENSUSE gevent-opensuse-nocolor-tests.patch code@bnavigator.de -- Avoid colorization of test output in obs runners 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 cffi} BuildRequires: %{python_module devel >= 3.8}