Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
| BPO | 30505 |
|---|---|
| Nosy | @ilevkivskyi,@orenbenkiki |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2017-05-29.09:16:49.884>labels= ['library','performance']title='Performance of typing._ProtocolMeta._get_protocol_attrs and isinstance'updated_at=<Date2017-06-02.17:44:59.311>user='https://github.com/orenbenkiki'
bugs.python.org fields:
activity=<Date2017-06-02.17:44:59.311>actor='levkivskyi'assignee='none'closed=Falseclosed_date=Nonecloser=Nonecomponents= ['Library (Lib)']creation=<Date2017-05-29.09:16:49.884>creator='orenbenkiki'dependencies= []files= []hgrepos= []issue_num=30505keywords= []message_count=2.0messages= ['294686','295044']nosy_count=2.0nosy_names= ['levkivskyi','orenbenkiki']pr_nums= []priority='normal'resolution=Nonestage=Nonestatus='open'superseder=Nonetype='performance'url='https://bugs.python.org/issue30505'versions= ['Python 3.6']
Linked PRs
- gh-74690: typing: Don't unnecessarily call
_get_protocol_attrstwice in_ProtocolMeta.__instancecheck__#103141 - gh-74690: Micro-optimise
typing._get_protocol_attrs#103152 - gh-74690: typing: Simplify and optimise
_ProtocolMeta.__instancecheck__#103159 - gh-74690: typing: Call
_get_protocol_attrsand_callable_members_onlyat protocol class creation time, not duringisinstance()checks #103160 - gh-74690: Further optimise
typing._ProtocolMeta.__instancecheck__#103280 - gh-74690:
typing._ProtocolMeta.__instancecheck__: Exit early for protocols that only have callable members #103310 - gh-74690: Add more tests for runtime-checkable protocols #103347
- gh-74690: Document changes made to runtime-checkable protocols in 3.12 #103348
- [3.11] gh-74690: Add more tests for runtime-checkable protocols (GH-103347) #103350
- gh-74690: Don't set special protocol attributes on non-protocol subclasses of protocols #104622
- gh-74690: Make a typing test more resilient #104691
- gh-74690: Improve performance when testing against protocols with many attributes. #112157
- gh-74690: Optimise
isinstance()andissubclass()calls against runtime-checkable protocols by avoiding costlysuper()calls #112708 - gh-74690: Avoid a costly type check where possible in
_ProtocolMeta.__subclasscheck__#112717