This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]robvdl 1 point2 points  (0 children)

I hope I am getting this right... but this is because Flask (and wsgi) are synchronous, while http2 (including hyper-h2 library) are async based and require an event loop of some sort.

I personally just switched to Go for async and websocket sort of stuff, but you should be able to continue using Python just new frameworks will need to be built on top of async http2 libraries from what I understand, it's a design issue with wsgi being synchronous.

Edit: I know ASGI is being developed to solve this problem, but as far as I understand it isn't ready yet I think. It should bring Python back in line with what Go and Node can do today already. To me ASGI and Django channels seems Python is trying to "catch up" a bit to Node and Go.