Commit 010b798
committed
fix: replace deprecated @app.on_event with lifespan handlers
Replace deprecated @app.on_event("startup") and @app.on_event("shutdown")
with the modern lifespan context manager pattern using asynccontextmanager.
This removes deprecation warnings from test output and uses the recommended
FastAPI approach for application lifecycle events.1 parent dd54a5e commit 010b798
1 file changed
+18
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
28 | 45 | | |
29 | 46 | | |
30 | 47 | | |
31 | 48 | | |
| 49 | + | |
32 | 50 | | |
33 | 51 | | |
34 | 52 | | |
| |||
147 | 165 | | |
148 | 166 | | |
149 | 167 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| |||
0 commit comments