Skip to content

Commit 3a3067a

Browse files
Reword news entry
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent 406aff6 commit 3a3067a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on
2-
:class:`typing.Protocol` classes that were not explicitly decorated
3-
with :func:`typing.runtime_checkable` after subclassing runtime-checkable
4-
protocol classes. This will throw a :exc:`TypeError` in Python 3.20.
5-
Contributed by Bartosz Sławecki.
1+
Previously, :class:`~typing.Protocol` classes that were not decorated with :deco:`~typing.runtime_checkable`,
2+
but that inherit from another ``Protocol`` class that does have this decorator, could be used in :func:`isinstance`
3+
and :func:`issubclass` checks. This behavior is now deprecated and such checks will throw a :exc:`TypeError`
4+
in Python 3.20. Patch by Bartosz Sławecki.

0 commit comments

Comments
 (0)