forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-105144: Runtime-checkable protocols: move all 'sanity checks…
…' to `_ProtocolMeta.__subclasscheck__` (python#105152)
- Loading branch information
1 parent
df396b5
commit c05c31d
Showing
3 changed files
with
111 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Misc/NEWS.d/next/Library/2023-05-31-16-58-42.gh-issue-105144.Oqfn0V.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Fix a recent regression in the :mod:`typing` module. The regression meant | ||
that doing ``class Foo(X, typing.Protocol)``, where ``X`` was a class that | ||
had :class:`abc.ABCMeta` as its metaclass, would then cause subsequent | ||
``isinstance(1, X)`` calls to erroneously raise :exc:`TypeError`. Patch by | ||
Alex Waygood. |