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


##########
airflow/operators/trigger_dagrun.py:
##########
@@ -108,42 +111,66 @@ def __init__(
         self.allowed_states = allowed_states or [State.SUCCESS]
         self.failed_states = failed_states or [State.FAILED]
 
-        if execution_date is not None and not isinstance(execution_date, (str, 
datetime.datetime)):
-            raise TypeError(
-                f"Expected str or datetime.datetime type for 
execution_date.Got {type(execution_date)}"
-            )
-
-        self.execution_date = execution_date
+        if logical_date is None:
+            if execution_date is not None:
+                warnings.warn(
+                    "Parameter 'execution_date' is deprecated. Use 
'logical_date' instead.",
+                    RemovedInAirflow3Warning,
+                    stacklevel=2,
+                )
+            logical_date = execution_date
+        elif not isinstance(logical_date, (str, datetime.datetime)):

Review Comment:
   This should be `if` so `execution_date` is also covered by this check.



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