mirror of
https://github.com/python/cpython.git
synced 2025-11-26 21:33:10 +00:00
bpo-38908: Fix issue when non runtime_protocol failed to raise TypeError (#26067)
This commit is contained in:
parent
9b06e4b535
commit
c40486a32d
3 changed files with 23 additions and 2 deletions
|
|
@ -0,0 +1,5 @@
|
|||
Fix issue where :mod:`typing` protocols without the ``@runtime_checkable``
|
||||
decorator did not raise a ``TypeError`` when used with ``issubclass`` and
|
||||
``isinstance``. Now, subclassses of ``typing.Protocol`` will raise a
|
||||
``TypeError`` when used with with those checks.
|
||||
Patch provided by Yurii Karabas.
|
||||
Loading…
Add table
Add a link
Reference in a new issue