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
I just bumped into an error when upgrading to newest version of Sanic using ASGI interface.
Since ASGI lifespan protocol has support for only two server events, we no longer can make usage of before_server_start and after_server_stop server events.
Sanic OpenAPI uses before_server_start server event and this give us the following warning:
UserWarning: You have set a listener for "before_server_start" in ASGI mode. It will be executed as early as possible, but not before the ASGI server is started.
To Reproduce
Run Sanic using an ASGI interface
Expected behavior
Make sure this warning doesn't happen.
Environment:
ubuntu 18.04
Version [0.5.3]
On the decorator of the method build_spec at the file swagger.py I suggest the following change:
before
@blueprint.listener('before_server_start')
after
@blueprint.listener('after_server_start')
What do you think about it?
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is incorrect, please respond with an update. Thank you for your contributions.
Hi,
Describe the bug
I just bumped into an error when upgrading to newest version of Sanic using ASGI interface.
Since ASGI lifespan protocol has support for only two server events, we no longer can make usage of
before_server_start
andafter_server_stop
server events.Sanic OpenAPI uses
before_server_start
server event and this give us the following warning:To Reproduce
Run Sanic using an ASGI interface
Expected behavior
Make sure this warning doesn't happen.
Environment:
On the decorator of the method
build_spec
at the fileswagger.py
I suggest the following change:before
after
What do you think about it?
The text was updated successfully, but these errors were encountered: