Issue 44695: asdict use deep copy to dataclass instances
Issue44695
Created on 2021-07-21 11:29 by Itayazolay, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg397938 - (view) | Author: Itay azolay (Itayazolay) * | Date: 2021-07-21 11:29 | |
Hi, I noticed that 'asdict' use 'deepcopy' on all fields of the dataclass recursively. I believe this behavior can become optional with an argument, and shouldn't be decided for the user as the deepcopy takes significant amount of cpu and can have unexpected consequences on memory. I don't mind taking this PR if you agree. Thanks |
|||
| msg407220 - (view) | Author: Andrei Kulakov (andrei.avk) * ![]() |
Date: 2021-11-28 19:17 | |
Duplicate of https://bugs.python.org/issue43905 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:47 | admin | set | github: 88861 |
| 2021-11-28 19:17:43 | andrei.avk | set | status: open -> closed superseder: dataclasses.astuple (and .asdict) do deepcopy on all fields nosy:
+ andrei.avk |
| 2021-07-21 19:09:02 | Itayazolay | set | versions: + Python 3.10, Python 3.11, - Python 3.6 |
| 2021-07-21 18:38:42 | avrahami.ben | set | nosy:
+ avrahami.ben |
| 2021-07-21 11:39:14 | xtreak | set | nosy:
+ eric.smith |
| 2021-07-21 11:29:22 | Itayazolay | create | |
