Skip to content

Commit 9f659ca

Browse files
authored
Switch to external frozenlist and aiosignal libraries (#5293)
1 parent aa11d78 commit 9f659ca

17 files changed

+17
-686
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
.vimrc
3535
.vscode
3636
aiohttp/_find_header.c
37-
aiohttp/_frozenlist.c
38-
aiohttp/_frozenlist.html
3937
aiohttp/_headers.html
4038
aiohttp/_headers.pxi
4139
aiohttp/_helpers.c

CHANGES/5293.feature

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Switch to external frozenlist and aiosignal libraries.

aiohttp/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
DefaultResolver as DefaultResolver,
7878
ThreadedResolver as ThreadedResolver,
7979
)
80-
from .signals import Signal as Signal
8180
from .streams import (
8281
EMPTY_PAYLOAD as EMPTY_PAYLOAD,
8382
DataQueue as DataQueue,

aiohttp/_frozenlist.pyx

-108
This file was deleted.

aiohttp/frozenlist.py

-72
This file was deleted.

aiohttp/frozenlist.pyi

-46
This file was deleted.

aiohttp/signals.py

-34
This file was deleted.

aiohttp/signals.pyi

-12
This file was deleted.

aiohttp/test_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from typing import TYPE_CHECKING, Any, Callable, Iterator, List, Optional, Type, Union
1515
from unittest import mock
1616

17+
from aiosignal import Signal
1718
from multidict import CIMultiDict, CIMultiDictProxy
1819
from yarl import URL
1920

@@ -26,7 +27,6 @@
2627
from .client_ws import ClientWebSocketResponse
2728
from .helpers import _SENTINEL, PY_38, sentinel
2829
from .http import HttpVersion, RawRequestMessage
29-
from .signals import Signal
3030
from .web import (
3131
Application,
3232
AppRunner,

aiohttp/tracing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
from types import SimpleNamespace
33
from typing import TYPE_CHECKING, Awaitable, Optional, Type, TypeVar
44

5+
from aiosignal import Signal
56
from multidict import CIMultiDict
67
from yarl import URL
78

89
from .client_reqrep import ClientResponse
9-
from .signals import Signal
1010

1111
if TYPE_CHECKING: # pragma: no cover
1212
from typing_extensions import Protocol

aiohttp/web_app.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
cast,
2323
)
2424

25+
from aiosignal import Signal
26+
from frozenlist import FrozenList
2527
from typing_extensions import final
2628

2729
from . import hdrs
28-
from .frozenlist import FrozenList
2930
from .log import web_logger
30-
from .signals import Signal
3131
from .web_middlewares import _fix_request_current_app
3232
from .web_request import Request
3333
from .web_response import StreamResponse

requirements/base.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
-r multidict.txt
22
# required c-ares will not build on windows and has build problems on Macos Python<3.7
33
aiodns==2.0.0; sys_platform=="linux" or sys_platform=="darwin" and python_version>="3.7"
4+
aiosignal==1.1.2
45
async-timeout==4.0.0a3
56
asynctest==0.13.0; python_version<"3.8"
67
Brotli==1.0.9
78
cchardet==2.1.7
89
chardet==3.0.4
10+
frozenlist==1.1.1
911
gunicorn==20.0.4
1012
typing_extensions==3.7.4.3
1113
uvloop==0.14.0; platform_system!="Windows" and implementation_name=="cpython" and python_version<"3.9" # MagicStack/uvloop#14

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
],
3939
define_macros=[("HTTP_PARSER_STRICT", 0)],
4040
),
41-
Extension("aiohttp._frozenlist", ["aiohttp/_frozenlist.c"]),
4241
Extension("aiohttp._helpers", ["aiohttp/_helpers.c"]),
4342
Extension("aiohttp._http_writer", ["aiohttp/_http_writer.c"]),
4443
]
@@ -57,6 +56,8 @@
5756
'asynctest==0.13.0; python_version<"3.8"',
5857
"yarl>=1.0,<2.0",
5958
"typing_extensions>=3.7.4",
59+
"frozenlist>=1.1.1",
60+
"aiosignal>=1.1.2",
6061
]
6162

6263

0 commit comments

Comments
 (0)