[issue31428] ElementTree.Element.__deepcopy__() raises a SystemError in case of a bad memo

Serhiy Storchaka report at bugs.python.org
Tue Sep 12 08:24:00 EDT 2017


Serhiy Storchaka added the comment:

I suppose the Python implementation supports arbitrary mapping, not just dict. We could use general mapping API in the C implementation, but I think it isn't worth. __deepcopy__ is used internally by copy.deepcopy(), which always passes a dict. I think it isn't worth to backport a fix, and it doesn't need tests. The behavior of calling __deepcopy__ with non-dict is implementation detail. But it shouldn't crash or raise SystemError.

----------
versions:  -Python 2.7, Python 3.6

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


More information about the Python-bugs-list mailing list