-
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
Make decorators pluggable #17270
Make decorators pluggable #17270
Conversation
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.
General comments: I rather than airflow.decorator_implementations.python
etc I would just leave them as airflow.decorators.python
-- I don't think we really need to separate the folders
Have you played with creating a type-stub file for the attrs on the @task
decorator? Does it work for IDE completion?
@ashb unfortunately the problem with leaving them where they are is that because we are loading this stuff in the |
Given python operator is built in, for the sake of efficiencey of parsing it might be worth not having an entrypoint for |
Probably worth linking to https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html |
30a6c95
to
d0fdb93
Compare
This PR will allow users to add custom "@task.____" decorators by adding to their setup.cfg files. This will make decorators seem native to airflow while living in provider packages.
d0fdb93
to
3121eef
Compare
@potiuk PTAL I think this addresses what you wanted? |
@potiuk just realized I need to fix the documentation too. Doing that now. |
@potiuk Ok now it's updated PTAL thank you :) |
Co-authored-by: Jed Cunningham <[email protected]>
This PR will allow users to add custom "@task.____" decorators by adding
to their setup.cfg files. This will make decorators seem native to
airflow while living in provider packages.
^ 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.