gh-74690: Document changes made to runtime-checkable protocols in 3.12 by AlexWaygood · Pull Request #103348 · python/cpython · GitHub
Skip to content

gh-74690: Document changes made to runtime-checkable protocols in 3.12#103348

Merged
AlexWaygood merged 8 commits intopython:mainfrom
AlexWaygood:document-runtime-protocol-changes
Apr 7, 2023
Merged

gh-74690: Document changes made to runtime-checkable protocols in 3.12#103348
AlexWaygood merged 8 commits intopython:mainfrom
AlexWaygood:document-runtime-protocol-changes

Conversation

@AlexWaygood AlexWaygood marked this pull request as ready for review April 7, 2023 14:30
@AlexWaygood AlexWaygood added the 3.12 only security fixes label Apr 7, 2023
Comment thread Doc/library/typing.rst Outdated
Comment thread Misc/NEWS.d/next/Library/2023-04-07-15-09-26.gh-issue-74690.0f886b.rst Outdated
Comment thread Misc/NEWS.d/next/Library/2023-04-07-15-09-26.gh-issue-74690.0f886b.rst Outdated
Copy link
Copy Markdown
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good. Only thing I'm thinking of is that most users reading What's New still don't have the context that runtime_checkable isinstance is like 400x slower than regular isinstance or whatever. Feels hard to communicate "this thing is 20x faster than it was, but is still 20x slower than you might think it is", but maybe there's a good way :-)

@AlexWaygood
Copy link
Copy Markdown
Member Author

@AlexWaygood AlexWaygood merged commit 6441365 into python:main Apr 7, 2023
@AlexWaygood AlexWaygood deleted the document-runtime-protocol-changes branch April 7, 2023 21:06
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
…in 3.12 (python#103348)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.12 only security fixes docs Documentation in the Doc dir topic-typing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance of typing._ProtocolMeta._get_protocol_attrs and isinstance

6 participants