Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
@chrisbouchard

Description

@chrisbouchard

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions