Sync from SUSE:SLFO:Main python-gevent revision 388e6c250cea4c321de108eff98eb0a1

This commit is contained in:
Adrian Schröter 2024-12-13 11:28:58 +01:00
parent 83b5004947
commit 15a0551002
7 changed files with 140 additions and 61 deletions

View File

@ -1,23 +0,0 @@
Index: gevent-21.1.2/deps/libev/ev_iouring.c
===================================================================
--- gevent-21.1.2.orig/deps/libev/ev_iouring.c
+++ gevent-21.1.2/deps/libev/ev_iouring.c
@@ -286,6 +286,9 @@ iouring_sqe_get (EV_P)
return EV_SQES + (tail & EV_SQ_VAR (ring_mask));
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type"
+
inline_size
struct io_uring_sqe *
iouring_sqe_submit (EV_P_ struct io_uring_sqe *sqe)
@@ -330,6 +333,8 @@ iouring_internal_destroy (EV_P)
}
}
+#pragma GCC diagnostic pop
+
ecb_cold
static int
iouring_internal_init (EV_P)

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

Binary file not shown.

BIN
gevent-24.10.3.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,15 @@
Avoid colorization of test output in obs runners
Index: gevent-24.2.1/src/gevent/testing/util.py
===================================================================
--- gevent-24.2.1.orig/src/gevent/testing/util.py
+++ gevent-24.2.1/src/gevent/testing/util.py
@@ -98,6 +98,8 @@ def _color(what):
return _color_code(_colorscheme[what])
def _colorize(what, message, normal='normal'):
+ if os.environ.get("TEST_NOCOLOR", False):
+ return message
return _color(what) + message + _color(normal)
def log(message, *args, **kwargs):

View File

@ -1,2 +1,2 @@
addFilter("zero-length .*tests/nullcert\.pem")
addFilter("pem-certificate .*tests/.*\.pem")

View File

@ -1,3 +1,99 @@
-------------------------------------------------------------------
Wed Oct 23 11:07:00 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 24.10.3
* Fix clearing stack frames on Python 3.13. This is invoked when you
fork after having used the thread pool.
* Distribute manylinux2014 wheels for x86_64.
* Stop switching to the hub in the after fork hook in a child process.
This could lead to strange behaviour, and is different than what all
other versions of Python do.
- from version 24.10.2
* Workaround a Cython bug compiling on GCC14.
- Drop gh-2031-cython-workaround.patch, merged upstream
-------------------------------------------------------------------
Thu Oct 10 09:39:52 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 24.10.1
* Update the bundled c-ares to 1.33.1.
* Add support for Python 3.13.
- The functions and classes in ``gevent.subprocess`` no longer accept
``stdout=STDOUT`` and raise a ``ValueError``.
Several additions and changes to the ``queue`` module, including:
- ``Queue.shutdown`` is available on all versions of Python.
- ``LifoQueue`` is now a joinable queue.
* gevent.monkey changed from a module to a package. The public API
remains the same.
For this release, private APIs (undocumented, marked internal, or
beginning with an underscore) are also preserved. However, these may
be changed or removed at any time in the future. If you are using one
of these APIs and cannot replace it, please contact the gevent team.
* For platforms that don't have ``socketpair``, upgrade our fallback
code to avoid a security issue.
See :issue:`2048`.
* Remove support for Python 3.8, which has reached the end of its
support lifecycle.
See :issue:`remove_py38`.
- Drop gh-113964-fix-tests-3.12.3.patch, fixed upstream
- Renumber patches
-------------------------------------------------------------------
Tue May 28 10:56:43 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Add gh-2031-cython-workaround.patch which fixes a regression
with Cython 3.0.10 which caused an FTBFS with GCC 14
-------------------------------------------------------------------
Mon Apr 22 07:38:07 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Add gh-113964-fix-tests-3.12.3.patch to tix tests with python 3.12.3
(bsc#1223128)
- Drop upstream patches:
* gevent-fix-unittest-returncode-py312-c1.patch
* gevent-fix-unittest-returncode-py312-c2.patch
- Update to version 24.2.1:
- Add support for Python patch releases 3.11.8 and 3.12.2, which
changed internal details of threading.
- Errors raised from subprocess.Popen may not have a filename set.
- SSLSocket.recv_into and SSLSocket.read no longer require the
buffer to implement len and now work with buffers whose size is
not 1.
- gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close
flaw.
- Drop setuptools to a soft test dependency.
- Drop support for very old versions of CFFI.
- Update bundled c-ares from 1.19.1 to 1.26.0.
- Locks created by gevent, but acquired from multiple different
threads (not recommended), no longer spin to implement timeouts
and interruptible blocking. Instead, they use the native
functionality of the Python 3 lock. This may improve some
scenarios. See issue #2013.
-------------------------------------------------------------------
Wed Jan 10 22:40:39 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Clean obsolete old python and old distribution directives
* Only 15.5+ with the sle15 python module and Tumbleweed have the
required Python 3.8+
* Drop fix-no-return-in-nonvoid-function.patch
- Update test suite execution
* Use -u-network flag to disable network tests
* Add gevent-opensuse-nocolor-tests.patch -- Avoid colorization
of test output in obs runners
* Add gevent-fix-unittest-returncode-py312-c1.patch and
gevent-fix-unittest-returncode-py312-c2.patch
gh#gevent/gevent#2012
-------------------------------------------------------------------
Mon Nov 27 15:53:52 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 23.9.1:
* Require greenlet 3.0 on Python 3.11 and Python 3.12; greenlet
3.0 is recommended for all platforms.
-------------------------------------------------------------------
Mon Sep 18 19:07:56 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-gevent
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,36 +16,36 @@
#
%define modname gevent
# on TW, gevent is able to use system libev, Leaps et.al. need the bundled version
%if 0%{?suse_version} <= 1500
%define use_bundled_libev 1
%else
%define use_bundled_libev 0
%endif
# get colored test output on local osc build
%bcond_with colortest
%{?sle15_python_module_pythons}
Name: python-gevent
Version: 23.9.0
Version: 24.10.3
Release: 0
Summary: Python network library that uses greenlet and libevent
License: MIT
Group: Development/Languages/Python
URL: https://www.gevent.org/
Source0: https://github.com/gevent/%{modname}/archive/%{version}.tar.gz#/%{modname}-%{version}.tar.gz
Source0: https://github.com/gevent/gevent/archive/%{version}.tar.gz#/gevent-%{version}.tar.gz
Source100: %{name}-rpmlintrc
# gcc7 for 15.1 produces no-return-in-nonvoid-function, but the same compiler for 15.2 not
# usually, as long as no return value is used, this shouldn't be treated as an error
# let's selectively disable the warning around the offending code
Patch0: fix-no-return-in-nonvoid-function.patch
BuildRequires: %{python_module Cython}
# 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
BuildRequires: %{python_module Cython >= 3.0.2}
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module dnspython}
BuildRequires: %{python_module greenlet >= 2.0.0}
BuildRequires: %{python_module greenlet >= 3.0.0}
BuildRequires: %{python_module objgraph}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module zope.event}
BuildRequires: %{python_module zope.interface}
@ -54,13 +54,11 @@ BuildRequires: fdupes
BuildRequires: netcfg
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: python3-testsuite
BuildRequires: pkgconfig(libcares)
BuildRequires: pkgconfig(libuv)
Requires: python-cffi
Requires: python-dnspython
Requires: python-greenlet >= 2.0.0
Requires: python-importlib-metadata
Requires: python-greenlet >= 3.0.0
Requires: python-requests
Requires: python-zope.event
Requires: python-zope.interface
@ -103,10 +101,7 @@ Documentation and examples for %{name}.
%endif
%prep
%setup -q -n gevent-%{version}
%if 0%{?sle_version} <= 150100 && 0%{?is_opensuse}
%patch0 -p1
%endif
%autosetup -p1 -n gevent-%{version}
sed -i -e '1s!bin/env python!bin/python!' examples/*.py
sed -i -e '1{/bin.*python/d}' src/gevent/tests/*.py
@ -128,30 +123,22 @@ chmod +x %{buildroot}%{$python_sitearch}/gevent/testing/testrunner.py
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%{python_expand #
# create ignore list of tests, e.g. because they reach out to the net
# https://www.gevent.org/development/running_tests.html
#
# create ignore list of tests, e.g. because they reach out to the net despite -u-network
cat << EOF > skip_tests.txt
test__core_stat.py
%if 0%{?sle_version} <= 150200 && 0%{?is_opensuse}
test__destroy_default_loop.py
test__example_echoserver.py
test_socket.py
%endif
test__examples.py
# this one fails occasionally with: Address already in use: ('127.0.0.1', 16000)
test__example_portforwarder.py
# no dns resolver in obs
test__getaddrinfo_import.py
test__resolver_dnspython.py
test__socket_dns.py
test__issue1686.py
# Flaky tests in s390x architecture
%ifarch s390x
test__util.py
%endif
EOF
if [ %{$python_version_nodots} -lt 37 ]; then
echo "test__threading_2.py" >> skip_tests.txt
fi
export GEVENT_RESOLVER=thread
# Setting the TRAVIS environment variable makes some different configuration
# for tests that use the network so they don't fail on travis (or obs)
@ -163,10 +150,14 @@ export LANG=en_US.UTF-8
# Relax the crypto policies for the test-suite
export OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file
export OPENSSL_CONF=''
# don't bother with python2 tests
if [ "${python_flavor}" != "python2" ]; then
PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m gevent.tests --ignore skip_tests.txt
fi
%{!?_with_colortest:export TEST_NOCOLOR=1}
%{python_expand #
export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python -m gevent.tests \
--ignore skip_tests.txt \
-u-network \
--verbose \
%{?jobs:--processes %jobs}
}
%files %{python_files}