-
Notifications
You must be signed in to change notification settings - Fork 15.9k
Deprecate old AF2 modules: param, baseoperatorlink, secrets cache #50482
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 old AF2 modules: param, baseoperatorlink, secrets cache #50482
Conversation
8cebc55 to
b638de5
Compare
amoghrajesh
left a comment
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 have a utility: add_deprecated_classes which can do it for us. Let's use that instead. Refer: https://github.com/apache/airflow/pull/50435/files for example
7a84637 to
f468de2
Compare
amoghrajesh
left a comment
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.
Last set of nits. LGTM
cc08622 to
68d47ba
Compare
shahar1
left a comment
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.
Tests fail :(
|
I propose to backport to 3.0-line! |
|
This is pretty unintended usage of those utils. The way how it works is that you should add those dicts and call those methods in in https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/utils/deprecation_tools.py#L83 See for example the usage https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/decorators/__init__.py - that leaves behind only folder with |
|
#50510 with better description of how it should be used. |
3fc51d1 to
36a1636
Compare
potiuk
left a comment
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.
That's it ! way less visible, and even autocomplete won't work in IDEs :)
Thanks @potiuk I did not realise the way of usage of |
36a1636 to
5977e93
Compare
Yeah it was a bit "use by following other usages" rather than "by docs" -> I hope the update to docstring I added will make it clearer what is the intended usage :) |
609381a to
ace83ec
Compare
Ah! My bad for the review. I encountered the same issue but didn't look carefully enough. |
amoghrajesh
left a comment
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.
Alright, looks great now!
549ae31 to
6f9f86f
Compare
6f9f86f to
7cdc8ea
Compare
Backport failed to create: v3-0-test. View the failure log Run details
You can attempt to backport this manually by running: cherry_picker d6e8418 v3-0-testThis should apply the commit to the v3-0-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continue |
…ache#50482) (cherry picked from commit d6e8418)
|
Manual cherry pick: #50588 |
|
This can be 3.1, not an imp bug fix. |
This PR shows warnings at the top of each of the three re-export modules:
* airflow.models.param
* airflow.models.baseoperatorlink
* airflow.secrets.cache
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.