Commit a53ffa9
committed
fix: suppress 3.14 DeprecationWarning in uvicorn thread + Windows Proactor GC warning
Two separate CI failures, both exposed by moving from subprocess to in-thread:
Python 3.14 (hang → 10m timeout):
pyproject.toml's filterwarnings=error is inherited by the server thread.
On 3.14, uvicorn's config.load() calls asyncio.iscoroutinefunction which
is deprecated, so the warning-turned-error kills the thread before it
starts serving. Because we pre-bind the socket, the kernel listen queue
still accepts connections — clients see ReadTimeout (~5m) instead of
ConnectError. Fixed by catch_warnings inside the thread (thread-local
since 3.12).
Windows Proactor (flaky unraisable warning):
force_exit skips graceful drain, so the Proactor's overlapped AcceptEx
on the listening socket may not finish cancellation before the event
loop is torn down. GC finds it pending during a later unrelated test.
Previously hidden by subprocess isolation. Suppressed at module level —
this is Windows asyncio internals, not a real leak.1 parent 21a3979 commit a53ffa9
2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
78 | 91 | | |
79 | 92 | | |
80 | 93 | | |
| |||
0 commit comments