You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jedcunningham (via GitHub)" <gi...@apache.org> on 2025/09/25 21:01:12 UTC

[PR] Fix DagBag imports in 3.2+ [airflow]

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

   It was moved, but it missed the 3.1 release so the conditionals were all incorrect.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix DagBag imports in 3.2+ [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #56109:
URL: https://github.com/apache/airflow/pull/56109#discussion_r2380338798


##########
devel-common/src/tests_common/pytest_plugin.py:
##########
@@ -1622,16 +1622,14 @@ def session():
 def get_test_dag():
     def _get(dag_id: str):
         from airflow import settings
+        from airflow.models.serialized_dag import SerializedDagModel
 
-        from tests_common.test_utils.version_compat import AIRFLOW_V_3_1_PLUS
+        from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS, AIRFLOW_V_3_2_PLUS
 
-        if AIRFLOW_V_3_1_PLUS:
+        if AIRFLOW_V_3_2_PLUS:
             from airflow.dag_processing.dagbag import DagBag

Review Comment:
   Lets not use version conditionals? try/except ImportError seems safer.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix DagBag imports in 3.2+ [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil merged PR #56109:
URL: https://github.com/apache/airflow/pull/56109


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix DagBag imports in 3.2+ [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on PR #56109:
URL: https://github.com/apache/airflow/pull/56109#issuecomment-3336175048

   Merging to unblock 3.1 compat test


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix DagBag imports in 3.2+ [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #56109:
URL: https://github.com/apache/airflow/pull/56109#discussion_r2380338798


##########
devel-common/src/tests_common/pytest_plugin.py:
##########
@@ -1622,16 +1622,14 @@ def session():
 def get_test_dag():
     def _get(dag_id: str):
         from airflow import settings
+        from airflow.models.serialized_dag import SerializedDagModel
 
-        from tests_common.test_utils.version_compat import AIRFLOW_V_3_1_PLUS
+        from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS, AIRFLOW_V_3_2_PLUS
 
-        if AIRFLOW_V_3_1_PLUS:
+        if AIRFLOW_V_3_2_PLUS:
             from airflow.dag_processing.dagbag import DagBag

Review Comment:
   Lets not use conditionals? try/except ImportError seems safer.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org