bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298) (GH-29928)

(cherry picked from commit 2b318ce1c9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-12-07 04:00:06 -08:00 committed by GitHub
parent e688568cdf
commit bffce2cbb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 1 deletions

View file

@ -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