Accepting request 940551 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/940551
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-gevent?expand=0&rev=37
This commit is contained in:
Dominique Leuenberger 2021-12-16 20:18:54 +00:00 committed by Git OBS Bridge
commit 3d2a1b2315
5 changed files with 41 additions and 16 deletions

View File

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

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

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:756ebc51a9e24b4ad58957e571d6a791b363cff0f0b9f19f7b2f1e573e044f58
size 4451447

View File

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

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Mon Dec 13 20:30:19 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to 21.12.0
* Fix hanging the interpreter on shutdown if gevent monkey
patching occurred on a non-main thread in Python 3.9.8 and
above. (Note that this is not a recommended practice.) See
:issue:`1839`.
* Update the embedded c-ares from 1.16.1 to 1.17.1. See
:issue:`1758`.
* Add support for Python 3.10rc1 and newer. As part of this, the
minimum required greenlet version was increased to 1.1.0 (on
CPython), and the minimum version of Cython needed to build
gevent from a source checkout is 3.0a9. Note that the dnspython
resolver is not available on Python 3.10. See :issue:`1790`.
- Meanwhile Cython 0.29.24 and dnspython are compatible
with python310
- Revert threading test skip, fixed in 21.12
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Nov 19 07:48:57 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com> Fri Nov 19 07:48:57 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -24,10 +24,10 @@
%endif %endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define modversion 21.1.2 %define modversion 21.12.0
%define modname gevent %define modname gevent
Name: python-gevent Name: python-gevent
Version: 21.1.2 Version: 21.12.0
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
@ -45,7 +45,7 @@ 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 >= 0.4.17} BuildRequires: %{python_module greenlet >= 1.1.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}
@ -112,6 +112,7 @@ Documentation and examples for %{name}.
%patch1 -p1 %patch1 -p1
%endif %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
%build %build
export LIBEV_EMBED=%{use_bundled_libev} export LIBEV_EMBED=%{use_bundled_libev}
@ -123,22 +124,23 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
export LIBEV_EMBED=%{use_bundled_libev} export LIBEV_EMBED=%{use_bundled_libev}
export CARES_EMBED=0 export CARES_EMBED=0
%python_install %python_install
%{python_expand # fix script interpreter-line and exec bit
sed -i '1{s|^#!.*bin.*python.*$|#!%{__$python}|}' %{buildroot}%{$python_sitearch}/gevent/testing/testrunner.py
chmod +x %{buildroot}%{$python_sitearch}/gevent/testing/testrunner.py
}
%{?python_compileall}
%python_expand %fdupes %{buildroot}%{$python_sitearch} %python_expand %fdupes %{buildroot}%{$python_sitearch}
%check %check
# create ignore list of tests that reach out to the net %{python_expand #
cat << EOF > network_tests.txt # create ignore list of tests, e.g. because they reach out to the net
cat << EOF > skip_tests.txt
test__core_stat.py test__core_stat.py
%if 0%{?sle_version} <= 150200 && 0%{?is_opensuse} %if 0%{?sle_version} <= 150200 && 0%{?is_opensuse}
test__destroy_default_loop.py test__destroy_default_loop.py
test__example_echoserver.py test__example_echoserver.py
test_socket.py test_socket.py
%endif %endif
%if %{python3_version_nodots} < 37
test__threading_2.py
%endif
# this fails badly with 3.9.9
test__threading_monkey_in_thread.py
test__examples.py test__examples.py
# this one fails occasionally with: Address already in use: ('127.0.0.1', 16000) # this one fails occasionally with: Address already in use: ('127.0.0.1', 16000)
test__example_portforwarder.py test__example_portforwarder.py
@ -146,6 +148,9 @@ test__getaddrinfo_import.py
test__resolver_dnspython.py test__resolver_dnspython.py
test__socket_dns.py test__socket_dns.py
EOF EOF
if [ %{$python_version_nodots} -lt 37 ]; then
echo "test__threading_2.py" >> skip_tests.txt
fi
export GEVENT_RESOLVER=thread export GEVENT_RESOLVER=thread
# Setting the TRAVIS environment variable makes some different configuration # Setting the TRAVIS environment variable makes some different configuration
# for tests that use the network so they don't fail on travis (or obs) # for tests that use the network so they don't fail on travis (or obs)
@ -158,8 +163,8 @@ export LANG=en_US.UTF-8
export OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file export OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file
export OPENSSL_CONF='' export OPENSSL_CONF=''
# don't bother with python2 tests # don't bother with python2 tests
%{python_expand if [ "$python" != "python2" ]; then if [ "${python_flavor}" != "python2" ]; then
PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m gevent.tests --ignore network_tests.txt PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m gevent.tests --ignore skip_tests.txt
fi fi
} }