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

typing docs "versionadded" is inaccurate for many attributes #81165

Closed
asottile mannequin opened this issue May 21, 2019 · 1 comment
Closed

typing docs "versionadded" is inaccurate for many attributes #81165

asottile mannequin opened this issue May 21, 2019 · 1 comment
Labels
3.8 only security fixes docs Documentation in the Doc dir

Comments

@asottile
Copy link
Mannequin

asottile mannequin commented May 21, 2019

BPO 36984
Nosy @ilevkivskyi, @asottile
PRs
  • bpo-36984: Improve version added references in typing module docs #13457
  • [3.7] bpo-36984: Improve version added references in typing module docs (GH-13457) #13737
  • 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 2019-06-02.00:25:05.753>
    created_at = <Date 2019-05-21.05:20:35.290>
    labels = ['3.8', 'docs']
    title = 'typing docs "versionadded" is inaccurate for many attributes'
    updated_at = <Date 2019-06-02.00:25:05.752>
    user = 'https://github.com/asottile'

    bugs.python.org fields:

    activity = <Date 2019-06-02.00:25:05.752>
    actor = 'levkivskyi'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-06-02.00:25:05.753>
    closer = 'levkivskyi'
    components = ['Documentation']
    creation = <Date 2019-05-21.05:20:35.290>
    creator = 'Anthony Sottile'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36984
    keywords = ['patch']
    message_count = 1.0
    messages = ['342978']
    nosy_count = 3.0
    nosy_names = ['docs@python', 'levkivskyi', 'Anthony Sottile']
    pr_nums = ['13457', '13737']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36984'
    versions = ['Python 3.8']

    @asottile
    Copy link
    Mannequin Author

    asottile mannequin commented May 21, 2019

    expanding on https://bugs.python.org/issue36983

    the docs are also a bit out of date in places

    I'm not sure how to document something that appeared in two versions, but I'll leave that part to review.

    Using data generated / collected in https://github.com/asottile/flake8-typing-imports via this script: https://github.com/asottile/flake8-typing-imports/blob/master/bin/build-generated

    and then analyzed with this script:

    from flake8_typing_imports import SYMBOLS
    
    ALL = set().union(*(v for _, v in SYMBOLS))
    
    for k in sorted(ALL):
        state = False
        for i, (v, ks) in enumerate(SYMBOLS):
            if state is False and k in ks:
                print(f'{k}: new in {v}')
                state = True
            elif state is True and k not in ks:
                print(f'=> {k}: removed in {v}')
                state = False

    I've found the following:

    $ python3 t.py | grep -v 'new in 3\.5\.0'
    AsyncContextManager: new in 3.5.4
    => AsyncContextManager: removed in 3.6.0
    AsyncContextManager: new in 3.6.2
    AsyncGenerator: new in 3.6.1
    AsyncIterable: new in 3.5.2
    AsyncIterator: new in 3.5.2
    Awaitable: new in 3.5.2
    ChainMap: new in 3.5.4
    => ChainMap: removed in 3.6.0
    ChainMap: new in 3.6.1
    ClassVar: new in 3.5.3
    Collection: new in 3.6.0
    ContextManager: new in 3.5.4
    Coroutine: new in 3.5.3
    Counter: new in 3.5.4
    => Counter: removed in 3.6.0
    Counter: new in 3.6.1
    DefaultDict: new in 3.5.2
    Deque: new in 3.5.4
    => Deque: removed in 3.6.0
    Deque: new in 3.6.1
    ForwardRef: new in 3.7.0
    GenericMeta: new in 3.5.4
    => GenericMeta: removed in 3.6.0
    GenericMeta: new in 3.6.1
    => GenericMeta: removed in 3.7.0
    NewType: new in 3.5.2
    NoReturn: new in 3.5.4
    => NoReturn: removed in 3.6.0
    NoReturn: new in 3.6.2
    OrderedDict: new in 3.7.2
    TYPE_CHECKING: new in 3.5.2
    Text: new in 3.5.2
    Type: new in 3.5.2

    @asottile asottile mannequin added the 3.8 only security fixes label May 21, 2019
    @asottile asottile mannequin assigned docspython May 21, 2019
    @asottile asottile mannequin added the docs Documentation in the Doc dir label May 21, 2019
    @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.8 only security fixes docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant