Fixed Fixed ServerErrorMiddleware compatibility with Python 3.9.1/3.8.7 when debug mode is enabled - #1132. Fixed unclosed socket ResourceWarnings when using the TestClient with WebSocket endpoints - #1132. Improved detection of async endpoints wrapped in functools.partial on Python 3.8+ - #1106.