eladkal commented on code in PR #32573:
URL: https://github.com/apache/airflow/pull/32573#discussion_r1262048932


##########
airflow/providers/amazon/aws/utils/__init__.py:
##########
@@ -21,13 +21,17 @@
 from datetime import datetime
 from enum import Enum
 
+from deprecated import deprecated
+
+from airflow.utils.helpers import prune_dict
 from airflow.version import version
 
 log = logging.getLogger(__name__)
 
 
+@deprecated(reason="use prune_dict() instead")
 def trim_none_values(obj: dict):
-    return {key: val for key, val in obj.items() if val is not None}
+    return prune_dict(obj)

Review Comment:
   In providers we raise `AirflowProviderDeprecationWarning`.
   
   this means our static checks are not good enough as they don't catch this 
case
   
https://github.com/apache/airflow/blob/d6a4f851e0a0c3d99b327b7fca23fa002a915df7/.pre-commit-config.yaml#L431



-- 
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]

Reply via email to