SIGN IN SIGN UP

bpo-44606: Fix __instancecheck__ and __subclasscheck__ for the union type. (GH-27120)

* Fix issubclass() for None.
  E.g. issubclass(type(None), int | None) returns now True.
* Fix issubclass() for virtual subclasses.
  E.g. issubclass(dict, int | collections.abc.Mapping) returns now True.
* Fix crash in isinstance() if the check for one of items raises exception.
(cherry picked from commit 81989058de381108dfd0a4255b93d4fb34417002)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
M
Miss Islington (bot) committed
b42eee78e7651693aa38c390f577e5d499dcf55d
Parent: bb260c2
Committed by GitHub <noreply@github.com> on 7/14/2021, 4:55:45 AM