8000 Add support for 3.13 by sydney-runkle · Pull Request #9743 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

Add support for 3.13 #9743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jun 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
3.13 fix for eval type
  • Loading branch information
sydney-runkle committed Jun 25, 2024
commit 953f3b7abd3c120b33c9eb17100229939a5cd51a
11 changes: 8 additions & 3 deletions pydantic/_internal/_typing_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,14 @@ def eval_type_backport(
if the original syntax is not supported in the current Python version.
"""
try:
return typing._eval_type( # type: ignore
value, globalns, localns
)
if sys.version_info > (3, 13):
return typing._eval_type( # type: ignore
value, globalns, localns, type_params=()
)
else:
return typing._eval_type( # type: ignore
value, globalns, localns
)
except TypeError as e:
if not (isinstance(value, typing.ForwardRef) and is_backport_fixable_error(e)):
raise
Expand Down
Loading
0