bpo-38908: Fix issue when non runtime_protocol failed to raise TypeError (#26067)

This commit is contained in:
Yurii Karabas 2021-05-12 18:47:49 +03:00 committed by GitHub
parent 9b06e4b535
commit c40486a32d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 2 deletions

View file

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