-
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
Remove all deprecation warnings in providers #17900
Conversation
a6f7f87
to
6e9435b
Compare
6e9435b
to
5a9d79b
Compare
5a9d79b
to
bd34146
Compare
I'd love to merge that one before releasing the new wave of providers #17890, this way all examples and code will be "warning-free". We had many deprecation warnings generated either in examples or when simply importing the providers. This will prevent it from happening also in the future as is checked in the CI. |
I don’t understand the Big Query stuff; everything else LGTM. |
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.
Looks ok. also the BigQuery :)
It's just changing deprecated operators to the updated ones and align the parameters with updated version.
There are failure though in some tests so it needs to be fixed
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease. |
bd34146
to
e830171
Compare
e830171
to
e4561b8
Compare
There were a number of deprecation warnings when just importing certain providers or their examples. Some of them came from still using 1.10 classes, some from using still `apply_defaults` and some from badly implemented fallback mechanism to support backwards compatibility. This has all been fixed and our documentation generation step for providers in CI will also fail in case there are some new DeprecationWarnings generated, which means that they will have to be fixed before merging. While checking that we found that BigQuery table_resource new approach had some inconsistencies when passing new `table_resource` parameters. Some deprecated parameters should be None by default, otherwise you'd have to explicitly set them to None when `table_resource` is set but when it is not set, the backwards compatible behaviour is maintained - the parameters get the same. default values set. Several deprecation warnings had wrong stack-level - this has been fixed as well. The "legitimate" warnings are now filtered out and they are only filtered out for the appropriate modules we know they are generated from or in case the warnings result from direct import of the deprecated module.
e4561b8
to
27b1991
Compare
There were a number of deprecation warnings when just importing
certain providers or their examples. Some of them came from still
using 1.10 classes, some from using still
apply_defaults
andsome from badly implemented fallback mechanism to support
backwards compatibility.
This has all been fixed and our documentation generation step
for providers in CI will also fail in case there are some new
DeprecationWarnings generated, which means that they will have
to be fixed before merging.
While checking that we found that BigQuery table_resource new
approach had some inconsistencies when passing new
table_resource
parameters. Some deprecated parameters should be None by default,
otherwise you'd have to explicitly set them to None when
table_resource
is set but when it is not set, the backwardscompatible behaviour is maintained - the parameters get the same.
default values set.
Several deprecation warnings had wrong stack-level - this has been
fixed as well.
The "legitimate" warnings are now filtered out and they are only
filtered out for the appropriate modules we know they are generated
from or in case the warnings result from direct import of the
deprecated module.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.