Skip to content

Finish remaining tasks for PEP 544 #5322

Description

@ilevkivskyi

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?

Activity

  1. JukkaL commented on Jul 5, 2018

    @JukkaL
    Collaborator

    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.

  2. ilevkivskyi commented on Jul 5, 2018

    @ilevkivskyi
    MemberAuthor

    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.

  3. changed the title [-]Withdraw/defer PEP 544?[/-] [+]Finish remaining tasks for PEP 544?[/+] on Jul 5, 2018
  4. ilevkivskyi commented on Jul 5, 2018

    @ilevkivskyi
    MemberAuthor

    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
  5. gvanrossum commented on Jul 5, 2018

    @gvanrossum
    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?

  6. changed the title [-]Finish remaining tasks for PEP 544?[/-] [+]Finish remaining tasks for PEP 544[/+] on Jul 5, 2018
  7. ilevkivskyi commented on Jul 5, 2018

    @ilevkivskyi
    MemberAuthor

    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.

  8. ilevkivskyi commented on Jul 16, 2019

    @ilevkivskyi
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions