summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/9270.misc1
-rw-r--r--synapse/app/_base.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/changelog.d/9270.misc b/changelog.d/9270.misc
new file mode 100644

index 0000000000..908e5ee78b --- /dev/null +++ b/changelog.d/9270.misc
@@ -0,0 +1 @@ +Restore PyPy compatibility by not calling CPython-specific GC methods when under PyPy. diff --git a/synapse/app/_base.py b/synapse/app/_base.py
index 395e202b89..9840a9d55b 100644 --- a/synapse/app/_base.py +++ b/synapse/app/_base.py
@@ -16,6 +16,7 @@ import gc import logging import os +import platform import signal import socket import sys @@ -339,7 +340,7 @@ async def start(hs: "synapse.server.HomeServer", listeners: Iterable[ListenerCon # rest of time. Doing so means less work each GC (hopefully). # # This only works on Python 3.7 - if sys.version_info >= (3, 7): + if platform.python_implementation() == "CPython" and sys.version_info >= (3, 7): gc.collect() gc.freeze()