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

Behavior of types.get_original_bases() changed in Python 3.12 #274

Closed
chrisbouchard opened this issue Aug 3, 2023 · 0 comments · Fixed by #275
Closed

Behavior of types.get_original_bases() changed in Python 3.12 #274

chrisbouchard opened this issue Aug 3, 2023 · 0 comments · Fixed by #275

Comments

@chrisbouchard
Copy link

chrisbouchard commented Aug 3, 2023

There was just a pull request merged into Python 3.12 to change how types.get_original_bases() behaves for generic types whose bases have no type arguments.

The TL;DR is that types.get_original_bases(cls) should only use cls's own __orig_bases__, not an ancestor type's via MRO, and should fall back to cls.__bases__ otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant