From 79ae45364673b017237e1341b55f8c51e49c076a Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 11 Sep 2024 16:55:40 -0400 Subject: [PATCH] fix: fix python 3.13 deprecation --- xsdata/formats/dataclass/typing.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xsdata/formats/dataclass/typing.py b/xsdata/formats/dataclass/typing.py index 95d3548b..8cb39c6e 100644 --- a/xsdata/formats/dataclass/typing.py +++ b/xsdata/formats/dataclass/typing.py @@ -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