diff --git a/python-eventlet.changes b/python-eventlet.changes index 966d952..60a26be 100644 --- a/python-eventlet.changes +++ b/python-eventlet.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Aug 19 15:28:03 UTC 2020 - Benjamin Greiner + +- do not run test on python 2 (sadly no real macro expansion + possible to allow run but failok with ||:) +- disable test discovery dir recursion gh#eventlet/eventlet#638 +- simplify the pytest call, no test file deletions + ------------------------------------------------------------------- Mon Aug 17 09:38:44 UTC 2020 - John Vandenberg diff --git a/python-eventlet.spec b/python-eventlet.spec index 584de28..0799913 100644 --- a/python-eventlet.spec +++ b/python-eventlet.spec @@ -28,7 +28,7 @@ Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventl # PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 mcepl@suse.com # Removes dependency on nose Patch0: remove_nose.patch -# PATCH-FIX-UPSTREAM newdnspythis patch makes things totally awesomethon.patch gh#eventlet/eventlet#638 mcepl@suse.com +# PATCH-FIX-UPSTREAM newdnspython.patch gh#eventlet/eventlet#638 mcepl@suse.com # patch is from gh#rthalley/dnspython#519 Patch1: newdnspython.patch # PATCH-FEATURE-UPSTREAM pr_639.patch gh#eventlet/eventlet#639 jayvdb@gmail.com @@ -73,45 +73,8 @@ interpreter, or as part of a larger application. %autopatch -p1 sed -i "s|^#!.*||" eventlet/support/greendns.py # Fix non-executable script - -# As of 2020-08, upstream is not running their tests/stdlib tests in CI - -# test setup fails -rm \ - tests/nosewrapper.py \ - tests/stdlib/all.py \ - tests/stdlib/all_modules.py \ - tests/stdlib/test_SimpleHTTPServer.py \ - tests/stdlib/test_httpservers.py \ - tests/stdlib/test_socket_ssl.py \ - tests/stdlib/test_socketserver.py \ - tests/stdlib/test_ssl.py \ - tests/stdlib/test_thread__boundedsem.py \ - tests/stdlib/test_urllib*.py - -# large percentage errors -rm \ - tests/backdoor_test.py \ - tests/stdlib/test_asyncore.py \ - tests/stdlib/test_ftplib.py \ - tests/stdlib/test_select.py - -# Too slow, possibly hanging -rm \ - tests/stdlib/test_queue.py \ - tests/stdlib/test_socket.py \ - tests/stdlib/test_subprocess.py \ - tests/stdlib/test_threading.py - -# Unknown openSUSE 15.x specific errors, including a few not in tests/stdlib: - -# TypeError: _wrap_socket() argument 1 must be _socket.socket, not SSLSocket -# https://github.com/rthalley/dnspython/issues/559#issuecomment-675274960 -if [[ "%python3_version_nodots" == "36" ]]; then - rm \ - tests/api_test.py tests/convenience_test.py tests/ssl_test.py tests/websocket_test.py tests/websocket_new_test.py tests/wsgi_test.py \ - tests/stdlib/test_httplib.py tests/stdlib/test_thread.py -fi +# https://github.com/eventlet/eventlet/issues/638 +sed -i "/assert num_readers/ i \ return" tests/__init__.py %build %python_build @@ -121,21 +84,22 @@ fi %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -export EVENTLET_HUB=selects +# python2 is required to build for Leap, but tests fail (even upstream) +python2_skipall='--collect-only' +# dnspython 1 and 2: backdoor tests fail with "take too long" +skiptests="(BackdoorTest and test_server)" +# fail only with dnspython 2: +skiptests+=" or test_dns_methods_are_green or test_noraise_dns_tcp" -# test_raise_dns_tcp and test_noraise_dns_tcp likely minor dnspython 2 incompatibility -# test_dns_methods_are_green fails because socket_resolve_green.py -# emits "name: test-host0. error: [Errno -2] Name or service not known" -# second set of test failures are the stdlib tests - -# Python 2 has many failures upstream also, that are not being actively fixed. -# They are mostly related to the test harness, rather than the library. -# e.g. https://github.com/eventlet/eventlet/issues/641 -%{python_expand if [[ "$python" != "python2" ]]; then - export PYTHONPATH=%{buildroot}%{$python_sitelib} - $python -m pytest -rs -vv --ignore tests/manual -k 'not (test_raise_dns_tcp or test_noraise_dns_tcp or test_dns_methods_are_green) and not (test_get_exec_path or test_internal_execvpe_str or test_open_keywords or test_locked_repr or test_repr or test_timeout or test_unraisable_exception or ExceptHookTests or test_interrupt_main_noerror or test_threading_local)' -fi -} +# Unknown openSUSE 15.x specific errors +# TypeError: _wrap_socket() argument 1 must be _socket.socket, not SSLSocket +# https://github.com/rthalley/dnspython/issues/559#issuecomment-675274960 +%if %python3_version_nodots == 36 + skiptests+=" or test_connect_ssl or test_ssl_sending_messages or test_wrap_ssl" + skiptests+=" or ssl_test or wsgi_test" +%endif +# no subdir recursion https://github.com/eventlet/eventlet/issues/638#issuecomment-676085599 +%pytest -o norecursedirs="tests/*" -k "not ($skiptests)" ${$python_skipall} %files %{python_files} %license LICENSE