-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate *args and **kwargs in BaseOperator #1285
Conversation
|
Coverage increased (+0.03%) to 67.235% when pulling 8d21aa62a84297c33d8dca06db42b96cddd1f95e on jlowin:remove_blanket_kwargs into 31168bc on airbnb:master. |
Can you add a description on what people need to do with their DAGs in UPDATING.md? |
Didn't know we had that file, that's great! Yes, I'll update it. |
8d21aa6
to
038660b
Compare
|
Coverage increased (+0.2%) to 67.235% when pulling 038660b6ef28e5393813f2d71c243a1d518a37a7 on jlowin:remove_blanket_kwargs into 0bae60f on airbnb:master. |
BaseOperator silently accepts any arguments. This deprecates the behavior with a warning that says it will be forbidden in Airflow 2.0. This PR also turns on DeprecationWarnings by default, which in turn revealed that inspect.getargspec is deprecated. Here it is replaced by `inspect.signature` (Python 3) or `funcsigs.signature` (Python 2). Lastly, this brought to attention that example_http_operator was passing an illegal argument. Add unit test
038660b
to
5d959f6
Compare
|
@@ -122,6 +122,7 @@ def run(self): | |||
'flask-cache>=0.13.1, <0.14', | |||
'flask-login==0.2.11', | |||
'future>=0.15.0, <0.16', | |||
'funcsigs>=0.4, <1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This missed a "," @jlowin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setup.py
is my kryptonite... Fixed in 6581858
BaseOperator silently accepts any arguments. This deprecates the
behavior with a warning that says it will be forbidden in Airflow 2.0.
This PR also turns on DeprecationWarnings by default, which in turn
revealed that inspect.getargspec is deprecated. Here it is replaced by
inspect.signature
(Python 3) orfuncsigs.signature
(Python 2).Lastly, this brought to attention that example_http_operator was
passing an illegal argument.