vandonr-amz commented on code in PR #32573:
URL: https://github.com/apache/airflow/pull/32573#discussion_r1262801825


##########
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:
   hmm ok I didn't know that. I have actually used this annotation before. 
Maybe we could have our own annotation to make it easier to write deprecation 
warnings.



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