You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The backport can be used from a third-party package called eval_type_backport (PyPI), maintained here.
Integrating with the backport might significantly reduce the need of using some deprecated/verbose typing components, such as typing.List (deprecated since 3.9, instead leverage PEP 585) or typing.Union (instead leverage PEP 604).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First Check
Commit to Help
Example Code
Description
Currently, typer doesn't support PEP 585 and PEP 604 annotations.
Pydantic adopted a backport which I worked on as well and it can be incorporated into typer, too.
The backport can be used from a third-party package called
eval_type_backport
(PyPI), maintained here.Integrating with the backport might significantly reduce the need of using some deprecated/verbose typing components, such as
typing.List
(deprecated since 3.9, instead leverage PEP 585) ortyping.Union
(instead leverage PEP 604).Operating System
Other
Operating System Details
All.
Typer Version
Python Version
3.8.19, 3.9.19
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions