-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Accept a coroutine in web.run_app #2739
Comments
How does this differ from on_startup? Surely too many options will for the default way to run a server will confuse new users? |
It follows new asyncio API: https://docs.python.org/3.7/library/asyncio-task.html#asyncio.asyncio.run |
Sounds reasonable, I'd like to see the implementation draft for it. |
The change is easy:
in very beginning of Any volunteer? |
it's say try/except instead |
looks really strange for me |
but follows EAFP |
It is not forgiveness/permission problem but overloading accepted types. |
yeah, and there's |
singledispatch actually - that's the problem |
would this feature allow you to run the app asynchronously? in other words an async equivalent of the aiohttp.web.run_app function? |
@chuck1 no. But you can run an app from in a coroutine by three lines of code, 2 for initializing and 1 for shutdown: https://docs.aiohttp.org/en/stable/web_advanced.html#application-runners |
Done by #2765 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
The proposal allows to execute async IO before creating an application
The text was updated successfully, but these errors were encountered: