Skip to content

Commit

Permalink
[v2-10-test] Only install eval-type-backport for Python < 3.10 (#44294)…
Browse files Browse the repository at this point in the history
… (#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)
  • Loading branch information
potiuk authored Nov 24, 2024
1 parent 341d36d commit fe15c23
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@
"cryptography>=41.0.0",
"deprecated>=1.2.13",
"dill>=0.2.2",
# Required for python 3.8 and 3.9 to work with new annotations styles. Check package
# description on PyPI for more details: https://pypi.org/project/eval-type-backport/
# NOTE! THIS MIGHT BE REMOVED BEFORE WE RELEASE 2.10.4 if
# Pydantic 2.10.2 will add eval-type-backport as dependency for Python 3.8/3.9
# see https://github.com/pydantic/pydantic/issues/10958
'eval-type-backport>=0.2.0;python_version<"3.10"',
"flask-caching>=2.0.0",
# Flask-Session 0.6 add new arguments into the SqlAlchemySessionInterface constructor as well as
# all parameters now are mandatory which make AirflowDatabaseSessionInterface incompatible with this version.
Expand Down

0 comments on commit fe15c23

Please sign in to comment.