diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2021-12-05 22:44:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-05 22:44:01 +0200 |
| commit | 2b318ce1c988b7b6e3caf293d55f289e066b6e0f (patch) | |
| tree | 1f0089d63fb9e383c60d294f2fbd99eb0bc24614 /Lib/types.py | |
| parent | 446be166861b2f08f87f74018113dd98ca5fca02 (diff) | |
| download | cpython-git-2b318ce1c988b7b6e3caf293d55f289e066b6e0f.tar.gz | |
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298)
Diffstat (limited to 'Lib/types.py')
| -rw-r--r-- | Lib/types.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/types.py b/Lib/types.py index ce1c28d562..679c7f638b 100644 --- a/Lib/types.py +++ b/Lib/types.py @@ -82,7 +82,7 @@ def resolve_bases(bases): updated = False shift = 0 for i, base in enumerate(bases): - if isinstance(base, type): + if isinstance(base, type) and not isinstance(base, GenericAlias): continue if not hasattr(base, "__mro_entries__"): continue |
