bpo-42195: Disallow isinstance/issubclass for subclasses of genericaliases in Union (GH-24059)
Previously this didn't raise an error. Now it will: ```python from collections.abc import Callable isinstance(int, list | Callable[..., str]) ``` Also added tests in Union since there were previously none for stuff like ``isinstance(list, list | list[int])`` either. Backport to 3.9 not required. Automerge-Triggered-By: GH:gvanrossum
K
Ken Jin committed
49cd68fb1ed4cbaf109308c0a7c8c1efcf6f3775
Parent: d914283
Committed by GitHub <noreply@github.com>
on 1/2/2021, 4:19:15 PM