[issue44695] asdict use deep copy to dataclass instances

2021-11-28 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Duplicate of https://bugs.python.org/issue43905

--
nosy: +andrei.avk
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> dataclasses.astuple does deepcopy on all fields

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44695] asdict use deep copy to dataclass instances

2021-07-21 Thread Itay azolay


Change by Itay azolay :


--
versions: +Python 3.10, Python 3.11 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44695] asdict use deep copy to dataclass instances

2021-07-21 Thread Ben Avrahami


Change by Ben Avrahami :


--
nosy: +avrahami.ben

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44695] asdict use deep copy to dataclass instances

2021-07-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44695] asdict use deep copy to dataclass instances

2021-07-21 Thread Itay azolay


New submission from Itay azolay :

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

--
components: Library (Lib)
messages: 397938
nosy: Itayazolay
priority: normal
severity: normal
status: open
title: asdict use deep copy to dataclass instances
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com