New submission from Eliot Bixby <eli.bi...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue35410>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to