Skip to content
Snippets Groups Projects
Unverified Commit 49cd68fb authored by Ken Jin's avatar Ken Jin Committed by GitHub
Browse files

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
parent d9142831
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment