Skip to content

Update typing module documentation based on PEP 585 #84991

Description

@matusvalo
mannequin
BPO 40814
Nosy @gvanrossum, @ilevkivskyi, @matusvalo, @DahlitzFlorian, @Fidget-Spinner
PRs
  • bpo-41805: Documentation for PEP 585 #22615
  • 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 = <Date 2020-10-31.17:37:43.363>
    created_at = <Date 2020-05-29.12:28:33.397>
    labels = ['type-bug', '3.9', '3.10', 'docs']
    title = 'Update typing module documentation based on PEP 585'
    updated_at = <Date 2020-10-31.17:37:43.363>
    user = 'https://github.com/matusvalo'

    bugs.python.org fields:

    activity = <Date 2020-10-31.17:37:43.363>
    actor = 'gvanrossum'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2020-10-31.17:37:43.363>
    closer = 'gvanrossum'
    components = ['Documentation']
    creation = <Date 2020-05-29.12:28:33.397>
    creator = 'Mat\xc3\xba\xc5\xa1 Valo'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40814
    keywords = ['patch']
    message_count = 7.0
    messages = ['370306', '372008', '374288', '378362', '378367', '378921', '380079']
    nosy_count = 6.0
    nosy_names = ['gvanrossum', 'docs@python', 'levkivskyi', 'Mat\xc3\xba\xc5\xa1 Valo', 'DahlitzFlorian', 'kj']
    pr_nums = ['22615']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue40814'
    versions = ['Python 3.9', 'Python 3.10']

    Activity

    1. matusvalo commented on May 29, 2020

      matusvalomannequin
      MannequinAuthor

      In documentation of typing module there is no mention of new possibilities based on PEP-585. Moreover, should be old constructs like List, Dict,... marked as deprecated?

    2. added
      docsDocumentation in the Doc dir
      type-bugAn unexpected behavior, bug, or error
      on May 29, 2020
    3. added
      docsDocumentation in the Doc dir
      type-bugAn unexpected behavior, bug, or error
      on May 29, 2020
    4. gvanrossum commented on Jun 21, 2020

      @gvanrossum
      Member

      I don't think we should deprecate List etc. (PEP-585 specifically punts on the topic) but it's good to start mentioning list[t] etc. in the docs. Do you want to volunteer to write some docs?

    5. gvanrossum commented on Jul 25, 2020

      @gvanrossum
      Member

      Alternatively, we at least need a section of documentation for things like list[int] and dict[str, float].

    6. Fidget-Spinner commented on Oct 10, 2020

      @Fidget-Spinner
      Member

      I've created a PR 22615 which partly addresses the documentation for GenericAlias in stdtypes.

      I have a side question: should __args__, and __origin__ be documented somewhere as well? I noticed it has no documentation even though it's used to check generics. At the same time, I'm not fully sure that it's a standard Python thing rather than a CPython implementation detail.

    7. gvanrossum commented on Oct 10, 2020

      @gvanrossum
      Member

      Yes, let’s document __args__ and __origin__.

    8. Fidget-Spinner commented on Oct 19, 2020

      @Fidget-Spinner
      Member

      The PR should be ready for review now. Thanks for your patience.

    9. Fidget-Spinner commented on Oct 31, 2020

      @Fidget-Spinner
      Member

      IMO, this can now be closed.

      Most code examples in typing were changed to builtin generics:
      d9ab95f
      7f54e56

      Docs for PEP-585's GenericAlias was added:
      4173320

      Dict, List, and friends were also all marked as deprecated in 3.9.

    10. transferred this issue fromon Apr 10, 2022
    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.10 (EOL)end of life3.9 (EOL)end of lifedocsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions