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

BUG (CoW): fix reference tracking in replace_list with None #59807

Merged

Conversation

jorisvandenbossche
Copy link
Member

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).

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

thx!

@phofl phofl merged commit 3e8ac12 into pandas-dev:main Sep 15, 2024
41 of 47 checks passed
@phofl phofl added this to the 2.3 milestone Sep 15, 2024
@jorisvandenbossche jorisvandenbossche deleted the gh-59770-replace-list-none-refs branch October 2, 2024 18:57
@jorisvandenbossche
Copy link
Member Author

@meeseeksdev backport to 2.3.x

Copy link

lumberbot-app bot commented Oct 2, 2024

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.3.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 3e8ac12d1dacc2308b2f4c2869fa7bc2079bd323
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #59807: BUG (CoW): fix reference tracking in replace_list with None'
  1. Push to a named branch:
git push YOURFORK 2.3.x:auto-backport-of-pr-59807-on-2.3.x
  1. Create a PR against branch 2.3.x, I would have named this PR:

"Backport PR #59807 on branch 2.3.x (BUG (CoW): fix reference tracking in replace_list with None)"

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 Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@jorisvandenbossche
Copy link
Member Author

Manual backport at #59943

jorisvandenbossche added a commit that referenced this pull request Oct 2, 2024
… with None (#59943)

* BUG (CoW): fix reference tracking in replace_list with None (#59807)

(cherry picked from commit 3e8ac12)

* correct test to work without CoW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: replace with 3 or more None values fails when copy_on_write is enabled
2 participants