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

Only install eval-type-backport for Python < 3.10 #44294

Merged

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Nov 22, 2024

The eval-type-backport is a tool to replace some of the controversial new type hints added with from future imoport __annotations__ to "classic" type hint (| and list - into Union and List).

This helps to battle some of the issues where Pydantic has troubles when they are used for classes that Pydantic uses.

The library was initially added in #42196 but it was added for all Python versions - this change limits it only to Python < 3.10


^ 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.

The `eval-type-backport` is a tool to replace some of the controversial
new type hints added with `from future imoport __annotations__`
to "classic" type hint (| and list - into `Union` and `List`).

This helps to battle some of the issues where Pydantic has troubles
when they are used for classes that Pydantic uses.

The library was initially added in apache#42196 but it was added for all
Python versions - this change limits it only to Python < 3.10
@potiuk
Copy link
Member Author

potiuk commented Nov 22, 2024

Also see #44249 (comment) for context.

@potiuk potiuk added this to the Airflow 2.10.4 milestone Nov 22, 2024
@potiuk potiuk added the backport-to-v2-10-test Mark PR with this label to backport to v2-10-test branch label Nov 22, 2024
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Nice thanks.

@potiuk
Copy link
Member Author

potiuk commented Nov 23, 2024

Issues unrelated. Merging.

@potiuk potiuk closed this Nov 23, 2024
@potiuk potiuk reopened this Nov 23, 2024
@potiuk potiuk merged commit 2948338 into apache:main Nov 23, 2024
139 of 153 checks passed
@potiuk potiuk deleted the only-install-eval-type-backport-for-3.8-3.9 branch November 23, 2024 23:28
Copy link

Backport failed to create: v2-10-test. View the failure log Run details

Status Branch Result
v2-10-test Commit Link

@potiuk
Copy link
Member Author

potiuk commented Nov 23, 2024

Backport failed to create: v2-10-test. View the failure log Run details

Yeah - expected that. Will cherry pick manually.

potiuk added a commit to potiuk/airflow that referenced this pull request Nov 23, 2024
…e#44294)

The `eval-type-backport` is a tool to replace some of the controversial
new type hints added with `from future imoport __annotations__`
to "classic" type hint (| and list - into `Union` and `List`).

This helps to battle some of the issues where Pydantic has troubles
when they are used for classes that Pydantic uses.

The library was initially added in apache#42196 but it was added for all
Python versions - this change limits it only to Python < 3.10
(cherry picked from commit 2948338)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
jscheffl pushed a commit that referenced this pull request Nov 24, 2024
… (#44315)

The `eval-type-backport` is a tool to replace some of the controversial
new type hints added with `from future imoport __annotations__`
to "classic" type hint (| and list - into `Union` and `List`).

This helps to battle some of the issues where Pydantic has troubles
when they are used for classes that Pydantic uses.

The library was initially added in #42196 but it was added for all
Python versions - this change limits it only to Python < 3.10
(cherry picked from commit 2948338)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-v2-10-test Mark PR with this label to backport to v2-10-test branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants