uranusjr commented on code in PR #68506:
URL: https://github.com/apache/airflow/pull/68506#discussion_r3424945639


##########
task-sdk/src/airflow/sdk/log.py:
##########
@@ -264,6 +264,28 @@ def mask_secret(secret: JsonValue, name: str | None = 
None) -> None:
             comms.send(MaskSecret(value=secret, name=name))
 
 
+async def amask_secret(secret: JsonValue, name: str | None = None) -> None:
+    """
+    Async version of mask_secret for use in async contexts.
+
+    Uses asend() instead of send() to avoid deadlock when called from within
+    an async task that already has an asend() in flight.
+    """
+    from contextlib import suppress
+
+    from airflow.sdk._shared.secrets_masker import _secrets_masker
+

Review Comment:
   As a general question, why are there so many local imports everywhere? 
Please don’t do this unless you have a concret reason. Not just in this PR but 
for Python in general.



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