Skip to content

Conversation

@ephraimbuddy
Copy link
Contributor

@ephraimbuddy ephraimbuddy commented Jul 21, 2025

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

@ephraimbuddy ephraimbuddy changed the title Move some items in util.context to appropriate places Move some items in airflow.utils.context to appropriate places Jul 21, 2025
Copy link
Contributor

@amoghrajesh amoghrajesh left a 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.

@ephraimbuddy ephraimbuddy force-pushed the move-context-merge branch 3 times, most recently from f930d81 to c7b6208 Compare July 29, 2025 15:13
@ephraimbuddy
Copy link
Contributor Author

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

Copy link
Contributor

@amoghrajesh amoghrajesh left a 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.

@ephraimbuddy ephraimbuddy force-pushed the move-context-merge branch 2 times, most recently from 23e7948 to b555440 Compare August 1, 2025 08:35
Copy link
Contributor

@amoghrajesh amoghrajesh left a 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.

@ephraimbuddy ephraimbuddy merged commit fe791bd into apache:main Aug 11, 2025
105 checks passed
@ephraimbuddy ephraimbuddy deleted the move-context-merge branch August 11, 2025 17:11
RoyLee1224 pushed a commit to RoyLee1224/airflow that referenced this pull request Aug 15, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move some items in airflow.utils.context to appropriate places

3 participants