potiuk commented on code in PR #28846:
URL: https://github.com/apache/airflow/pull/28846#discussion_r1066645340


##########
airflow/models/serialized_dag.py:
##########
@@ -102,7 +102,7 @@ def __init__(self, dag: DAG, processor_subdir: str | None = 
None):
         dag_data = SerializedDAG.to_dict(dag)
         dag_data_json = json.dumps(dag_data, sort_keys=True).encode("utf-8")
 
-        self.dag_hash = hashlib.md5(dag_data_json).hexdigest()
+        self.dag_hash = hashlib.new("md5", data=dag_data_json, 
usedforsecurity=False).hexdigest()

Review Comment:
   Also we cannot use it unconditionally. usedforsecurity is available as of 
airflow 3.9 and we are supporting 3.7+.
   So if we want to add it, we need to add a compat library that will use it 
properly depending on Python version.



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to