Skip to content

Add support for PEP 646 #87390

Closed
Closed

Description

@mrahtz
mannequin
BPO 43224
Nosy @gvanrossum, @serhiy-storchaka, @JelleZijlstra, @lysnikolaou, @pablogsal, @Fidget-Spinner, @mrahtz, @mrahtz, @AlexWaygood, @cdce8p
PRs
  • bpo-43224: Initial implementation of PEP 646 in typing.py #24527
  • bpo-43224: Draft implementation of PEP 646 #30398
  • bpo-43224: Implement PEP 646 grammar changes #31018
  • bpo-43224: Implement PEP 646 changes to genericaliasobject.c #31019
  • bpo-43224: Implement PEP 646 changes to typing.py #31021
  • bpo-43224: Implement substitution of unpacked TypeVarTuple #31800
  • bpo-43224: Work around substitution of unpacked TypeVarTuple #31804
  • bpo-43224: Implement substitution of unpacked TypeVarTuple in C #31828
  • bpo-43224: Add more tests for typevar substitution #31844
  • bpo-43224: Fix Tuple[()].__args__ #31845
  • bpo-43224: Add tests for TypeVarTuple substitution in Annotated #31846
  • bpo-43224: Add TypeVarTuple.__name__ #31954
  • bpo-43224: Unpack concrete tuple types into a sequence of types #32030
  • bpo-43224: Forbid TypeVar substitution with Unpack #32031
  • bpo-43224: Implement pickling of TypeVarTuples #32119
  • bpo-43224: Add tests for pickling and copying of unpacked native tuple #32159
  • 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 = None
    closed_at = None
    created_at = <Date 2021-02-14.17:21:47.204>
    labels = ['interpreter-core', 'tests', 'library', '3.11']
    title = 'Add support for PEP 646'
    updated_at = <Date 2022-04-05.02:52:50.682>
    user = 'https://github.com/mrahtz'

    bugs.python.org fields:

    activity = <Date 2022-04-05.02:52:50.682>
    actor = 'JelleZijlstra'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)', 'Tests', 'Parser']
    creation = <Date 2021-02-14.17:21:47.204>
    creator = 'mrahtz'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43224
    keywords = ['patch']
    message_count = 9.0
    messages = ['414715', '414935', '414991', '415514', '416020', '416022', '416074', '416689', '416727']
    nosy_count = 10.0
    nosy_names = ['gvanrossum', 'serhiy.storchaka', 'JelleZijlstra', 'lys.nikolaou', 'pablogsal', 'kj', 'matthew.rahtz', 'mrahtz', 'AlexWaygood', 'cdce8p']
    pr_nums = ['24527', '30398', '31018', '31019', '31021', '31800', '31804', '31828', '31844', '31845', '31846', '31954', '32030', '32031', '32119', '32159']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue43224'
    versions = ['Python 3.11']

    Activity

    1. Fidget-Spinner commented on Mar 12, 2022

      @Fidget-Spinner
      Member

      New changeset af2277e by Matthew Rahtz in branch 'main':
      bpo-43224: Implement PEP-646 changes to genericaliasobject.c (GH-31019)
      af2277e

    2. JelleZijlstra commented on Mar 18, 2022

      @JelleZijlstra
      Member

      New changeset 3a2b895 by Jelle Zijlstra in branch 'main':
      bpo-43224: Add TypeVarTuple.__name__ (GH-31954)
      3a2b895

    3. mrahtz commented on Mar 25, 2022

      mrahtzmannequin
      MannequinAuthor

      Since things are piling up, here's a quick record of what I think the remaining tasks are: (in approximate order of priority)

      1. Finish writing docs (is updating library/typing.html sufficient? bpo-47097: Add documentation for TypeVarTuple #32103)
      2. Implement support for pickling of unpacked native tuples
      3. Implement support and add tests for copy() of TypeVarTuple and unpacked tuple
      4. Resolve the issue of how we implement type substitution (https://bugs.python.org/issue47006)
    4. JelleZijlstra commented on Mar 25, 2022

      @JelleZijlstra
      Member
      1. Finish writing docs (is updating library/typing.html sufficient? bpo-47097: Add documentation for TypeVarTuple #32103)

      We also need to add to the What's New for 3.11. I volunteered to do that for all the typing PEPs.

      1. Implement support for pickling of unpacked native tuples

      Linking your #76300

      1. Implement support and add tests for copy() of TypeVarTuple and unpacked tuple

      I believe this uses the same mechanism as pickling, so shouldn't need more work.

    5. JelleZijlstra commented on Mar 26, 2022

      @JelleZijlstra
      Member

      New changeset e8e737b by Matthew Rahtz in branch 'main':
      bpo-43224: Implement PEP-646 grammar changes (GH-31018)
      e8e737b

    6. mrahtz commented on Apr 4, 2022

      mrahtzmannequin
      MannequinAuthor
      1. Finish writing docs

      Done once #32103 is merged.

      1. Implement support for pickling of unpacked native tuples

      Done once #32159 is merged.

      1. Resolve the issue of how we implement type substitution (https://bugs.python.org/issue47006)

      Will re-visit this now.

    7. JelleZijlstra commented on Apr 5, 2022

      @JelleZijlstra
      Member

      New changeset 772d808 by Matthew Rahtz in branch 'main':
      bpo-43224: typing: Add tests for pickling and copying of unpacked native tuple (GH-32159)
      772d808

    8. transferred this issue fromon Apr 10, 2022
    9. gvanrossum commented on Apr 11, 2022

      @gvanrossum
      Member

      @mrahtz @JelleZijlstra @serhiy-storchaka Is it okay if I unsubscribe from these conversations and let you all come up with a compromise? I feel that while we ought to have a policy formulated and mostly implemented by beta 1 (May 6), tweaks of both the policy and the implementation during the beta period until RC 1 (Aug/Sept?) should be allowable.

    10. mrahtz commented on Apr 11, 2022

      @mrahtz
      ContributorAuthor

      @gvanrossum Fine with me. Godspeed with the rest of your work for this release :)

    11. mrahtz commented on Apr 20, 2022

      @mrahtz
      ContributorAuthor

      Keeping track of things yet to do:

      Decided against doing:

      • Disallow Unpack[Tuple] - I think it's simpler if we keep this valid, in accordance with the the general philosophy of "Keep the runtime lenient when it comes to typing"
    12. added 2 commits that reference this issue on Apr 29, 2022
    13. added a commit that references this issue on May 2, 2022
    14. added 2 commits that reference this issue on May 5, 2022
    15. hauntsaninja commented on Oct 11, 2022

      @hauntsaninja
      Contributor

      How much of the checklist above is still relevant?

    16. mrahtz commented on Oct 11, 2022

      @mrahtz
      ContributorAuthor

      Thanks for the reminder! From a quick look, some of the items in the checklist are definitely still relevant. I'll try and find some time for this soon.

    17. added 3 commits that reference this issue on Oct 25, 2022
    18. AlexWaygood commented on Apr 10, 2023

      @AlexWaygood
      Member

      Thanks for the reminder! From a quick look, some of the items in the checklist are definitely still relevant. I'll try and find some time for this soon.

      Friendly ping on this -- are the unchecked items on the checklist still to do, or is this issue ~complete now? :)

    19. mrahtz commented on Apr 10, 2023

      @mrahtz
      ContributorAuthor

      Whoops, sorry - we finished #98267 last year but I completely forgot to update the checklist. I believe we can go ahead and close this now :) (though I can't seem to do this myself because the issue was created before the move to GitHub or something? Can you do it on your end?)

    20. AlexWaygood commented on Apr 10, 2023

      @AlexWaygood
      Member

      Whoops, sorry - we finished #98267 last year but I completely forgot to update the checklist. I believe we can go ahead and close this now :)

      No worries -- great to hear!

      Can you do it on your end?)

      I sure can. Thanks for all the work you put into this, it was a marathon!

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

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.11only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)stdlibStandard Library Python modules in the Lib/ directorytestsTests in the Lib/test dirtopic-typingtype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions