Skip to content

Commit

Permalink
Update python-aiohttp to version 3.7.4 / rev 22 via SR 893032
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/893032
by user mcepl + dimstar_suse
- Add stdlib-typing_extensions.patch to avoid necessity for BR
  python-typing_extensions (gh#aio-libs/aiohttp#5374).
  • Loading branch information
mcepl authored and bmwiedemann committed May 18, 2021
1 parent bc9c9f6 commit 720f590
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 4 deletions.
Binary file modified packages/p/python-aiohttp/.files
Binary file not shown.
10 changes: 10 additions & 0 deletions packages/p/python-aiohttp/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,14 @@
<comment></comment>
<requestid>875795</requestid>
</revision>
<revision rev="22" vrev="2">
<srcmd5>b8a037fc62f6a0fdf1049e5a634b200c</srcmd5>
<version>3.7.4</version>
<time>1621355186</time>
<user>dimstar_suse</user>
<comment>- Add stdlib-typing_extensions.patch to avoid necessity for BR
python-typing_extensions (gh#aio-libs/aiohttp#5374).
</comment>
<requestid>893032</requestid>
</revision>
</revisionlist>
6 changes: 6 additions & 0 deletions packages/p/python-aiohttp/python-aiohttp.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 13 21:58:35 UTC 2021 - Matej Cepl <mcepl@suse.com>

- 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 <michael@stroeder.com>

Expand Down
11 changes: 7 additions & 4 deletions packages/p/python-aiohttp/python-aiohttp.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
60 changes: 60 additions & 0 deletions packages/p/python-aiohttp/stdlib-typing_extensions.patch
Original file line number Diff line number Diff line change
@@ -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"',
]


0 comments on commit 720f590

Please sign in to comment.