Do not use simplejson in Synapse. (#7800)

This commit is contained in:
Patrick Cloke 2020-07-08 07:15:08 -04:00 committed by GitHub
parent ff0680f69d
commit e7efd8f827
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 25 deletions

View file

@ -18,18 +18,11 @@ The VALID_SERVER_COMMANDS and VALID_CLIENT_COMMANDS define which commands are
allowed to be sent by which side.
"""
import abc
import json
import logging
import platform
from typing import Tuple, Type
if platform.python_implementation() == "PyPy":
import json
_json_encoder = json.JSONEncoder()
else:
import simplejson as json # type: ignore[no-redef] # noqa: F821
_json_encoder = json.JSONEncoder(namedtuple_as_object=False) # type: ignore[call-arg] # noqa: F821
_json_encoder = json.JSONEncoder()
logger = logging.getLogger(__name__)