Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 4 of 4 for AsyncExitStack (0.38 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. fastapi/middleware/asyncexitstack.py

    from contextlib import AsyncExitStack
    
    from starlette.types import ASGIApp, Receive, Scope, Send
    
    
    # Used mainly to close files after the request is done, dependencies are closed
    # in their own AsyncExitStack
    class AsyncExitStackMiddleware:
        def __init__(
            self, app: ASGIApp, context_name: str = "fastapi_middleware_astack"
        ) -> None:
            self.app = app
            self.context_name = context_name
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Sep 29 03:29:38 GMT 2025
    - 637 bytes
    - Click Count (0)
  2. fastapi/dependencies/utils.py

        # people might be monkey patching this function (although that's not supported)
        async_exit_stack: AsyncExitStack,
        embed_body_fields: bool,
    ) -> SolvedDependency:
        request_astack = request.scope.get("fastapi_inner_astack")
        assert isinstance(request_astack, AsyncExitStack), (
            "fastapi_inner_astack not found in request scope"
        )
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 37.6K bytes
    - Click Count (3)
  3. fastapi/routing.py

                # Starts customization
                response_awaited = False
                async with AsyncExitStack() as request_stack:
                    scope["fastapi_inner_astack"] = request_stack
                    async with AsyncExitStack() as function_stack:
                        scope["fastapi_function_astack"] = function_stack
                        response = await f(request)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 174.6K bytes
    - Click Count (0)
  4. docs/en/docs/release-notes.md

    * ♻️ Update internal type annotations and upgrade mypy. PR [#9658](https://github.com/tiangolo/fastapi/pull/9658) by [@tiangolo](https://github.com/tiangolo).
    * ♻️ Simplify `AsyncExitStackMiddleware` as without Python 3.6 `AsyncExitStack` is always available. PR [#9657](https://github.com/tiangolo/fastapi/pull/9657) by [@tiangolo](https://github.com/tiangolo).
    
    ### Upgrades
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 19:06:15 GMT 2025
    - 586.7K bytes
    - Click Count (0)
Back to Top