What's new
Native async middleware support for ASGI deployments.
All three middleware classes — RequestIdMiddleware, ErrorLoggingMiddleware, and RequestLoggingMiddleware — now declare async_capable = True and implement __acall__, enabling use in async Django (ASGI) alongside traditional sync WSGI.
Details
__call__delegates to__acall__when in async mode, matching Django'sMiddlewareMixindispatch patternErrorLoggingMiddleware.__acall__wraps the response in try/except to replicateprocess_exceptionbehavior (Django skipsprocess_exceptionin async mode)RequestIdMiddlewareextracts shared logic into_before_request/_after_requestto avoid duplication between sync and async paths
Full Changelog: v0.8.0...v0.9.0