potiuk commented on a change in pull request #7596: [AIRFLOW-6870] [WIP] remove 
imports from models/__init__.py
URL: https://github.com/apache/airflow/pull/7596#discussion_r386121187
 
 

 ##########
 File path: airflow/models/__init__.py
 ##########
 @@ -16,25 +16,36 @@
 # specific language governing permissions and limitations
 # under the License.
 """Airflow models"""
-from airflow.models.base import ID_LEN, Base
-from airflow.models.baseoperator import BaseOperator, BaseOperatorLink
-from airflow.models.connection import Connection
-from airflow.models.dag import DAG, DagModel, DagTag
 
 Review comment:
   > I think we have to preserve the possibility of `from airflow.models import 
DAG`. The concern is that many users can use this import in their DAGs...
   Yep. I think it's already implemented in the follow-up commit.
   
   > And if we want users to migrate to `from airflow.models.dag import DAG`, 
should we add pre-commit check that we are not using an import from 
`airflow.models`?
   Yes. We should @msb217  -> I can add such check quickly with AST parsing 
after all the comments are addressed. Can be a separate PR @nuclearpinguin ? 
This one is already huge!
   
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to