Tin mới
AlexWaygood:protocol-attrs-cache-1
GitHub CopilotWrite better code with AI
GitHub Copilot appDirect agents from issue to merge
CodespacesInstant dev environments
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
GitHub SponsorsFund open source developers
Copilot for BusinessEnterprise-grade AI features
Premium SupportEnterprise-grade 24/7 support
Performance of typing._ProtocolMeta._get_protocol_attrs and isinstance #74690
Use a metaclass instance method, not a classmethod on the class
Learn more about hiding disruptive comments
The reason will be displayed to describe this comment to others. Learn more.
Confirmed that there's at least a few uses of _ProtocolMeta out in the wild:
Confirmed that there's at least a few uses of _ProtocolMeta out in the wild:
Confirmed that there's at least a few uses of _ProtocolMeta out in the wild:
Add missing super().__init__() call, to be safe
gh-102433: Use inspect.getattr_static in typing._ProtocolMeta.__instancecheck__ #103034
Merge branch 'main' into protocol-attrs-cache-1
Merge branch 'main' into protocol-attrs-cache-1
gh-74690: Document changes made to runtime-checkable protocols in 3.12 #103348
Backport performance improvements to runtime-checkable protocols python/typing_extensions#137
gh-74690: Don't set special protocol attributes on non-protocol subclasses of protocols #104622
Add typing.get_protocol_members and typing.is_protocol #104873
[Bug] typing_extensions.Protocol unsupported under typing_extensions ≥ 4.6.0 beartype/beartype#241