1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Date: Sun, 26 Oct 2025 00:15:39 +0100
Subject: Reduce performance regression
Origin: upstream, https://github.com/jcrist/msgspec/pull/882
Bug: https://github.com/jcrist/msgspec/issues/880
Last-Update: 2025-10-26
---
msgspec/_utils.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/msgspec/_utils.py b/msgspec/_utils.py
index 7565610..597b199 100644
--- a/msgspec/_utils.py
+++ b/msgspec/_utils.py
@@ -71,8 +71,8 @@ else:
_eval_type = typing._eval_type
-if sys.version_info >= (3, 10):
- from inspect import get_annotations as _get_class_annotations
+if sys.version_info >= (3, 14):
+ from annotationlib import get_annotations as _get_class_annotations
else:
def _get_class_annotations(cls):
|