Repository navigation
Closed
Labels
3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
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-26.20:16:55.693>
created_at = <Date 2019-06-05.11:13:04.903>
labels = ['3.7', '3.8', 'type-bug', 'library', '3.9']
title = 'dataclasses.replace() fails with the field named "obj"'
updated_at = <Date 2019-06-26.20:16:55.692>
user = 'https://github.com/serhiy-storchaka'bugs.python.org fields:
activity = <Date 2019-06-26.20:16:55.692>
actor = 'serhiy.storchaka'
assignee = 'none'
closed = True
closed_date = <Date 2019-06-26.20:16:55.693>
closer = 'serhiy.storchaka'
components = ['Library (Lib)']
creation = <Date 2019-06-05.11:13:04.903>
creator = 'serhiy.storchaka'
dependencies = []
files = []
hgrepos = []
issue_num = 37163
keywords = ['patch']
message_count = 8.0
messages = ['344704', '344707', '344741', '344751', '344896', '346022', '346647', '346674']
nosy_count = 4.0
nosy_names = ['brett.cannon', 'eric.smith', 'serhiy.storchaka', 'pablogsal']
pr_nums = ['13877', '14390', '14405']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue37163'
versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']Metadata
Metadata
Assignees
Labels
3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
serhiy-storchaka commentedon Jun 5, 2019
ericvsmith commentedon Jun 5, 2019
Possibly a use for positional-only parameters. Backward compatibility is the question, of course.
serhiy-storchaka commentedon Jun 5, 2019
I propose to add a deprecation warning in 3.8 and use the PEP-570 syntax in 3.9 (which means a TypeError if obj is passed by keyword argument).
brettcannon commentedon Jun 5, 2019
+1 for Serhiy's suggestion
pablogsal commentedon Jun 7, 2019
+1 to Serhiy's proposal
serhiy-storchaka commentedon Jun 19, 2019
New changeset f5b89af by Serhiy Storchaka in branch '3.8':
bpo-37163: Deprecate passing argument obj of dataclasses.replace() by keyword. (GH-13877)
f5b89af
serhiy-storchaka commentedon Jun 26, 2019
New changeset 2d88e63 by Serhiy Storchaka in branch 'master':
bpo-37163: Make the obj argument of dataclasses.replace() a positional-only. (GH-14390)
2d88e63
serhiy-storchaka commentedon Jun 26, 2019
New changeset 6ef103f by Serhiy Storchaka in branch '3.7':
[3.7] bpo-37163: dataclasses.replace() now supports the field named "obj". (GH-13877) (GH-14405)
6ef103f