You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-43905: dataclasses.astuple (and .asdict) do deepcopy on all fields
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=Noneclosed_at=<Date2021-11-28.19:17:43.451>created_at=<Date2021-07-21.11:29:22.227>labels= ['type-bug', '3.8', '3.9', '3.10', '3.11', '3.7', 'library']
title='asdict use deep copy to dataclass instances'updated_at=<Date2021-11-28.19:17:43.448>user='https://github.com/Itayazolay'
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.
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: