You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Laura Lorenz <ll...@industrydive.com> on 2017/01/19 15:22:24 UTC

How to learn more about deprecation warnings?

Hi! Is there a way to determine the rationale behind deprecation warnings?
In particular I'm interested in the following:

/Users/llorenz/Envs/fileflow/lib/python2.7/site-packages/airflow/models.py:1719:
> PendingDeprecationWarning: Invalid arguments were passed to
> DivePythonOperator. Support for passing such arguments will be dropped in
> Airflow 2.0. Invalid arguments were:
>
> *args: ()
>
> **kwargs: {'data_dependencies': {'something': 'write_a_file'}}
>
>   category=PendingDeprecationWarning
>

Our home grown plugin fileflow depends on this capability so I'd like to
get more information about how it will be changing to see if I can
anticipate a workaround to support airflow 2.0.

Thanks!

Laura

Re: How to learn more about deprecation warnings?

Posted by Laura Lorenz <ll...@industrydive.com>.
Awesome, thanks Jeremiah!

On Fri, Jan 20, 2017 at 8:20 AM, Jeremiah Lowin <jl...@apache.org> wrote:

> Hi Laura,
>
> The error is raised if an unused argument is passed to BaseOperator --
> basically if there is anything in either args or kwargs. The original issue
> was that in a number of cases arguments were misspelled or misused by
> Operator subclasses and instead of raising an error, they were just passed
> up the inheritance chain and finally (silently) absorbed by BaseOperator,
> so there was no warning.
>
> I think a workaround should be straightforward -- when you call
> super().__init__ for the BaseOperator, just pass arguments explicitly
> rather than with args/kwargs, or (alternatively), pop arguments out of
> kwargs when you use them ahead of calling that __init__.
>
> On Thu, Jan 19, 2017 at 10:23 AM Laura Lorenz <ll...@industrydive.com>
> wrote:
>
> > Hi! Is there a way to determine the rationale behind deprecation
> warnings?
> > In particular I'm interested in the following:
> >
> >
> > /Users/llorenz/Envs/fileflow/lib/python2.7/site-packages/
> airflow/models.py:1719:
> > > PendingDeprecationWarning: Invalid arguments were passed to
> > > DivePythonOperator. Support for passing such arguments will be dropped
> in
> > > Airflow 2.0. Invalid arguments were:
> > >
> > > *args: ()
> > >
> > > **kwargs: {'data_dependencies': {'something': 'write_a_file'}}
> > >
> > >   category=PendingDeprecationWarning
> > >
> >
> > Our home grown plugin fileflow depends on this capability so I'd like to
> > get more information about how it will be changing to see if I can
> > anticipate a workaround to support airflow 2.0.
> >
> > Thanks!
> >
> > Laura
> >
>

Re: How to learn more about deprecation warnings?

Posted by Jeremiah Lowin <jl...@apache.org>.
Hi Laura,

The error is raised if an unused argument is passed to BaseOperator --
basically if there is anything in either args or kwargs. The original issue
was that in a number of cases arguments were misspelled or misused by
Operator subclasses and instead of raising an error, they were just passed
up the inheritance chain and finally (silently) absorbed by BaseOperator,
so there was no warning.

I think a workaround should be straightforward -- when you call
super().__init__ for the BaseOperator, just pass arguments explicitly
rather than with args/kwargs, or (alternatively), pop arguments out of
kwargs when you use them ahead of calling that __init__.

On Thu, Jan 19, 2017 at 10:23 AM Laura Lorenz <ll...@industrydive.com>
wrote:

> Hi! Is there a way to determine the rationale behind deprecation warnings?
> In particular I'm interested in the following:
>
>
> /Users/llorenz/Envs/fileflow/lib/python2.7/site-packages/airflow/models.py:1719:
> > PendingDeprecationWarning: Invalid arguments were passed to
> > DivePythonOperator. Support for passing such arguments will be dropped in
> > Airflow 2.0. Invalid arguments were:
> >
> > *args: ()
> >
> > **kwargs: {'data_dependencies': {'something': 'write_a_file'}}
> >
> >   category=PendingDeprecationWarning
> >
>
> Our home grown plugin fileflow depends on this capability so I'd like to
> get more information about how it will be changing to see if I can
> anticipate a workaround to support airflow 2.0.
>
> Thanks!
>
> Laura
>