Files
synapse/tests
Matthew Hodgson f266396e25 Here's the current state summary:
What's done:

  1. All Twisted imports conditional (230 files wrapped in try/except ImportError)
  2. Test base class: stdlib unittest.TestCase (no more twisted.trial)
  3. ContextVar is primary logcontext storage (threading.local removed)
  4. All @defer.inlineCallbacks converted to async def (0 remaining)
  5. Module API fully async (no Deferred return types)
  6. CancelledError is asyncio.CancelledError in 17 files
  7. yieldable_gather_results uses asyncio.gather (with Twisted fallback)
  8. run_in_background tries asyncio first (falls back to Twisted)
  9. Asyncio reactor installed in production (_base.py)
  10. Twisted optional in pyproject.toml
  11. All 21 key modules import without Twisted

  What remains:

  - ~79 defer.* calls in old utility classes (Linearizer, ReadWriteLock, etc.) and reactor entry points — these can only be removed when the test infrastructure switches from MemoryReactorClock to a real asyncio loop
  - 4 REST cancellation test failures (Twisted request lifecycle)
  - The reactor.run() → asyncio.run() entry point switch (production only, not tests)
2026-03-21 21:46:27 +00:00
..
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 21:46:27 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 21:46:27 +00:00