Revert "Initial orjson support (#72754)" (#72789)

This was causing the wheels to fail to build. We need
to workout why when we don't have release pressure

This reverts commit d9d22a9556.
This commit is contained in:
J. Nick Koston 2022-05-31 10:51:55 -10:00 committed by GitHub
parent 9cea936c22
commit c365454afb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 67 additions and 127 deletions

View file

@ -9,7 +9,6 @@ import voluptuous as vol
from homeassistant.core import Event, State
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.json import JSON_DUMP
from homeassistant.util.json import (
find_paths_unserializable_data,
format_unserializable_data,
@ -194,15 +193,15 @@ def compressed_state_dict_add(state: State) -> dict[str, Any]:
def message_to_json(message: dict[str, Any]) -> str:
"""Serialize a websocket message to json."""
try:
return JSON_DUMP(message)
return const.JSON_DUMP(message)
except (ValueError, TypeError):
_LOGGER.error(
"Unable to serialize to JSON. Bad data found at %s",
format_unserializable_data(
find_paths_unserializable_data(message, dump=JSON_DUMP)
find_paths_unserializable_data(message, dump=const.JSON_DUMP)
),
)
return JSON_DUMP(
return const.JSON_DUMP(
error_message(
message["id"], const.ERR_UNKNOWN_ERROR, "Invalid JSON in response"
)