Backport some recent `Protocol` fixes from 3.12 by AlexWaygood · Pull Request #161 · python/typing_extensions · GitHub

github.com

Tin mới

AlexWaygood:proto-fixes

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Security and quality 0

gh-104555: Fix isinstance() and issubclass() for runtime-checkable protocols that use PEP 695 cpython#104556

gh-104555: Runtime-checkable protocols: Don't let previous calls to isinstance() influence whether issubclass() raises an exception cpython#104559

gh-74690: Don't set special protocol attributes on non-protocol subclasses of protocols cpython#104622

Improve readability of typing._ProtocolMeta.__instancecheck__ cpython#104649

Backport some recent Protocol fixes from 3.12

View reviewed changes

Learn more about hiding disruptive comments

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

Hopefully fix PyPy tests

View reviewed changes

Fix tests on Python 3.12 #162

gh-74690: Make a typing test more resilient python/cpython#104691

Clarify error message for non @runtime_checkable decorated protocols #178

fix(typing): add @runtime_checkable decorator for CustomTreeNode protocol class metaopt/optree#56