Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-aioeventlet for openSUSE:Factory checked in at 2023-01-24 19:44:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-aioeventlet (Old) and /work/SRC/openSUSE:Factory/.python-aioeventlet.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-aioeventlet" Tue Jan 24 19:44:05 2023 rev:5 rq:1060676 version:0.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-aioeventlet/python-aioeventlet.changes 2020-08-28 21:21:31.352328900 +0200 +++ /work/SRC/openSUSE:Factory/.python-aioeventlet.new.32243/python-aioeventlet.changes 2023-01-24 20:30:22.491753120 +0100 @@ -1,0 +2,5 @@ +Tue Jan 24 16:38:55 UTC 2023 - Daniel Garcia <[email protected]> + +- Add py311.patch to make the code compatible with python 3.11 + +------------------------------------------------------------------- New: ---- py311.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-aioeventlet.spec ++++++ --- /var/tmp/diff_new_pack.jaJTvg/_old 2023-01-24 20:30:22.967755644 +0100 +++ /var/tmp/diff_new_pack.jaJTvg/_new 2023-01-24 20:30:22.967755644 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-aioeventlet # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,6 @@ # versioning fun %define intver 0.5.1 -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-aioeventlet Version: 0.5.2 Release: 0 @@ -28,6 +27,8 @@ Source: https://files.pythonhosted.org/packages/source/a/aioeventlet/aioeventlet-%{version}.tar.gz # pr_1.patch is Python 3.7+ support Patch0: pr_1.patch +# PATCH-FIX-OPENSUSE py311.patch Python 3.11+ support +Patch1: py311.patch BuildRequires: %{python_module eventlet} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -54,8 +55,7 @@ parallel. %prep -%setup -q -n aioeventlet-%{intver} -%patch0 -p1 +%autosetup -p1 -n aioeventlet-%{intver} %build %python_build @@ -75,6 +75,8 @@ %files %{python_files} %license COPYING %doc README -%{python_sitelib}/* +%{python_sitelib}/aioeventlet.py +%{python_sitelib}/aioeventlet-%{intver}*-info +%pycache_only %{python_sitelib}/__pycache__ %changelog ++++++ py311.patch ++++++ Index: aioeventlet-0.5.1/tests/test_eventlet.py =================================================================== --- aioeventlet-0.5.1.orig/tests/test_eventlet.py +++ aioeventlet-0.5.1/tests/test_eventlet.py @@ -19,72 +19,78 @@ try: import asyncio exec('''if 1: - @asyncio.coroutine - def coro_wrap_greenthread(): + async def coro_wrap_greenthread(): result = [] gt = eventlet.spawn(eventlet_slow_append, result, 1, 0.020) - value = yield from aioeventlet.wrap_greenthread(gt) + for i in aioeventlet.wrap_greenthread(gt): + value = yield i result.append(value) gt = eventlet.spawn(eventlet_slow_append, result, 2, 0.010) - value = yield from aioeventlet.wrap_greenthread(gt) + for i in aioeventlet.wrap_greenthread(gt): + value = yield i result.append(value) gt = eventlet.spawn(eventlet_slow_error) try: - yield from aioeventlet.wrap_greenthread(gt) + for i in aioeventlet.wrap_greenthread(gt): + yield i except ValueError as exc: result.append(str(exc)) result.append(4) - return result + yield result + return - @asyncio.coroutine - def coro_slow_append(result, value, delay=SHORT_SLEEP): - yield from asyncio.sleep(delay) + async def coro_slow_append(result, value, delay=SHORT_SLEEP): + for i in asyncio.sleep(delay): + yield i result.append(value) - return value * 10 + yield value * 10 + return - @asyncio.coroutine - def coro_slow_error(): - yield from asyncio.sleep(0.001) + async def coro_slow_error(): + for i in asyncio.sleep(0.001): + yield i raise ValueError("error") ''') except ImportError: import trollius as asyncio from trollius import From, Return - @asyncio.coroutine - def coro_wrap_greenthread(): + async def coro_wrap_greenthread(): result = [] gt = eventlet.spawn(eventlet_slow_append, result, 1, 0.020) - value = yield From(aioeventlet.wrap_greenthread(gt)) + for i in From(aioeventlet.wrap_greenthread(gt)): + value = yield i result.append(value) gt = eventlet.spawn(eventlet_slow_append, result, 2, 0.010) - value = yield From(aioeventlet.wrap_greenthread(gt)) + for i in From(aioeventlet.wrap_greenthread(gt)): + value = yield i result.append(value) gt = eventlet.spawn(eventlet_slow_error) try: - yield From(aioeventlet.wrap_greenthread(gt)) + for i in From(aioeventlet.wrap_greenthread(gt)): + yield i except ValueError as exc: result.append(str(exc)) result.append(4) raise Return(result) - @asyncio.coroutine - def coro_slow_append(result, value, delay=SHORT_SLEEP): - yield From(asyncio.sleep(delay)) + async def coro_slow_append(result, value, delay=SHORT_SLEEP): + for i in From(asyncio.sleep(delay)): + yield i result.append(value) raise Return(value * 10) - @asyncio.coroutine - def coro_slow_error(): - yield From(asyncio.sleep(0.001)) + async def coro_slow_error(): + for i in From(asyncio.sleep(0.001)): + yield i raise ValueError("error") @@ -223,8 +229,7 @@ class LinkFutureTests(tests.TestCase): def func(obj): return aioeventlet.yield_future(obj) - @asyncio.coroutine - def coro_func(): + async def coro_func(): print("do something") def regular_func(): @@ -315,8 +320,7 @@ class WrapGreenthreadTests(tests.TestCas pass self.assertRaises(TypeError, aioeventlet.wrap_greenthread, func) - @asyncio.coroutine - def coro_func(): + async def coro_func(): pass coro_obj = coro_func() self.addCleanup(coro_obj.close)
