From 5495be242807aa857bde5334efe00e96d95ccf8a Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 31 Jan 2025 14:58:54 -0600 Subject: [PATCH] Add comment doc to `USE_FROZEN_DICTS` --- synapse/events/__init__.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py index 8e9d27138ca..9e677f241ff 100644 --- a/synapse/events/__init__.py +++ b/synapse/events/__init__.py @@ -53,16 +53,17 @@ if TYPE_CHECKING: from synapse.events.builder import EventBuilder -# Whether we should use frozen_dict in FrozenEvent. Using frozen_dicts prevents -# bugs where we accidentally share e.g. signature dicts. However, converting a -# dict to frozen_dicts is expensive. -# -# NOTE: This is overridden by the configuration by the Synapse worker apps, but -# for the sake of tests, it is set here while it cannot be configured on the -# homeserver object itself. -USE_FROZEN_DICTS = strtobool(os.environ.get("SYNAPSE_USE_FROZEN_DICTS", "0")) +USE_FROZEN_DICTS = False +""" +Whether we should use frozen_dict in FrozenEvent. Using frozen_dicts prevents +bugs where we accidentally share e.g. signature dicts. However, converting a +dict to frozen_dicts is expensive. +NOTE: This is overridden by the configuration by the Synapse worker apps, but +for the sake of tests, it is set here because it cannot be configured on the +homeserver object itself. +""" T = TypeVar("T")