Created on 2019-06-05 11:13 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 13877 | merged | serhiy.storchaka, 2019-06-07 05:22 | |
| PR 14390 | merged | serhiy.storchaka, 2019-06-26 07:51 | |
| PR 14405 | merged | serhiy.storchaka, 2019-06-26 16:24 | |
| Messages (8) | |||
|---|---|---|---|
| msg344704 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2019-06-05 11:13 | |
>>> from dataclasses import * >>> @dataclass ... class D: ... obj: object ... >>> replace(D(123), obj='abc') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: replace() got multiple values for argument 'obj' |
|||
| msg344707 - (view) | Author: Eric V. Smith (eric.smith) * | Date: 2019-06-05 11:21 | |
Possibly a use for positional-only parameters. Backward compatibility is the question, of course. |
|||
| msg344741 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2019-06-05 16:01 | |
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). |
|||
| msg344751 - (view) | Author: Brett Cannon (brett.cannon) * | Date: 2019-06-05 17:21 | |
+1 for Serhiy's suggestion |
|||
| msg344896 - (view) | Author: Pablo Galindo Salgado (pablogsal) * | Date: 2019-06-07 04:28 | |
+1 to Serhiy's proposal |
|||
| msg346022 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2019-06-19 07:33 | |
New changeset f5b89afde1196ec9f74b7dc0333cec9bc4d4c2db by Serhiy Storchaka in branch '3.8': bpo-37163: Deprecate passing argument obj of dataclasses.replace() by keyword. (GH-13877) https://github.com/python/cpython/commit/f5b89afde1196ec9f74b7dc0333cec9bc4d4c2db |
|||
| msg346647 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2019-06-26 16:07 | |
New changeset 2d88e63bfcf7bccba925ab80b3f47ccf8b7aefa8 by Serhiy Storchaka in branch 'master': bpo-37163: Make the obj argument of dataclasses.replace() a positional-only. (GH-14390) https://github.com/python/cpython/commit/2d88e63bfcf7bccba925ab80b3f47ccf8b7aefa8 |
|||
| msg346674 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2019-06-26 20:03 | |
New changeset 6ef103fbdbc05adbc20838c94b1f0c40fa6c159a by Serhiy Storchaka in branch '3.7': [3.7] bpo-37163: dataclasses.replace() now supports the field named "obj". (GH-13877) (GH-14405) https://github.com/python/cpython/commit/6ef103fbdbc05adbc20838c94b1f0c40fa6c159a |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:16 | admin | set | github: 81344 |
| 2019-06-26 20:16:55 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-06-26 20:03:14 | serhiy.storchaka | set | messages: + msg346674 |
| 2019-06-26 16:24:55 | serhiy.storchaka | set | pull_requests: + pull_request14217 |
| 2019-06-26 16:07:47 | serhiy.storchaka | set | messages: + msg346647 |
| 2019-06-26 07:51:11 | serhiy.storchaka | set | stage: resolved -> patch review pull_requests: + pull_request14204 |
| 2019-06-25 23:25:29 | pablogsal | set | status: closed -> open resolution: fixed -> (no value) |
| 2019-06-25 23:24:06 | pablogsal | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-06-19 07:33:32 | serhiy.storchaka | set | messages: + msg346022 |
| 2019-06-07 05:22:25 | serhiy.storchaka | set | keywords:
+ patch stage: patch review pull_requests: + pull_request13755 |
| 2019-06-07 04:28:52 | pablogsal | set | nosy:
+ pablogsal messages: + msg344896 |
| 2019-06-05 17:21:22 | brett.cannon | set | nosy:
+ brett.cannon messages: + msg344751 |
| 2019-06-05 16:01:35 | serhiy.storchaka | set | messages: + msg344741 |
| 2019-06-05 11:21:59 | eric.smith | set | messages: + msg344707 |
| 2019-06-05 11:13:04 | serhiy.storchaka | create | |