Skip to content

Commit

Permalink
fix: fix python 3.13 deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Sep 11, 2024
1 parent 8f266d5 commit 79ae453
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xsdata/formats/dataclass/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ def _eval_type(tp: Any, globalns: Any, localns: Any) -> Any:
tp = tp.__origin__[args] # type: ignore

return __eval_type(tp, globalns, localns)
elif sys.version_info[:2] >= (3, 13):
# python 3.13+ requires type_params argument
from typing import _eval_type as __eval_type # type: ignore

def _eval_type(tp: Any, globalns: Any, localns: Any) -> Any:
return __eval_type(tp, globalns, localns, type_params=())
else:
from typing import _eval_type # type: ignore

Expand Down

0 comments on commit 79ae453

Please sign in to comment.