A middleware class to emit timing information (cpu and wall time) for each request which
passes through it. Includes examples for how to emit these timings as statsd metrics.
+
+#### [WSGIMiddleware](https://github.com/abersheeran/a2wsgi)
+
+A middleware class in charge of converting a WSGI application into an ASGI one.
ignore: The 'variables' alias has been deprecated. Please use 'variable_values' instead\.:DeprecationWarning
# Workaround for Python 3.9.7 (see https://bugs.python.org/issue45097)
ignore:The loop argument is deprecated since Python 3\.8, and scheduled for removal in Python 3\.10\.:DeprecationWarning:asyncio
+ ignore: starlette\.middleware\.wsgi is deprecated and will be removed in a future release\.*:DeprecationWarning
[coverage:run]
source_pkgs = starlette, tests
import math
import sys
import typing
+import warnings
import anyio
from starlette.types import Receive, Scope, Send
+warnings.warn(
+ "starlette.middleware.wsgi is deprecated and will be removed in a future release. "
+ "Please refer to https://github.com/abersheeran/a2wsgi as a replacement.",
+ DeprecationWarning,
+)
+
def build_environ(scope: Scope, body: bytes) -> dict:
"""