Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Milestone
Description
We currently usesuper()
in the__deepcopy__
implementation ofPath
matplotlib/lib/matplotlib/path.py
Lines 279 to 287 in183b04f
def__deepcopy__(self,memo=None): | |
""" | |
Return a deepcopy of the `Path`. The `Path` will not be | |
readonly, even if the source `Path` is. | |
""" | |
# Deepcopying arrays (vertices, codes) strips the writeable=False flag. | |
p=copy.deepcopy(super(),memo) | |
p._readonly=False | |
returnp |
however, on the main branch of CPython this causes infinite recursion (python/cpython#126817). Although upstream may (or may not) sort out how to fix this, we should see if there is another way we can do what we need to do and avoid any fallout from changes in CPython.
Good first issue because "make sure deepcopy works on Paths" is a narrowly limited task, but hard because it will require understanding why we currently usesuper()
and enough of the deepcopy/pickle protocol details to fix it.
attn@anntzer