mirror of https://github.com/Nezreka/SoulSync.git
Pytest tears down its log file handles before atexit runs. Every "Shutting down ..." line a worker emits while stopping then crashes Python's logger with "I/O operation on closed file" and floods CI stderr with --- Logging error --- traceback blocks. The CI sanity check workflow noticed once tests started importing web_server (the Tidal-auth integration test PR + this parallel-imports PR are the first two test files that boot the full module). Adds a tiny atexit handler that flips ``logging.raiseExceptions = False`` BEFORE the other shutdown handlers run. atexit's LIFO order makes "registered last" mean "runs first", so this fires ahead of cleanup_monitor / _atexit_shutdown / _atexit_save_history and any log calls those make can't bubble the closed-stream traceback. The shutdown messages themselves are best-effort debug breadcrumbs, not data we need to preserve at process exit, so silencing the internal handler errors costs nothing.pull/456/head
parent
f339211654
commit
1aa565a330
Loading…
Reference in new issue