[New-bugs-announce] [issue35410] copy.deepcopy does not respect metaclasses with __deepcopy__ implementations
Eliot Bixby
report at bugs.python.org
Tue Dec 4 15:04:54 EST 2018
New submission from Eliot Bixby <eli.bixby at gmail.com>:
__deepcopy__ implementations on metaclasses are ignored because deepcopy explicitly ignores class objects.
It seems to me that more consistent behavior would be to use a null op as a fallback for class objects that do not have any of the relevant methods implemented (deepcopy, reduce, reduce_ex, etc)
I've attached a PR that implements this.
----------
components: Library (Lib)
messages: 331073
nosy: elibixby
priority: normal
pull_requests: 10144
severity: normal
status: open
title: copy.deepcopy does not respect metaclasses with __deepcopy__ implementations
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35410>
_______________________________________
More information about the New-bugs-announce
mailing list