-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Consistently use db_to_json
to convert from database values to JSON objects.
#7849
Conversation
There are other instances of |
I decided to make this change, see 281d4de29eb776c28ce23d1c72bdeb4f1dc10e0b |
281d4de
to
212e79d
Compare
212e79d
to
fdd65df
Compare
db_to_json
to convert from database values to JSON objects.
I suspect it would be nice to have a |
# Avoid a circular import. | ||
from synapse.storage._base import db_to_json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hrm. It's unsatisfactory if synapse.storage._base
has a dependency on this file somehow. This is fine as a temporary solution though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
synapse.storage._base
imports from synapse.storage.database
, which imports from synapse.storage.background_updater
.
This removes the last usages of importing json from canonicaljson in order to get the simplejson package.This consistently uses the
db_to_json
helper in our storage code. So a follow-on to #7836 / #7802 and related to #7674.