Repository navigation
Finish remaining tasks for PEP 544 #5322
Description
Activity
I can move this forward (will likely have to wait until after my summer vacation though). I don't think that it's urgent to get this finished soon. Is module objects as instances of protocols the main thing missing? This looks like something that will take some effort to implement in mypy.
I can move this forward
Great, thanks!
Is module objects as instances of protocols the main thing missing?
Yes, this and also #3827 plus several smaller things, I will add a list now.
- changed the title
[-]Withdraw/defer PEP 544?[/-][+]Finish remaining tasks for PEP 544?[/+]on Jul 5, 2018 Here is a more complete list of tasks:
- rename
@runtimeto@runtime_checkablein typeshed and in mypy itself - Allow extending builtin protocols (like
Iterable), currently this crashes at runtime because of a bug(also we probably need to say explicitly in the PEP that this is allowed)(there are already examples in the PEP) - Add support for class objects and modules as protocol implementations and then merge the corresponding PR to the peps repo
- Resolve Safer treatment of @runtime protocols in isinstance() #3827 to match the current version of the PEP text
-
Get rid of theProtocolMetaon Python 3.7 and 3.8 to avoid metaclass conflicts (with the help of PEP 560) - Move
Protocoland@runtime_checkabletotyping
- rename
Thanks for the task list. Does acceptance of the PEP need to wait for the implementation to be finished? That's not a requirement of the PEP process (there are actually separate states "Accepted" and "Final", where the latter means there is no more work to be done in the reference implementation). Which of the above tasks require updating the PEP text?
- changed the title
[-]Finish remaining tasks for PEP 544?[/-][+]Finish remaining tasks for PEP 544[/+]on Jul 5, 2018 Does acceptance of the PEP need to wait for the implementation to be finished?
I reshuffled the tasks in a more logical order. I think the last two are optional w.r.t. to acceptance. But the first four are better to have before, there is a chance (although little I think) we might want to adjust some details.
I think this can be closed now. The remaining tasks can be tracked in individual issues (they already exist).
I don't have any energy/desire to work on this in foreseeable future. @JukkaL @ambv do you have time/desire to finish the remaining things?