Commit 7f3d872
committed
🐛 Fix msgspec recipe import on Python 3.8/3.9
The msgspec recipe added in #3316 uses PEP 585 generic syntax
(dict[str, Any]) in function signatures. Python 3.8 raises
"TypeError: 'type' object is not subscriptable" at import time
because dict only became subscriptable at runtime in Python 3.9.
Adding `from __future__ import annotations` defers annotation
evaluation to strings (PEP 563), restoring 3.8 compatibility.
This release still officially supports Python 3.8 / 3.9.1 parent e928129 commit 7f3d872
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
0 commit comments