From 65415e42ffbfaf8a9a6777b1be2ad99386e754a323e9050c69065b64a9067951 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Tue, 24 Jan 2023 16:50:07 +0000 Subject: [PATCH] - Add 412.patch to support python 3.11 gh#aio-libs/aiohttp-cors#412 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp_cors?expand=0&rev=6 --- 412.patch | 27 +++++++++++++++++++++++++++ python-aiohttp_cors.changes | 5 +++++ python-aiohttp_cors.spec | 5 +++-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 412.patch diff --git a/412.patch b/412.patch new file mode 100644 index 0000000..1c6da0e --- /dev/null +++ b/412.patch @@ -0,0 +1,27 @@ +From 1eb2226aaf664d0be746753a32f82ee2e04c2f0b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= +Date: Tue, 1 Mar 2022 15:31:54 +0100 +Subject: [PATCH] Replace @asyncio.coroutine decorator with async def + +In Python 3.11 @asyncio.coroutine decorator was removed and it should +be replaced with async def call. + +Fixes: #280 +--- + tests/unit/test_cors_config.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/tests/unit/test_cors_config.py b/tests/unit/test_cors_config.py +index 817410e..9fe1052 100644 +--- a/tests/unit/test_cors_config.py ++++ b/tests/unit/test_cors_config.py +@@ -29,8 +29,7 @@ async def _handler(request): + + class _View(web.View, CorsViewMixin): + +- @asyncio.coroutine +- def get(self): ++ async def get(self): + return web.Response(text="Done") + + diff --git a/python-aiohttp_cors.changes b/python-aiohttp_cors.changes index ae8da85..eebb368 100644 --- a/python-aiohttp_cors.changes +++ b/python-aiohttp_cors.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 24 16:49:45 UTC 2023 - Daniel Garcia + +- Add 412.patch to support python 3.11 gh#aio-libs/aiohttp-cors#412 + ------------------------------------------------------------------- Thu Aug 18 15:28:57 UTC 2022 - Ben Greiner diff --git a/python-aiohttp_cors.spec b/python-aiohttp_cors.spec index 9d43948..e4d4594 100644 --- a/python-aiohttp_cors.spec +++ b/python-aiohttp_cors.spec @@ -1,7 +1,7 @@ # # spec file for package python-aiohttp_cors # -# Copyright (c) 2022 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 @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-aiohttp_cors Version: 0.7.0 @@ -29,6 +28,8 @@ Source: https://files.pythonhosted.org/packages/source/a/aiohttp-cors/ai Patch0: 0001-Fix-tests.patch Patch1: 0001-215-fixing-exception-message-216.patch Patch2: 278.patch +# PATCH-FIX-UPSTREAM 412.patch gh#aio-libs/aiohttp-cors#412 +Patch3: 412.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros