-
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
[AIRFLOW-4255] Make GCS Hook Backwards compatible #5089
Conversation
airflow/contrib/hooks/gcs_hook.py
Outdated
""" | ||
|
||
warnings.warn("'multipart' and 'num_retries' parameters have been deprecated." |
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.
I would suggest passing multipart=None
and then an if multipart is not None
-- otherwise there is no way for the user to "fix" this warning.
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.
Done. Updated
Codecov Report
@@ Coverage Diff @@
## master #5089 +/- ##
==========================================
+ Coverage 76.81% 76.97% +0.15%
==========================================
Files 463 463
Lines 29757 29810 +53
==========================================
+ Hits 22859 22946 +87
+ Misses 6898 6864 -34
Continue to review full report at Codecov.
|
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.
LGTM
@kaxil Do you feel like cherry-picking this onto |
Yeah - I hadn't been using/updating v1-10-test for the .3 release. I've been using my own fork and making have use of |
@@ -265,6 +275,10 @@ def delete(self, bucket, object): | |||
:param object: name of the object to delete | |||
:type object: str | |||
""" | |||
|
|||
if generation is not None: | |||
warnings.warn("'generation' parameter is no longer supported", DeprecationWarning) |
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.
We should add a stacklevel=2
to all these warn calls - that way the warning will be reported with the filename/line number of the caller, rather than gcs_hook;py:280: generation' parameter is no longer supported
* [AIRFLOW-4255] Make GCS Hook Backwards compatible * Update UPDATING.md * Add option to stop warnings * Update test_gcs_hook.py * Add tests
* [AIRFLOW-4255] Make GCS Hook Backwards compatible * Update UPDATING.md * Add option to stop warnings * Update test_gcs_hook.py * Add tests
* [AIRFLOW-4255] Make GCS Hook Backwards compatible * Update UPDATING.md * Add option to stop warnings * Update test_gcs_hook.py * Add tests
* [AIRFLOW-4255] Make GCS Hook Backwards compatible * Update UPDATING.md * Add option to stop warnings * Update test_gcs_hook.py * Add tests
* [AIRFLOW-4255] Make GCS Hook Backwards compatible * Update UPDATING.md * Add option to stop warnings * Update test_gcs_hook.py * Add tests
* [AIRFLOW-4255] Make GCS Hook Backwards compatible * Update UPDATING.md * Add option to stop warnings * Update test_gcs_hook.py * Add tests
Make sure you have checked all steps below.
Jira
Description
Tests
Commits
Documentation
Code Quality
flake8