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

[v2-10-test] Only install eval-type-backport for Python < 3.10 (#44294) #44315

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Nov 23, 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 (cherry picked from commit 2948338)


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

…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 <[email protected]>
@potiuk
Copy link
Member Author

potiuk commented Nov 23, 2024

I am cherry-picking that one to 2-10-test - targetting for 2.10.4 - just in case pydantic/pydantic#10958 will not be quickly resolved and Pydantic team will be reluctant to make eval-type-backport as required dependency for Pydantic (which IMHO is the best solution to the problem they introduced in Pydantic 2.10.*. This is not ideal as it only protects the 2.10.4 users on Python 3.8/3.9 but I want to have it handy.

@bugraoz93
Copy link
Collaborator

I believe failed steps are not relevant to the changes. It seems like a couple of tests are still using old configuration.

@potiuk
Copy link
Member Author

potiuk commented Nov 24, 2024

I believe failed steps are not relevant to the changes. It seems like a couple of tests are still using old configuration.

Yeah, we need to fix it separately.

@jscheffl jscheffl merged commit fe15c23 into apache:v2-10-test Nov 24, 2024
80 of 96 checks passed
@utkarsharma2 utkarsharma2 added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Dec 4, 2024
@utkarsharma2 utkarsharma2 added this to the Airflow 2.10.4 milestone Dec 4, 2024
utkarsharma2 pushed a commit that referenced this pull request Dec 4, 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)
utkarsharma2 pushed a commit that referenced this pull request Dec 9, 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
changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants