diff --git a/packages/p/python-aiohttp/.files b/packages/p/python-aiohttp/.files index f6e995f9713..7e777284d43 100644 Binary files a/packages/p/python-aiohttp/.files and b/packages/p/python-aiohttp/.files differ diff --git a/packages/p/python-aiohttp/.rev b/packages/p/python-aiohttp/.rev index 5760a4ecbd5..34e3db3eba7 100644 --- a/packages/p/python-aiohttp/.rev +++ b/packages/p/python-aiohttp/.rev @@ -178,4 +178,14 @@ 875795 + + b8a037fc62f6a0fdf1049e5a634b200c + 3.7.4 + + dimstar_suse + - Add stdlib-typing_extensions.patch to avoid necessity for BR + python-typing_extensions (gh#aio-libs/aiohttp#5374). + + 893032 + diff --git a/packages/p/python-aiohttp/python-aiohttp.changes b/packages/p/python-aiohttp/python-aiohttp.changes index e2fd66d8148..65cadf8b24c 100644 --- a/packages/p/python-aiohttp/python-aiohttp.changes +++ b/packages/p/python-aiohttp/python-aiohttp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 13 21:58:35 UTC 2021 - Matej Cepl + +- Add stdlib-typing_extensions.patch to avoid necessity for BR + python-typing_extensions (gh#aio-libs/aiohttp#5374). + ------------------------------------------------------------------- Sun Feb 28 13:09:40 UTC 2021 - Michael Ströder diff --git a/packages/p/python-aiohttp/python-aiohttp.spec b/packages/p/python-aiohttp/python-aiohttp.spec index 30686188ed3..4846c25c086 100644 --- a/packages/p/python-aiohttp/python-aiohttp.spec +++ b/packages/p/python-aiohttp/python-aiohttp.spec @@ -26,6 +26,9 @@ License: Apache-2.0 URL: https://github.com/aio-libs/aiohttp Source: https://files.pythonhosted.org/packages/source/a/aiohttp/aiohttp-%{version}.tar.gz Patch0: unbundle-http-parser.patch +# PATCH-FIX-UPSTREAM stdlib-typing_extensions.patch gh#aio-libs/aiohttp#5374 mcepl@suse.com +# Fix typing_extensions imports. +Patch1: stdlib-typing_extensions.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module async_timeout >= 3.0} BuildRequires: %{python_module attrs >= 17.3.0} @@ -35,7 +38,7 @@ BuildRequires: %{python_module freezegun} BuildRequires: %{python_module idna_ssl >= 1.0} BuildRequires: %{python_module multidict >= 4.5} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module typing_extensions >= 3.6.5} +BuildRequires: %{python_module typing_extensions >= 3.6.5 if %python-base < 3.8} BuildRequires: %{python_module yarl >= 1.0} BuildRequires: fdupes BuildRequires: http-parser-devel @@ -46,8 +49,8 @@ Requires: python-attrs >= 17.3.0 Requires: python-chardet >= 2.0 Requires: python-gunicorn Requires: python-multidict >= 4.5 -Requires: python-typing_extensions >= 3.6.5 Requires: python-yarl >= 1.0 +Requires: (python3-typing_extensions >= 3.6.5 if python3-base < 3.8) Recommends: python-aiodns Recommends: python-brotlipy Recommends: python-cChardet @@ -94,8 +97,8 @@ Asynchronous HTTP client/server framework for Python. HTML documentation on the API and examples for %{name}. %prep -%setup -q -n aiohttp-%{version} -%patch0 -p1 +%autosetup -p1 -n aiohttp-%{version} + # Prevent building with vendor version rm vendor/http-parser/*.c diff --git a/packages/p/python-aiohttp/stdlib-typing_extensions.patch b/packages/p/python-aiohttp/stdlib-typing_extensions.patch new file mode 100644 index 00000000000..8e6503ac863 --- /dev/null +++ b/packages/p/python-aiohttp/stdlib-typing_extensions.patch @@ -0,0 +1,60 @@ +--- + aiohttp/helpers.py | 5 ++++- + aiohttp/tracing.py | 5 ++++- + aiohttp/web_urldispatcher.py | 5 ++++- + setup.py | 2 +- + 4 files changed, 13 insertions(+), 4 deletions(-) + +--- a/aiohttp/helpers.py ++++ b/aiohttp/helpers.py +@@ -45,7 +45,10 @@ from urllib.request import getproxies + import async_timeout + import attr + from multidict import MultiDict, MultiDictProxy +-from typing_extensions import Protocol ++try: ++ from typing import Protocol ++except (ImportError, ModuleNotFoundError): ++ from typing_extensions import Protocol + from yarl import URL + + from . import hdrs +--- a/aiohttp/tracing.py ++++ b/aiohttp/tracing.py +@@ -9,7 +9,10 @@ from .client_reqrep import ClientRespons + from .signals import Signal + + if TYPE_CHECKING: # pragma: no cover +- from typing_extensions import Protocol ++ try: ++ from typing import Protocol ++ except (ImportError, ModuleNotFoundError): ++ from typing_extensions import Protocol + + from .client import ClientSession + +--- a/aiohttp/web_urldispatcher.py ++++ b/aiohttp/web_urldispatcher.py +@@ -33,7 +33,10 @@ from typing import ( + cast, + ) + +-from typing_extensions import TypedDict ++try: ++ from typing import TypedDict ++except (ImportError, ModuleNotFoundError): ++ from typing_extensions import TypedDict + from yarl import URL, __version__ as yarl_version # type: ignore + + from . import hdrs +--- a/setup.py ++++ b/setup.py +@@ -70,7 +70,7 @@ install_requires = [ + "async_timeout>=3.0,<4.0", + "yarl>=1.0,<2.0", + 'idna-ssl>=1.0; python_version<"3.7"', +- "typing_extensions>=3.6.5", ++ 'typing_extensions>=3.7.4; python_version<"3.8"', + ] + +