Sorry, something went wrong.
There was a problem hiding this comment.
Maybe you want to delete or update the comment in the test?
Sorry, something went wrong.
| self.assertEqual(o, 'a.b.c') | ||
|
|
||
| def test_update_with_self(self): | ||
| # Make sure reference is not leaking here |
There was a problem hiding this comment.
The problem was not a leak though -- it was a free-after-use (the opposite of a leak, really :-).
Sorry, something went wrong.
There was a problem hiding this comment.
Right. I was imaging a pool of reference and a hole that's leaking the reference without people knowing it so the pool is drained, but yeah leak is not a good word choice here. I just deleted it, the test itself makes sense without any comments.
Sorry, something went wrong.
There was a problem hiding this comment.
Ooh, that's actually a nice image. :-) I will merge now.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the quick review!
Sorry, something went wrong.
In the PEP 667 implementation, when I copied the code from _PyFrame_LocalsToFast, I did not realize the value is a new reference so it was decrefed in the original code. This resulted in an extra DECREF in __setitem__. Unfortunately I did not catch it because the test cases used were all immortals.
Two test cases were added: