Skip to content

Conversation

@Taragolis
Copy link
Contributor

Use from airflow.exceptions import AirflowException instead of from airflow import AirflowException in core

It was a reason for Circular imports in the past

In additional we have quite a few Exceptions, and only AirflowException could be accessed from airflow.__init__

As follow up I have a plan to ban usage from airflow import AirflowException by add TID251 rule for it


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@Taragolis Taragolis changed the title Use airflow.exceptions.AirflowException in core Use airflow.exceptions.AirflowException in core Sep 20, 2023
@Taragolis Taragolis merged commit fc0dd62 into apache:main Sep 21, 2023
@Taragolis Taragolis deleted the core-airflow-exception branch September 21, 2023 09:00
@ephraimbuddy ephraimbuddy added this to the Airflow 2.7.2 milestone Oct 3, 2023
@ephraimbuddy ephraimbuddy added the type:misc/internal Changelog: Misc changes that should appear in change log label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:misc/internal Changelog: Misc changes that should appear in change log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants