Skip to content
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

Work around pyupgrade edge cases #26384

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

uranusjr
Copy link
Member

Follow-up to #26290

@boring-cyborg boring-cyborg bot added area:dev-tools area:providers provider:google Google (including GCP) related issues labels Sep 14, 2022
@uranusjr uranusjr force-pushed the workaround-cattrs-lazy-annotation branch from 9ac0d40 to 16c14f4 Compare September 14, 2022 07:34
@potiuk
Copy link
Member

potiuk commented Sep 14, 2022

Ah nice! Would be great if it works :)

@uranusjr uranusjr force-pushed the workaround-cattrs-lazy-annotation branch from 16c14f4 to 05032fe Compare September 14, 2022 08:59
@uranusjr uranusjr force-pushed the workaround-cattrs-lazy-annotation branch from 05032fe to aa58215 Compare September 14, 2022 10:20
@uranusjr uranusjr marked this pull request as ready for review September 14, 2022 10:56
@uranusjr
Copy link
Member Author

Seems to work

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Fantastic ! Thanks @uranusjr !

@potiuk potiuk merged commit 9444d97 into apache:main Sep 14, 2022
@potiuk potiuk added this to the Airflow 2.4.0 milestone Sep 14, 2022
@potiuk
Copy link
Member

potiuk commented Sep 14, 2022

Merged and cherry-picked to v2-4 branch :)

# annotation expressions at runtime, and Python before 3.9.0 does not lazily
# evaluate those. Putting the expression in a top-level assignment statement
# communicates this runtime requirement to pyupgrade.
BaseOperatorClassList = List[Type[BaseOperator]]
Copy link
Member

Choose a reason for hiding this comment

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

We're working on how we can remove cattrs #26130 so hopefully we can remove this soon.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed. That is even cooler :)

@uranusjr uranusjr deleted the workaround-cattrs-lazy-annotation branch September 14, 2022 13:46
ephraimbuddy pushed a commit that referenced this pull request Sep 14, 2022
@ephraimbuddy ephraimbuddy added the type:misc/internal Changelog: Misc changes that should appear in change log label Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools area:providers provider:google Google (including GCP) related issues type:misc/internal Changelog: Misc changes that should appear in change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants