You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/09/11 16:27:00 UTC

[jira] [Commented] (AIRFLOW-3717) Refactor sample DAGs to use context manager

    [ https://issues.apache.org/jira/browse/AIRFLOW-3717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16927747#comment-16927747 ] 

ASF GitHub Bot commented on AIRFLOW-3717:
-----------------------------------------

stale[bot] commented on pull request #4603: [AIRFLOW-3717] Use DAG context managers in documentation examples
URL: https://github.com/apache/airflow/pull/4603
 
 
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


> Refactor sample DAGs to use context manager
> -------------------------------------------
>
>                 Key: AIRFLOW-3717
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3717
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: Steve Greenberg
>            Priority: Minor
>
> Tutorial code says: 
>  
> ```
> import airflow
> from airflow import DAG
>  
> dag = DAG(
> ...
> ```
>  
> The context manager saves users the need to pass the dag parameter to each operator. 
>  
> So we should encourage: 
>  
> ```
> from airflow import models
>  
> with models.DAG(
> ...
> ```
> instead.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)