This is an automated email from the ASF dual-hosted git repository.

shahar1 pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-4-test by this push:
     new d63fa3aaa1c [v3-4-test] Import TriggerRule from airflow.sdk in docs 
examples (#76522) (#76526)
d63fa3aaa1c is described below

commit d63fa3aaa1cea4dbf0e4409aae0442c448fa68f3
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Nov 6 07:21:00 2026 +0000

    [v3-4-test] Import TriggerRule from airflow.sdk in docs examples (#76522) 
(#76526)
    
    The FAQ and best-practices examples imported TriggerRule from
    airflow.utils.trigger_rule. Dag authors should use the public Task SDK
    import, airflow.sdk.
    (cherry picked from commit 57793d01d9b43d6642476100b293f801b7c07d00)
    
    Co-authored-by: Jed Cunningham 
<[email protected]>
---
 airflow-core/docs/best-practices.rst | 4 +---
 airflow-core/docs/faq.rst            | 3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/airflow-core/docs/best-practices.rst 
b/airflow-core/docs/best-practices.rst
index c30c13eb5eb..0c5cb004c01 100644
--- a/airflow-core/docs/best-practices.rst
+++ b/airflow-core/docs/best-practices.rst
@@ -591,11 +591,9 @@ It's easier to grab the concept with an example. Let's say 
that we have the foll
 
     from datetime import datetime
 
-    from airflow.sdk import DAG
-    from airflow.sdk import task
     from airflow.exceptions import AirflowException
     from airflow.providers.standard.operators.bash import BashOperator
-    from airflow.utils.trigger_rule import TriggerRule
+    from airflow.sdk import DAG, TriggerRule, task
 
 
     @task(trigger_rule=TriggerRule.ONE_FAILED, retries=0)
diff --git a/airflow-core/docs/faq.rst b/airflow-core/docs/faq.rst
index 8cdfe95475a..c65c600caf6 100644
--- a/airflow-core/docs/faq.rst
+++ b/airflow-core/docs/faq.rst
@@ -643,9 +643,8 @@ upstream task.
 
     import pendulum
 
-    from airflow.sdk import dag, task
     from airflow.exceptions import AirflowException
-    from airflow.utils.trigger_rule import TriggerRule
+    from airflow.sdk import TriggerRule, dag, task
 
 
     @task()

Reply via email to