From f28edc30f9147891a68ec962b009c79b42cf08dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Basler?= Date: Mon, 10 Aug 2026 09:24:32 +0200 Subject: [PATCH] chore(pyoaev): compatibility support python 3.14 --- pyoaev/base.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pyoaev/base.py b/pyoaev/base.py index 223f36b..10fd2f2 100644 --- a/pyoaev/base.py +++ b/pyoaev/base.py @@ -4,7 +4,16 @@ import pprint import textwrap from types import ModuleType -from typing import TYPE_CHECKING, Any, Dict, Iterable, Optional, Type, Union +from typing import ( + TYPE_CHECKING, + Any, + Dict, + Iterable, + Optional, + Type, + Union, + get_type_hints, +) from pyoaev.exceptions import OpenAEVParsingError @@ -157,7 +166,8 @@ def _create_managers(self) -> None: # NOTE(jlvillal): We are creating our managers by looking at the class # annotations. If an attribute is annotated as being a *Manager type # then we create the manager and assign it to the attribute. - for attr, annotation in sorted(self.__annotations__.items()): + annotations = get_type_hints(type(self)) + for attr, annotation in sorted(annotations.items()): # We ignore creating a manager for the 'manager' attribute as that # is done in the self.__init__() method if attr in ("manager",):