Provide an ASGI3 interface onto an ASGI2 app.
| 67 | |
| 68 | |
| 69 | class _WrapASGI2: |
| 70 | """ |
| 71 | Provide an ASGI3 interface onto an ASGI2 app. |
| 72 | """ |
| 73 | |
| 74 | def __init__(self, app: ASGI2App) -> None: |
| 75 | self.app = app |
| 76 | |
| 77 | async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: |
| 78 | instance = self.app(scope) |
| 79 | await instance(receive, send) |
| 80 | |
| 81 | |
| 82 | class _AsyncBackend(TypedDict): |