# Copy of starlette.routing.request_response modified to include the
# Copy of starlette.routing.request_response modified to include the
# dependencies' AsyncExitStack
# dependencies' AsyncExitStack
@ -256,12 +255,12 @@ class EndpointContext(TypedDict, total=False):
function:str
function:str
# Use a WeakKeyDictionary instead of a standard dict to prevent memory leaks
# Use a WeakKeyDictionary instead of a standard dict to prevent memory leaks
# and cache collisions when endpoints are dynamically created and destroyed.
# and cache collisions when endpoints are dynamically created and destroyed.
# This cache will only be used for the fallback "slow path"._endpoint_context_cache: weakref.WeakKeyDictionary[Any, EndpointContext] = weakref.WeakKeyDictionary()
# This cache will only be used for the fallback "slow path"._endpoint_context_cache: weakref.WeakKeyDictionary[Any, EndpointContext] = weakref.WeakKeyDictionary()