Skip to content
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

Update typing module documentation based on PEP 585 #84991

Closed
matusvalo mannequin opened this issue May 29, 2020 · 7 comments
Closed

Update typing module documentation based on PEP 585 #84991

matusvalo mannequin opened this issue May 29, 2020 · 7 comments
Labels
3.9 only security fixes 3.10 only security fixes docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@matusvalo
Copy link
Mannequin

matusvalo mannequin commented May 29, 2020

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']

    @matusvalo
    Copy link
    Mannequin Author

    matusvalo mannequin commented May 29, 2020

    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?

    @matusvalo matusvalo mannequin added 3.9 only security fixes 3.10 only security fixes labels May 29, 2020
    @matusvalo matusvalo mannequin assigned docspython May 29, 2020
    @matusvalo matusvalo mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error 3.9 only security fixes 3.10 only security fixes labels May 29, 2020
    @matusvalo matusvalo mannequin assigned docspython May 29, 2020
    @matusvalo matusvalo mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels May 29, 2020
    @gvanrossum
    Copy link
    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?

    @gvanrossum
    Copy link
    Member

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

    @Fidget-Spinner
    Copy link
    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.

    @gvanrossum
    Copy link
    Member

    Yes, let’s document __args__ and __origin__.

    @Fidget-Spinner
    Copy link
    Member

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

    @Fidget-Spinner
    Copy link
    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants