-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.9] bpo-38908: Fix issue when non runtime_protocol does not raise T…
…ypeError (GH-26067) (GH-26075) (cherry picked from commit c40486a) Co-authored-by: Yurii Karabas [email protected] Automerge-Triggered-By: GH:gvanrossum
- Loading branch information
1 parent
1be9396
commit 88136bb
Showing
3 changed files
with
25 additions
and
4 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/2021-05-12-16-43-21.bpo-38908.nM2_rO.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 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. |