- 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
This commit is contained in:
Daniel Garcia 2023-01-24 16:50:07 +00:00 committed by Git OBS Bridge
parent c78b59ebc8
commit 65415e42ff
3 changed files with 35 additions and 2 deletions

27
412.patch Normal file
View File

@ -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?= <thrnciar@redhat.com>
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")

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jan 24 16:49:45 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
- Add 412.patch to support python 3.11 gh#aio-libs/aiohttp-cors#412
-------------------------------------------------------------------
Thu Aug 18 15:28:57 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@ -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