Skip to content

Commit 5495be2

Browse files
committed
Add comment doc to USE_FROZEN_DICTS
1 parent be047b3 commit 5495be2

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

synapse/events/__init__.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,17 @@
5353
if TYPE_CHECKING:
5454
from synapse.events.builder import EventBuilder
5555

56-
# Whether we should use frozen_dict in FrozenEvent. Using frozen_dicts prevents
57-
# bugs where we accidentally share e.g. signature dicts. However, converting a
58-
# dict to frozen_dicts is expensive.
59-
#
60-
# NOTE: This is overridden by the configuration by the Synapse worker apps, but
61-
# for the sake of tests, it is set here while it cannot be configured on the
62-
# homeserver object itself.
6356

64-
USE_FROZEN_DICTS = strtobool(os.environ.get("SYNAPSE_USE_FROZEN_DICTS", "0"))
57+
USE_FROZEN_DICTS = False
58+
"""
59+
Whether we should use frozen_dict in FrozenEvent. Using frozen_dicts prevents
60+
bugs where we accidentally share e.g. signature dicts. However, converting a
61+
dict to frozen_dicts is expensive.
6562
63+
NOTE: This is overridden by the configuration by the Synapse worker apps, but
64+
for the sake of tests, it is set here because it cannot be configured on the
65+
homeserver object itself.
66+
"""
6667

6768
T = TypeVar("T")
6869

0 commit comments

Comments
 (0)