python / python/cpython

typing: Unexpected result with value of instance of class inherited from typing.NamedTuple

Open
#77,258 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.10 3.11 3.12 docs stdlib topic-typing
Dominant language
Python
Stars
77.2k
Forks
36k
Avg merge
1d 9h
Merged PRs (30d)
558

Description

BPO 33077
Nosy @gvanrossum, @rhettinger, @ericvsmith, @ilevkivskyi
Files
  • python_test.py: Python unittest
  • 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 2018-03-14.22:24:50.423>
    labels = ['3.7', 'type-bug', 'library', 'docs']
    title = 'typing: Unexpected result with value of instance of class inherited from typing.NamedTuple'
    updated_at = <Date 2018-03-20.22:04:40.986>
    user = None
    

    bugs.python.org fields:

    activity = <Date 2018-03-20.22:04:40.986>
    actor = 'levkivskyi'
    assignee = 'docs@python'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation', 'Library (Lib)']
    creation = <Date 2018-03-14.22:24:50.423>
    creator = '\xd0\x95\xd0\xb2\xd0\xb3\xd0\xb5\xd0\xbd\xd0\xb8\xd0\xb9 \xd0\x9c\xd0\xb0\xd1\x85\xd0\xbc\xd1\x83\xd0\xb4\xd0\xbe\xd0\xb2'
    dependencies = []
    files = ['47487']
    hgrepos = []
    issue_num = 33077
    keywords = []
    message_count = 10.0
    messages = ['313843', '313848', '313916', '313918', '313919', '313920', '313925', '313945', '313957', '314168']
    nosy_count = 6.0
    nosy_names = ['gvanrossum', 'rhettinger', 'eric.smith', 'docs@python', 'levkivskyi', '\xd0\x95\xd0\xb2\xd0\xb3\xd0\xb5\xd0\xbd\xd0\xb8\xd0\xb9 \xd0\x9c\xd0\xb0\xd1\x85\xd0\xbc\xd1\x83\xd0\xb4\xd0\xbe\xd0\xb2']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33077'
    versions = ['Python 3.6', 'Python 3.7']
    

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    Research direction

    Start by running the attached python_test.py unittest to reproduce the unexpected result involving an instance of a class inherited from typing.NamedTuple. Then trace the relevant typing.NamedTuple implementation and existing tests; done means the reported behavior is understood, addressed, and covered by a passing regression test.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    python
    Domain
    backend
    Issue type
    Bug
    Difficulty
    4/5
    Estimated time
    3-5 days
    Activity status
    Stale
    Clarity
    Needs clarification
    Newbie friendliness
    25/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.