Skip to content

Finish remaining tasks for PEP 544 #5322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ilevkivskyi opened this issue Jul 5, 2018 · 6 comments
Closed

Finish remaining tasks for PEP 544 #5322

ilevkivskyi opened this issue Jul 5, 2018 · 6 comments

Comments

@ilevkivskyi
Copy link
Member

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?

@JukkaL
Copy link
Collaborator

JukkaL commented Jul 5, 2018

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.

@ilevkivskyi
Copy link
Member Author

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.

@ilevkivskyi ilevkivskyi changed the title Withdraw/defer PEP 544? Finish remaining tasks for PEP 544? Jul 5, 2018
@ilevkivskyi
Copy link
Member Author

ilevkivskyi commented Jul 5, 2018

Here is a more complete list of tasks:

  • rename @runtime to @runtime_checkable in 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 the ProtocolMeta on Python 3.7 and 3.8 to avoid metaclass conflicts (with the help of PEP 560)
  • Move Protocol and @runtime_checkable to typing

@gvanrossum
Copy link
Member

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?

@gvanrossum gvanrossum changed the title Finish remaining tasks for PEP 544? Finish remaining tasks for PEP 544 Jul 5, 2018
@ilevkivskyi
Copy link
Member Author

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.

@ilevkivskyi
Copy link
Member Author

I think this can be closed now. The remaining tasks can be tracked in individual issues (they already exist).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants