[issue17927] Argument copied into cell still referenced by frame

2013-05-14 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue17927] Argument copied into cell still referenced by frame

2013-05-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2b4b289c1abb by Benjamin Peterson in branch '3.3': when arguments are cells clear the locals slot (backport of #17927) http://hg.python.org/cpython/rev/2b4b289c1abb -- ___ Python tracker

[issue17927] Argument copied into cell still referenced by frame

2013-05-14 Thread Guido van Rossum
Guido van Rossum added the comment: Would you mind doing the backport then? -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue17927] Argument copied into cell still referenced by frame

2013-05-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think with the way I rewrote it, it would be okay. -- ___ Python tracker ___ ___ Python-bugs-li

[issue17927] Argument copied into cell still referenced by frame

2013-05-12 Thread Guido van Rossum
Guido van Rossum added the comment: Benjamin, what do you think of backporting this? -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue17927] Argument copied into cell still referenced by frame

2013-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset f6223bab5657 by Benjamin Peterson in branch 'default': when an argument is a cell, set the local copy to NULL (see #17927) http://hg.python.org/cpython/rev/f6223bab5657 -- ___ Python tracker

[issue17927] Argument copied into cell still referenced by frame

2013-05-12 Thread Martin Morrison
Martin Morrison added the comment: The latest diff (cellfree4.diff) applies correctly to 3.3 (one hunk fails, but it's just the one where you've removed a blank line). The tests also pass successfully with the diff applied. -- ___ Python tracker

[issue17927] Argument copied into cell still referenced by frame

2013-05-10 Thread Guido van Rossum
Guido van Rossum added the comment: Martin Morrison, can you check if my fix (cellfree4.diff) applies cleanly to 3.3? Or if nearly so, could you upload a fixed version here? (Or create a new issue and assign it to me if you can't upload to this issue.) -- ___

[issue17927] Argument copied into cell still referenced by frame

2013-05-10 Thread Martin Morrison
Martin Morrison added the comment: Our usage of Python would certainly benefit from the backport. We are embedding Python 3.3 in a system with requirements that lead us to disable the gc in most cases, so cycles are an obvious problem for us. Cycles created inadvertently, such as this, are the

[issue17927] Argument copied into cell still referenced by frame

2013-05-10 Thread Guido van Rossum
Guido van Rossum added the comment: Ok, the deed is done. Thanks for your review, Benjamin! I've reassigned it to you so you can fix up the test if you want to. What would you think of a backport to 3.3? -- assignee: gvanrossum -> benjamin.peterson resolution: -> fixed

[issue17927] Argument copied into cell still referenced by frame

2013-05-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset d331e14cae42 by Guido van Rossum in branch 'default': #17927: Keep frame from referencing cell-ified arguments. http://hg.python.org/cpython/rev/d331e14cae42 -- nosy: +python-dev ___ Python tracker

[issue17927] Argument copied into cell still referenced by frame

2013-05-09 Thread Nick Coghlan
Nick Coghlan added the comment: Looks good to me, too. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue17927] Argument copied into cell still referenced by frame

2013-05-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think it looks good now. I'll probably just rewrite the test once you commit it. -- keywords: -needs review ___ Python tracker ___ __

[issue17927] Argument copied into cell still referenced by frame

2013-05-09 Thread Guido van Rossum
Guido van Rossum added the comment: cellfree4.diff. Addressed review: - Moved test to test_scope.py - Added @cpython_only - Fixed comment indent (and removed tabs :-) - Fixed missing NULL test I decided to keep the super() call; it's likely that it's tested elsewhere but I don't want to verif

[issue17927] Argument copied into cell still referenced by frame

2013-05-09 Thread Guido van Rossum
Guido van Rossum added the comment: I see. I really don't care, it's extremely rare to see a closure object. -- ___ Python tracker ___ ___

[issue17927] Argument copied into cell still referenced by frame

2013-05-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: Consider the following testcase class X: def meth(self): print(self) super() def f(): k = X() def g(): return k return g c = f().__closure__[0] X.meth(c) With patch $ ./python unboxing.py Without patch $ ./python u

[issue17927] Argument copied into cell still referenced by frame

2013-05-09 Thread Guido van Rossum
Guido van Rossum added the comment: Ok, here's a version with a unittest. I've also improved the comment that set Nick off the track. -- keywords: +patch Added file: http://bugs.python.org/file30185/cellfree3.diff ___ Python tracker

[issue17927] Argument copied into cell still referenced by frame

2013-05-09 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, I misread the second patch, I think due to the "copy the cell into" in the comment. I believe I would have grasped it immediately if it said something like "reference the cell from". -- ___ Python tracker

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Guido van Rossum
Guido van Rossum added the comment: I thought about that but I like this version better because the super() code does not have to know the details of how to find the cell. On Wednesday, May 8, 2013, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Guido, did you try combining your fi

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Nick Coghlan
Nick Coghlan added the comment: Guido, did you try combining your first patch (clearing the local var when populating the cell) with your second patch (by only checking for a cell when the local var is cleared rather than when it is populated)? It seems slightly more logical to me to have a ce

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: +1 for a unit test! -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: with a unit test maybe? -- nosy: +amaury.forgeotdarc ___ Python tracker ___ ___ Python-bugs-li

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Guido van Rossum
Guido van Rossum added the comment: Ok, if I don't hear from anyone soon I'm going to commit. -- ___ Python tracker ___ ___ Python-bug

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan ___ Python tracker ___ ___ Python-bugs-l

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Guido van Rossum
Guido van Rossum added the comment: Here's a new version that copies the cell into the arg slot instead of just clearing it, with matching code in super() that looks in the cell. I'd appreciate a review from another senior core dev. -- keywords: +needs review -patch Added file: http://

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Guido van Rossum
Changes by Guido van Rossum : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Phil Connell
Changes by Phil Connell : -- nosy: +isoschiz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Phil Connell
Changes by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17927] Argument copied into cell still referenced by frame

2013-05-07 Thread Yuval Greenfield
Changes by Yuval Greenfield : -- nosy: +ubershmekel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue17927] Argument copied into cell still referenced by frame

2013-05-07 Thread Guido van Rossum
New submission from Guido van Rossum: This came out of some investigations into Tulip reference cycles. I've only confirmed this with 3.3 and 3.4, but I suspect it's a problem in earlier versions too. The scenario is as follows. Consider a object with a method that ends up catching an except