Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement __replace__ on 3.13 #1383

Merged
merged 5 commits into from
Dec 14, 2024
Merged

Implement __replace__ on 3.13 #1383

merged 5 commits into from
Dec 14, 2024

Conversation

hynek
Copy link
Member

@hynek hynek commented Dec 14, 2024

Fixes #1313

Had to move evolve over due to import cycles and fortunately RTD already supports 3.13.

Since it doesn't overwrite anything, I would wait with adding an own option for if someone actually misses it. 🤷‍♂️

Copy link
Member

@Tinche Tinche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

We could probably make this faster by generating a specialized version of __replace__ and making evolve use it, but that would slow down class creation even further, so I'm not convinced it's worth it.

@hynek hynek added this pull request to the merge queue Dec 14, 2024
Merged via the queue into main with commit 62bdbf2 Dec 14, 2024
19 checks passed
@hynek hynek deleted the copy-replace branch December 14, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

copy.replace support
2 participants