Debian Codegraph @

debian/patches/0001-Fix-compatibility-with-Starlette-1.0.patch

raw symbols SCIP
1 Originscip-debian debian asgi-lifespan 2.1.0-4 asgi-lifespan/patches/`0001-Fix-compatibility-with-Starlette-1.0.patch`#Origin.: https://github.com/florimondmanca/asgi-lifespan/pull/72
2 Fromscip-debian debian asgi-lifespan 2.1.0-4 asgi-lifespan/patches/`0001-Fix-compatibility-with-Starlette-1.0.patch`#From.: Matheus Polkorny <[email protected]scip-debian . . . identity/`[email protected]`.>
3 Datescip-debian debian asgi-lifespan 2.1.0-4 asgi-lifespan/patches/`0001-Fix-compatibility-with-Starlette-1.0.patch`#Date.: Fri, 10 Apr 2026 13:48:23 -0300
4 Subjectscip-debian debian asgi-lifespan 2.1.0-4 asgi-lifespan/patches/`0001-Fix-compatibility-with-Starlette-1.0.patch`#Subject.: Fix compatibility with Starlette 1.0
5
6 ---
7 tests/test_manager.py | 27 ++++++++++-----------------
8 1 file changed, 10 insertions(+), 17 deletions(-)
9
10 diff --git a/tests/test_manager.pyscip-debian debian asgi-lifespan 2.1.0-4 asgi-lifespan/upstream/`tests/test_manager.py`: b/tests/test_manager.pyscip-debian debian asgi-lifespan 2.1.0-4 asgi-lifespan/upstream/`tests/test_manager.py`:
11 index d4e4e2e..fa7eaa6 100644
12 --- a/tests/test_manager.py
13 +++ b/tests/test_manager.py
14 @@ -40,26 +40,19 @@ async def test_lifespan_manager(
15 ) -> None:
16 # Setup failing event handlers.
17
18 - on_startup: list = []
19 - on_shutdown: list = []
20 -
21 - if startup_exception is not None:
22 -
23 - async def startup() -> None:
24 + @contextlib.asynccontextmanager
25 + async def lifespan(app):
26 + if startup_exception is not None:
27 assert startup_exception is not None # Please mypy.
28 raise startup_exception()
29 + try:
30 + yield
31 + finally:
32 + if shutdown_exception is not None:
33 + assert shutdown_exception is not None # Please mypy.
34 + raise shutdown_exception()
35
36 - on_startup.append(startup)
37 -
38 - if shutdown_exception is not None:
39 -
40 - async def shutdown() -> None:
41 - assert shutdown_exception is not None # Please mypy.
42 - raise shutdown_exception()
43 -
44 - on_shutdown.append(shutdown)
45 -
46 - router = Router(on_startup=on_startup, on_shutdown=on_shutdown)
47 + router = Router(lifespan=lifespan)
48
49 # Set up spying on exchanged ASGI events.
50