-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
Milestone
Description
We currently use super()
in the __deepcopy__
implementation ofPath
matplotlib/lib/matplotlib/path.py
Lines 279 to 287 in 183b04f
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 | |
return p |
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 use super()
and enough of the deepcopy/pickle protocol details to fix it.
attn @anntzer
Metadata
Metadata
Assignees
Labels
Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues