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

Support ASGI alongside WSGI #1207

Closed
rpuntaie opened this issue Feb 6, 2020 · 1 comment
Closed

Support ASGI alongside WSGI #1207

rpuntaie opened this issue Feb 6, 2020 · 1 comment

Comments

@rpuntaie
Copy link

rpuntaie commented Feb 6, 2020

I have only found ASGI mentioned in #1198.

ASGI will replace WSGI on the long run.
There is a lot going on regarding ASGI, although it is not a PEP yet.
It is of course, because async support is essential for Python web frameworks
to keep up with other languages.

Could bottle support ASGI alongside WSGI?

Servers do want to support both (e.g. benoitc/gunicorn#1380).

@defnull
Copy link
Member

defnull commented Feb 6, 2020

No. ASGI is fundamentally different from WSGI and it makes much more sense to use a specialized async framework instead of patching existing frameworks beyond recognition. Supporting both blocking and async methods at the same time is almost impossible to get right at the API level, and a pain to implement. If you really need async application logic (everything else is already async with most WSGI servers), and gevent does not work for you, just switch to a fully async framework.

That said, I disagree that WSGI will go away or that ASGI is 'the only future'. There is a place for both, and it is easy to run WSGI on top of ASGI if you really want to. So bottle will continue to work even if I'm wrong about that.

@defnull defnull closed this as completed Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants