potiuk commented on code in PR #31943:
URL: https://github.com/apache/airflow/pull/31943#discussion_r1232050189
##########
dev/breeze/src/airflow_breeze/commands/setup_commands.py:
##########
@@ -260,7 +260,11 @@ def dict_hash(dictionary: dict[str, Any]) -> str:
"""MD5 hash of a dictionary. Sorted and dumped via json to account for
random sequence)"""
# noinspection InsecureHash
dhash = hashlib.md5()
- encoded = json.dumps(dictionary, sort_keys=True, default=vars).encode()
+ try:
+ encoded = json.dumps(dictionary, sort_keys=True, default=vars).encode()
+ except TypeError:
+ get_console().print(dictionary)
Review Comment:
I think not needed, this is `rich` print which already has all kinds of
magic to nicely print whatever we pass to it, so wrapping it with repr will
loose the information that otherwise `rich` library could use to give us nicer
and more user friendly representation.
--
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]