-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
BUG (CoW): fix reference tracking in replace_list with None #59807
BUG (CoW): fix reference tracking in replace_list with None #59807
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx!
@meeseeksdev backport to 2.3.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
Manual backport at #59943 |
For a specific case in
list_replace
when replacing with a non-present value with None, we were returning the block itself instead of a shallow copy (as is done in other code paths in this function), messing up the reference tracking (we are removing the block itself to avoid multiple copies when replacing multiple values).None
values fails when copy_on_write is enabled #59770doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.