Skip to content

Dedent help string in breeze configuration#43555

Merged
potiuk merged 1 commit intoapache:mainfrom
potiuk:dedent-help-strings-in-breeze
Oct 31, 2024
Merged

Dedent help string in breeze configuration#43555
potiuk merged 1 commit intoapache:mainfrom
potiuk:dedent-help-strings-in-breeze

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Oct 31, 2024

In Python 3.13 compiler, docstrings are automatically dedented. And while Python 3.13 is not yet officially supported by Airflow for some strange (and unknown) reasons, when you install breeze with uv tools that have Python 3.13 installed, it might get into a state that the docstrings are dedented in Breeze's bytecode and it causes hash calculation for configuration options that have docstring-generated help differs on different installations.

In order to make it consistent - we are now always dedenting the help strings before hash calculation.

See python/cpython#81283


^ 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.rst or {issue_number}.significant.rst, in newsfragments.

In Python 3.13 compiler, docstrings are automatically dedented. And
while Python 3.13 is not yet officially supported by Airflow for
some strange (and unknown) reasons, when you install breeze with
uv tools that have Python 3.13 installed, it might get into
a state that the docstrings are dedented in Breeze's bytecode and
it causes hash calculation for configuration options that have
docstring-generated help differs on different installations.

In order to make it consistent - we are now always dedenting the
help strings before hash calculation.

See python/cpython#81283
@potiuk
Copy link
Member Author

potiuk commented Oct 31, 2024

Let's see if dedetnting produces the same hashes on CI as well.

@potiuk
Copy link
Member Author

potiuk commented Oct 31, 2024

Ok. Look like it works nicely :). Weird, weird stuff.

@potiuk potiuk merged commit be4d894 into apache:main Oct 31, 2024
@potiuk potiuk deleted the dedent-help-strings-in-breeze branch October 31, 2024 18:17
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.

Fix looks good!

ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
In Python 3.13 compiler, docstrings are automatically dedented. And
while Python 3.13 is not yet officially supported by Airflow for
some strange (and unknown) reasons, when you install breeze with
uv tools that have Python 3.13 installed, it might get into
a state that the docstrings are dedented in Breeze's bytecode and
it causes hash calculation for configuration options that have
docstring-generated help differs on different installations.

In order to make it consistent - we are now always dedenting the
help strings before hash calculation.

See python/cpython#81283
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