[issue45167] deepcopy of GenericAlias with __deepcopy__ method is broken

Serhiy Storchaka report at bugs.python.org
Mon Sep 13 17:23:03 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I meant that the current __getattr__ breaks deepcopy(). It can break also other protocols. It already has a list of exceptions, we need to add "__copy__" and "__deepcopy__" in this list. Or maybe exclude all dunder names by default and use a white list?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45167>
_______________________________________


More information about the Python-bugs-list mailing list