gh-112345: Let failed protocol subclasscheck show non-method members#112344
Merged
AlexWaygood merged 11 commits intopython:mainfrom Nov 24, 2023
Merged
gh-112345: Let failed protocol subclasscheck show non-method members#112344AlexWaygood merged 11 commits intopython:mainfrom
AlexWaygood merged 11 commits intopython:mainfrom
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
AlexWaygood
reviewed
Nov 23, 2023
Member
There was a problem hiding this comment.
Looks good, but please add a test and a NEWS entry. The NEWS entry can be very terse, e.g.:
Improve error message when trying to call :func:`issubclass`
against a :class:`typing.Protocol` that has non-method members.
Patch by Randolph Sholz.
I created an issue for you to link your NEWS entry to.
AlexWaygood
reviewed
Nov 23, 2023
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
AlexWaygood
reviewed
Nov 23, 2023
AlexWaygood
reviewed
Nov 23, 2023
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
AlexWaygood
reviewed
Nov 23, 2023
AlexWaygood
reviewed
Nov 23, 2023
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Member
|
Congrats on your first CPython contribution, @randolf-scholz! |
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
Dec 11, 2023
# Release 4.9.0 (December 9, 2023) This feature release adds `typing_extensions.ReadOnly`, as specified by PEP 705, and makes various other improvements, especially to `@typing_extensions.deprecated()`. There are no changes since 4.9.0rc1. # Release 4.9.0rc1 (November 29, 2023) - Add support for PEP 705, adding `typing_extensions.ReadOnly`. Patch by Jelle Zijlstra. - All parameters on `NewType.__call__` are now positional-only. This means that the signature of `typing_extensions.NewType.__call__` now exactly matches the signature of `typing.NewType.__call__`. Patch by Alex Waygood. - Fix bug with using `@deprecated` on a mixin class. Inheriting from a deprecated class now raises a `DeprecationWarning`. Patch by Jelle Zijlstra. - `@deprecated` now gives a better error message if you pass a non-`str` argument to the `msg` parameter. Patch by Alex Waygood. - `@deprecated` is now implemented as a class for better introspectability. Patch by Jelle Zijlstra. - Exclude `__match_args__` from `Protocol` members. Backport of python/cpython#110683 by Nikita Sobolev. - When creating a `typing_extensions.NamedTuple` class, ensure `__set_name__` is called on all objects that define `__set_name__` and exist in the values of the `NamedTuple` class's class dictionary. Patch by Alex Waygood, backporting python/cpython#111876. - Improve the error message when trying to call `issubclass()` against a `Protocol` that has non-method members. Patch by Alex Waygood (backporting python/cpython#112344, by Randolph Scholz).
aisk
pushed a commit
to aisk/cpython
that referenced
this pull request
Feb 11, 2024
…-method members (python#112344) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this pull request
Sep 2, 2024
…-method members (python#112344) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #112340 (comment)
Closes #112345
issubclass()against a Protocol that has non-method members #112345