Changes by John O'Connor tehj...@gmail.com:
--
nosy: +jcon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8578
___
___
Python-bugs-list mailing
Roundup Robot devnull@devnull added the comment:
New changeset a856be6688a6 by Benjamin Peterson in branch '3.2':
be extra careful with a borrowed reference when the GIL could be released
(closes #8578)
http://hg.python.org/cpython/rev/a856be6688a6
--
nosy: +python-dev
resolution: -
Georg Brandl ge...@python.org added the comment:
I added a note to the docs in r83536.
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8578
___
New submission from Armin Rigo ar...@users.sourceforge.net:
PyWeakref_GetObject(wref) returns a borrowed reference, but that's rather
dangerous. The fact that wref stays alive does not prevent the returned object
from being collected (by definition -- wref is a weak reference). That means
Antoine Pitrou pit...@free.fr added the comment:
This should be fixed; I suggest deprecating PyWeakref_GetObject() and
adding another C API function that does not return a borrowed reference.
Another possibility is to document the fact that Py_INCREF() should be called
in most cases. It