mirror of
https://github.com/element-hq/synapse.git
synced 2025-03-14 09:45:51 +00:00
Merge a8ca59f9e7
into 59a15da433
This commit is contained in:
commit
ee98168566
2 changed files with 10 additions and 10 deletions
1
changelog.d/18123.misc
Normal file
1
changelog.d/18123.misc
Normal file
|
@ -0,0 +1 @@
|
|||
Remove undocumented `SYNAPSE_USE_FROZEN_DICTS` environment variable.
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
import abc
|
||||
import collections.abc
|
||||
import os
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Any,
|
||||
|
@ -48,21 +47,21 @@ from synapse.synapse_rust.events import EventInternalMetadata
|
|||
from synapse.types import JsonDict, StrCollection
|
||||
from synapse.util.caches import intern_dict
|
||||
from synapse.util.frozenutils import freeze
|
||||
from synapse.util.stringutils import strtobool
|
||||
|
||||
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")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue