kalluripradeep commented on PR #63053:
URL: https://github.com/apache/airflow/pull/63053#issuecomment-4018904903

   > Looks fine. The effect of this change is limited to warning emission, and 
`_infer_multiple_outputs` is only a best-effort heuristic.
   > 
   > You could argue that the warning might still be useful when a runtime 
import is genuinely missing, even if it can pollute logs. But I’m leaning 
towards suppressing it here since it does not indicate a critical 
misconfiguration.
   > 
   > Did you manage to reproduce the issue in #62945?
   
   @SameerMesiah97 — yes, reproduced locally using the exact snippet from 
#62945:
   ```python
   from typing import TYPE_CHECKING
   from airflow.sdk import dag, task
   
   if TYPE_CHECKING:
       from pandas import DataFrame
   
   @task(task_id="df_task")
   def dataframe_task() -> "DataFrame":
       import pandas as pd
       return pd.DataFrame({"a": [1, 2, 3]})
   ```
   
   Running this triggers the `UserWarning` before the fix and is silent after. 
The `TypeError` path (genuinely unresolvable type) already suppresses silently, 
so this makes `NameError` consistent with that behaviour.


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