ashb commented on code in PR #48007:
URL: https://github.com/apache/airflow/pull/48007#discussion_r2005830464
##########
airflow/utils/json.py:
##########
@@ -18,70 +18,9 @@
from __future__ import annotations
import json
-from datetime import date, datetime
-from decimal import Decimal
from typing import Any
-from flask.json.provider import JSONProvider
-
-from airflow.serialization.serde import CLASSNAME, DATA, SCHEMA_ID,
deserialize, serialize
-from airflow.utils.timezone import convert_to_utc, is_naive
-
-
-class AirflowJsonProvider(JSONProvider):
- """JSON Provider for Flask app to use WebEncoder."""
-
- ensure_ascii: bool = True
- sort_keys: bool = True
-
- def dumps(self, obj, **kwargs):
- kwargs.setdefault("ensure_ascii", self.ensure_ascii)
- kwargs.setdefault("sort_keys", self.sort_keys)
- return json.dumps(obj, **kwargs, cls=WebEncoder)
-
- def loads(self, s: str | bytes, **kwargs):
- return json.loads(s, **kwargs)
-
-
-class WebEncoder(json.JSONEncoder):
Review Comment:
The only usage of this left over was to make some logs more consuablable in
2 AWS operators -- so I've removed this and fixed those operators to just use
`repr` as the fallback JSON logging behaviour. It won't be the same but should
be "good enough"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]