Skip to content

Commit 76408fd

Browse files
committed
fix: new breakage for 3.14 fixed
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 5e0324c commit 76408fd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/test_pytypes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,10 @@ def test_dict_ranges(tested_dict, expected):
11431143

11441144
# https://docs.python.org/3/howto/annotations.html#accessing-the-annotations-dict-of-an-object-in-python-3-9-and-older
11451145
def get_annotations_helper(o):
1146+
if sys.version_info >= (3, 14):
1147+
import annotationlib
1148+
1149+
return annotationlib.get_annotations(o)
11461150
if isinstance(o, type):
11471151
return o.__dict__.get("__annotations__", None)
11481152
return getattr(o, "__annotations__", None)

0 commit comments

Comments
 (0)