Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Implement Path.__deepcopy__ avoiding infinite recursion#30198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
Give it a metaclass that lets us remove the __deepcopy__ methodfrom sight when executing that method.Closesmatplotlib#29157 without relying on private CPython methods.Does not fix the other issue with TransformNode.__copy__.
54ac172
to996b647
Comparefa7ed8b
to68d25b3
Comparejkseppan commentedJun 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I tried the same strategy with EDIT: this is actually easier to fix by just doing the shallow copy without |
without calling copy.copy
No reason to look up __deepcopy__ in base classes.
Uh oh!
There was an error while loading.Please reload this page.
Give it a metaclass that lets us remove the
__deepcopy__
methodfrom sight when executing that method.
Closes#29157 without relying on private CPython methods.
There is a separate fix for the other issue with
TransformNode.__copy__
.PR summary
PR checklist