kalluripradeep opened a new pull request, #63053:
URL: https://github.com/apache/airflow/pull/63053

   When using string annotations with types imported under TYPE_CHECKING, the 
multiple_outputs inference raises a UserWarning:
   
   Cannot infer multiple_outputs for TaskFlow function 'dataframe_task' with 
forward type references that are not imported. (Error was name 'DataFrame' is 
not defined)
   
   
   This is a false alarm. Using `TYPE_CHECKING`-only imports with string 
annotations is a standard Python pattern to avoid circular imports or expensive 
runtime imports. The NameError is expected — the type is intentionally not 
available at runtime.
   
   Previously this worked silently in Airflow 2.x. The warning was introduced 
in 3.x and is causing unnecessary noise for valid user code.
   
   Fix: catch NameError silently and return False (same as TypeError), remove 
the warning entirely, and drop the now-unused `warnings` import.
   
   Fixes #62945


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