Fix SYNAPSE_ASYNC_IO_REACTOR=1 on Python 3.14 (#19949)

This commit is contained in:
Sandro
2026-07-13 09:39:56 +00:00
committed by GitHub
parent be511b22a2
commit 733620acd7
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
Fix `SYNAPSE_ASYNC_IO_REACTOR=1` on Python 3.14.
+3 -1
View File
@@ -49,7 +49,9 @@ if strtobool(os.environ.get("SYNAPSE_ASYNC_IO_REACTOR", "0")):
from twisted.internet import asyncioreactor
asyncioreactor.install(asyncio.get_event_loop())
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
asyncioreactor.install(loop)
# Twisted and canonicaljson will fail to import when this file is executed to
# get the __version__ during a fresh install. That's OK and subsequent calls to