You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tests): suppress uvicorn's 3.14 DeprecationWarning in thread, rejoin
Two CI failures, same root cause of running uvicorn in-process instead
of a subprocess:
1. Python 3.14: asyncio.iscoroutinefunction is deprecated. uvicorn's
config.load() calls it, emitting a DeprecationWarning. Pytest's
filterwarnings=error applies to the uvicorn thread (same process),
so the warning becomes an exception that kills the thread before
server.started is set. The old subprocess fixtures masked this —
subprocesses don't inherit pytest's warning filters. Fix: wrap
server.run in a catch_warnings block that ignores DeprecationWarning.
Also detect a dead thread in the startup poll so we fail fast rather
than spinning for 20s on future thread crashes.
2. Windows 3.12/3.13: Proactor pipe transports leak as unclosed sockets
when the daemon thread is reaped before its event loop finishes
shutdown. The prior perf commit removed thread.join() to save ~200ms
per fixture, but that doesn't hold on Windows. Bring back the join.
Module-scoped fixtures absorb most of the cost anyway (one server
per module instead of per-test).
0 commit comments