-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Move some items in airflow.utils.context to appropriate places
#53600
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
Conversation
util.context to appropriate placesairflow.utils.context to appropriate places
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.
Looking good generally, having context from "airflow.sdk" in s10 and models doesn't look too right to me. But I do not have a counter proposal as of yet.
providers/standard/src/airflow/providers/standard/operators/python.py
Outdated
Show resolved
Hide resolved
f930d81 to
c7b6208
Compare
|
Note that the context_merge function and context_copy_partial are no longer imported from airflow.utils.context to core but still exist in the module. When we move other items in the module, we can then remove them and add a backcompat for their import by users |
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.
Looking better, last set of comments.
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/decorators/kubernetes_cmd.py
Outdated
Show resolved
Hide resolved
providers/standard/src/airflow/providers/standard/operators/python.py
Outdated
Show resolved
Hide resolved
providers/standard/src/airflow/providers/standard/operators/python.py
Outdated
Show resolved
Hide resolved
23e7948 to
b555440
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.
One comment, and one suggestion.
Looks good otherwise.
providers/standard/src/airflow/providers/standard/operators/python.py
Outdated
Show resolved
Hide resolved
context_manager was only used once in airflow-core, so I redefined it where it was used. Likewise context_copy_partial. Then Context was added to the depreccation for easy import
b555440 to
9450aac
Compare
9450aac to
65faa2a
Compare
…che#53600) * Move some items in `util.context` to appropriate places context_manager was only used once in airflow-core, so I redefined it where it was used. Likewise context_copy_partial. Then Context was added to the depreccation for easy import * Only remove core dependency in sdk * fixup! Only remove core dependency in sdk * Use class obj instead of self * fixup! Use class obj instead of self * fixup! fixup! Use class obj instead of self * fixup! fixup! fixup! Use class obj instead of self * fixup! fixup! fixup! fixup! Use class obj instead of self * fixup! fixup! fixup! fixup! fixup! Use class obj instead of self
context_manager was only used once in airflow-core, so I redefined it where it was used. Likewise context_copy_partial. Then Context was added to the depreccation for easy import
closes: #53601