Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
jkseppan wants to merge2 commits intomatplotlib:main
base:main
Choose a base branch
Loading
fromjkseppan:path-deepcopy-via-metaclass

Conversation

jkseppan
Copy link
Member

@jkseppanjkseppan commentedJun 21, 2025
edited
Loading

Give it a metaclass that lets us remove the__deepcopy__ method
from sight when executing that method.

Closes#29157 without relying on private CPython methods.
Does not fix the other issue withTransformNode.__copy__.

PR summary

PR checklist

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__.
@jkseppanjkseppanforce-pushed thepath-deepcopy-via-metaclass branch from54ac172 to996b647CompareJune 21, 2025 07:10
@jkseppanjkseppanforce-pushed thepath-deepcopy-via-metaclass branch fromfa7ed8b to68d25b3CompareJune 21, 2025 08:00
@jkseppanjkseppan requested a review fromtacaswellJune 21, 2025 08:56
@jkseppan
Copy link
MemberAuthor

I tried the same strategy withTransformNode.__copy__ butcopy.copy looks atgetattr(cls, "__copy__", None) so we'd need to override attribute lookup on the class and not its instances, and then we can't have an instance-specific flag.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswellAwaiting requested review from tacaswell

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

FUTURE BUG: reconsider how we deep-copy path objects
1 participant
@jkseppan

[8]ページ先頭

©2009-2025 Movatter.jp