Skip to content

Bugfix/remove global from breeze#58866

Merged
potiuk merged 3 commits intoapache:mainfrom
jscheffl:bugfix/remove-global-from-breeze
Nov 30, 2025
Merged

Bugfix/remove global from breeze#58866
potiuk merged 3 commits intoapache:mainfrom
jscheffl:bugfix/remove-global-from-breeze

Conversation

@jscheffl
Copy link
Copy Markdown
Contributor

Another small increment to remove global statements for PR #58116

This removes all leftover global statements in breeze. In most cases global was mis-used for some minor flags.

global is evil. Also in breeze :-D

Copy link
Copy Markdown
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.

@jscheffl I think this one can be done much cleaner using function attributes: https://www.pythonmorsels.com/storing-attributes-on-functions-in-python/

@jscheffl jscheffl force-pushed the bugfix/remove-global-from-breeze branch from d80adca to 46ff0be Compare November 30, 2025 14:01
@jscheffl
Copy link
Copy Markdown
Contributor Author

@jscheffl I think this one can be done much cleaner using function attributes: https://www.pythonmorsels.com/storing-attributes-on-functions-in-python/

Okay, good idea. At least for "ci_group" made this as feedback. For the others I think it is not making it better.

Unfortunately the ci_group is wrapped by @contextmanager and my pylint did not accepted setting attributes so made it via setattr+getattr.

WDYT?

@jscheffl jscheffl requested a review from amoghrajesh November 30, 2025 14:01
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Nov 30, 2025

Looks great! we can improve it in the future if we find a better way.

@potiuk potiuk merged commit fc70635 into apache:main Nov 30, 2025
224 of 225 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 30, 2025
* Remove global from breeze modules

* Remove global from breeze modules

* Review feedback, use function attributes
(cherry picked from commit fc70635)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

potiuk pushed a commit that referenced this pull request Nov 30, 2025
* Remove global from breeze modules

* Remove global from breeze modules

* Review feedback, use function attributes
(cherry picked from commit fc70635)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
Comment on lines -54 to +51
global _in_ci_group
if _in_ci_group or skip_group_output():
if getattr(ci_group, "__in_ci_group__", False) or skip_group_output():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect @jscheffl! This is what I was suggesting

ephraimbuddy pushed a commit that referenced this pull request Dec 3, 2025
* Remove global from breeze modules

* Remove global from breeze modules

* Review feedback, use function attributes
(cherry picked from commit fc70635)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
RoyLee1224 pushed a commit to RoyLee1224/airflow that referenced this pull request Dec 3, 2025
* Remove global from breeze modules

* Remove global from breeze modules

* Review feedback, use function attributes
Copilot AI pushed a commit to jason810496/airflow that referenced this pull request Dec 5, 2025
* Remove global from breeze modules

* Remove global from breeze modules

* Review feedback, use function attributes
itayweb pushed a commit to itayweb/airflow that referenced this pull request Dec 6, 2025
* Remove global from breeze modules

* Remove global from breeze modules

* Review feedback, use function attributes
Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Mar 4, 2026
* Remove global from breeze modules

* Remove global from breeze modules

* Review feedback, use function attributes
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.

3 participants