Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Signal from __all__, replace aiohttp.Signal with aiosignal.Signal in docs #6201

Merged
merged 5 commits into from
Nov 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/6201.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove ``Signal`` from ``__all__``, replace ``aiohttp.Signal`` with ``aiosignal.Signal`` in docs
2 changes: 0 additions & 2 deletions aiohttp/__init__.py
Original file line number Diff line number Diff line change
@@ -180,8 +180,6 @@
"AsyncResolver",
"DefaultResolver",
"ThreadedResolver",
# signals
"Signal",
# streams
"DataQueue",
"EMPTY_PAYLOAD",
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -69,6 +69,7 @@
"python": ("http://docs.python.org/3", None),
"multidict": ("https://multidict.readthedocs.io/en/stable/", None),
"yarl": ("https://yarl.readthedocs.io/en/stable/", None),
"aiosignal": ("https://aiosignal.readthedocs.io/en/stable/", None),
"aiohttpjinja2": ("https://aiohttp-jinja2.readthedocs.io/en/stable/", None),
"aiohttpremotes": ("https://aiohttp-remotes.readthedocs.io/en/stable/", None),
"aiohttpsession": ("https://aiohttp-session.readthedocs.io/en/stable/", None),
45 changes: 0 additions & 45 deletions docs/signals.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/utilities.rst
Original file line number Diff line number Diff line change
@@ -14,6 +14,5 @@ Miscellaneous API Shared between Client And Server.
multipart
multipart_reference
streams
signals
structures
websocket_utilities
8 changes: 4 additions & 4 deletions docs/web_reference.rst
Original file line number Diff line number Diff line change
@@ -1372,7 +1372,7 @@ duplicated like one using :meth:`~aiohttp.web.Application.copy`.

.. attribute:: on_response_prepare

A :class:`~aiohttp.Signal` that is fired near the end
A :class:`~aiosignal.Signal` that is fired near the end
of :meth:`StreamResponse.prepare` with parameters *request* and
*response*. It can be used, for example, to add custom headers to each
response, or to modify the default headers computed by the application,
@@ -1385,7 +1385,7 @@ duplicated like one using :meth:`~aiohttp.web.Application.copy`.

.. attribute:: on_startup

A :class:`~aiohttp.Signal` that is fired on application start-up.
A :class:`~aiosignal.Signal` that is fired on application start-up.

Subscribers may use the signal to run background tasks in the event
loop along with the application's request handler just after the
@@ -1400,7 +1400,7 @@ duplicated like one using :meth:`~aiohttp.web.Application.copy`.

.. attribute:: on_shutdown

A :class:`~aiohttp.Signal` that is fired on application shutdown.
A :class:`~aiosignal.Signal` that is fired on application shutdown.

Subscribers may use the signal for gracefully closing long running
connections, e.g. websockets and data streaming.
@@ -1420,7 +1420,7 @@ duplicated like one using :meth:`~aiohttp.web.Application.copy`.

.. attribute:: on_cleanup

A :class:`~aiohttp.Signal` that is fired on application cleanup.
A :class:`~aiosignal.Signal` that is fired on application cleanup.

Subscribers may use the signal for gracefully closing
connections to database server etc.
24 changes: 24 additions & 0 deletions tests/test___all__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from typing import Any


def test___all__(pytester: Any) -> None:
"""
See https://github.com/aio-libs/aiohttp/issues/6197
"""
pytester.makepyfile(
test_a="""
from aiohttp import *
"""
)
result = pytester.runpytest("-vv")
result.assert_outcomes(passed=0, errors=0)


def test_web___all__(pytester: Any) -> None:
pytester.makepyfile(
test_b="""
from aiohttp.web import *
"""
)
result = pytester.runpytest("-vv")
result.assert_outcomes(passed=0, errors=0)