classification
Title: dataclasses: generated method's using the wrong qualname
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.smith Nosy List: BTaskaya, eric.smith
Priority: normal Keywords: patch

Created on 2020-09-08 20:38 by BTaskaya, last changed 2020-10-21 13:50 by eric.smith. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 22155 merged BTaskaya, 2020-09-08 20:42
Messages (3)
msg376594 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2020-09-08 20:38
$ cat t.py
from dataclasses import dataclass

@dataclass
class Foo:
    bar: int

Foo()
$ python t.py
Traceback (most recent call last):
  File "/home/isidentical/cpython/cpython/t.py", line 7, in <module>
    Foo()
TypeError: __create_fn__.<locals>.__init__() missing 1 required positional argument: 'bar'
msg379208 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-10-21 13:49
New changeset c7437e2c0216e05fbf17bf96294cb20954e36e48 by Batuhan Taskaya in branch 'master':
bpo-41747: Ensure all dataclass methods uses their parents' qualname (GH-22155)
https://github.com/python/cpython/commit/c7437e2c0216e05fbf17bf96294cb20954e36e48
msg379209 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-10-21 13:50
Thanks for the PR!
History
Date User Action Args
2020-10-21 13:50:18eric.smithsetstatus: open -> closed
resolution: fixed
messages: + msg379209

stage: patch review -> resolved
2020-10-21 13:49:30eric.smithsetmessages: + msg379208
2020-09-09 01:43:30rhettingersetassignee: eric.smith
2020-09-08 20:42:52BTaskayasetkeywords: + patch
stage: patch review
pull_requests: + pull_request21234
2020-09-08 20:38:57BTaskayacreate