Skip to content

bpo-39453: Fix contains method of list to hold strong references#18181

Merged
pablogsal merged 3 commits into
python:masterfrom
corona10:bpo-39453
Jan 27, 2020
Merged

bpo-39453: Fix contains method of list to hold strong references#18181
pablogsal merged 3 commits into
python:masterfrom
corona10:bpo-39453

Conversation

@corona10

@corona10 corona10 commented Jan 25, 2020

Copy link
Copy Markdown
Member

@corona10 corona10 changed the title bpo-39453: Fix contains method of list to hold strong references [WIP] bpo-39453: Fix contains method of list to hold strong references Jan 25, 2020
@corona10 corona10 changed the title [WIP] bpo-39453: Fix contains method of list to hold strong references bpo-39453: Fix contains method of list to hold strong references Jan 25, 2020
@corona10

Copy link
Copy Markdown
Member Author

@pablogsal @serhiy-storchaka @vstinner
All test are passed :)

Comment thread Objects/listobject.c Outdated
Comment thread Misc/NEWS.d/next/Core and Builtins/2020-01-25-23-51-17.bpo-39453.xCOkYk.rst Outdated

@corona10 corona10 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@rhettinger I've updated the PR Please take a look :)

@corona10
corona10 requested a review from rhettinger January 26, 2020 05:51
@@ -0,0 +1,2 @@
Fix contains method of list to hold strong references of elements while

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It describes the implementation, but says nothing to an average Python user. I would formulate the entry in terms of Python: "Fixed possible crash in ``list.contains` when a list is changed during comparing items."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated!

Comment thread Lib/test/test_list.py Outdated
Comment thread Misc/NEWS.d/next/Core and Builtins/2020-01-25-23-51-17.bpo-39453.xCOkYk.rst Outdated

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM with changes proposed by @pablogsal. 👍

@corona10 corona10 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@pablogsal @serhiy-storchaka
Thanks for the review :)
I 've updated them

@corona10
corona10 requested a review from pablogsal January 27, 2020 12:53
@pablogsal
pablogsal merged commit 4dbf2d8 into python:master Jan 27, 2020
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @corona10 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7, 3.8.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @corona10 and @pablogsal, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 4dbf2d8c6789a9b7299b142033073213604b8fdc 3.8

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry @corona10 and @pablogsal, I had trouble checking out the 3.7 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 4dbf2d8c6789a9b7299b142033073213604b8fdc 3.7

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @corona10 and @pablogsal, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 4dbf2d8c6789a9b7299b142033073213604b8fdc 3.6

@pablogsal

Copy link
Copy Markdown
Member

@corona10 Could you make the backports with cherry_picker? Ping me in them and I will do the merge

corona10 added a commit to corona10/cpython that referenced this pull request Jan 27, 2020
corona10 added a commit to corona10/cpython that referenced this pull request Jan 27, 2020
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
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.

7 participants