Skip to content
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

Python 3.12.4 Compatibility #226

Closed
jretz opened this issue Jun 12, 2024 · 0 comments · Fixed by #228
Closed

Python 3.12.4 Compatibility #226

jretz opened this issue Jun 12, 2024 · 0 comments · Fixed by #228
Labels
bug Something isn't working

Comments

@jretz
Copy link

jretz commented Jun 12, 2024

Python 3.12.4 changed the signature of typing.ForwardRef._evaluate so that the exception TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard' is now thrown inside this function:

def evaluate_forward_ref(
typ: ForwardRef, globalns: Any, localns: Any
) -> Optional[Type]:
if PY_39_MIN:
return typ._evaluate(
globalns, localns, frozenset()
) # type: ignore[call-arg]
else:
return typ._evaluate(globalns, localns) # type: ignore[call-arg]

The relevant change in Python 3.12.4 is in python/cpython@5430f61.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants