You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you activate the warnings using -Wdefault and execute the script, you will get:
/tmp/b.py:15: DeprecationWarning: Changing state of started or joined application is deprecated
Expected behaviour
Not sure. Not having the warning? The example doesn't look bad, only make_handler is called before the on_startup signal which freezes the app before the signal is sent.
Actual behaviour
When the example in the doc is executed, you get the warning.
Long story short
In the example provided here: https://github.com/aio-libs/aiohttp/blob/master/docs/web.rst#background-tasks we add a new key to the application which is a background task.
If you activate the warnings using
-Wdefault
and execute the script, you will get:Expected behaviour
Not sure. Not having the warning? The example doesn't look bad, only
make_handler
is called before theon_startup
signal which freezes the app before the signal is sent.Actual behaviour
When the example in the doc is executed, you get the warning.
Steps to reproduce
I made this variant to test it out:
And run:
python -Wdefault <script>.py
Your environment
Python 3.6, Arch Linux
The text was updated successfully, but these errors were encountered: