refactor: Remove dict_with_str_keys().

This function is no longer needed in python3, as it was decoding
keys that already came for a JSON-decoded string.
This commit is contained in:
Steve Howell
2017-11-04 11:22:54 -07:00
committed by Tim Abbott
parent b0bb09cdb8
commit 8eaeba8615
2 changed files with 1 additions and 7 deletions

View File

@@ -15,7 +15,6 @@ from zerver.lib.cache import (
to_dict_cache_key_id,
)
from zerver.lib.request import JsonableError
from zerver.lib.str_utils import dict_with_str_keys
from zerver.lib.stream_subscription import (
get_stream_subscriptions_for_user,
)
@@ -111,7 +110,7 @@ def sew_messages_and_reactions(messages, reactions):
def extract_message_dict(message_bytes):
# type: (bytes) -> Dict[str, Any]
return dict_with_str_keys(ujson.loads(zlib.decompress(message_bytes).decode("utf-8")))
return ujson.loads(zlib.decompress(message_bytes).decode("utf-8"))
def stringify_message_dict(message_dict):
# type: (Dict[str, Any]) -> bytes