[issue13574] refresh example in doc for Extending and Embedding

New submission from Florent Xicluna <florent.xicluna@gmail.com>: The example uses PyInstanceObject which is Python 2 only (old-style classes). http://docs.python.org/dev/extending/newtypes.html#weak-reference-support ---------- assignee: docs@python components: Documentation, Extension Modules messages: 149183 nosy: docs@python, flox priority: normal severity: normal stage: needs patch status: open title: refresh example in doc for Extending and Embedding type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13574> _______________________________________

Changes by Jesús Cea Avión <jcea@jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13574> _______________________________________

Changes by Eli Bendersky <eliben@gmail.com>: ---------- nosy: +eli.bendersky _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13574> _______________________________________

Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- versions: +Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13574> _______________________________________

Mark Lawrence added the comment: https://docs.python.org/3/extending/newtypes.html still refers to PyInstanceObject, I'm sorry but I've no idea what the replacement is called, so I'll leave this to someone in the know. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13574> _______________________________________

Berker Peksag <berker.peksag@gmail.com> added the comment: The documentation has been modernized in https://github.com/python/cpython/commit/1d80a561734b9932961c546b0897405a3bf... and the "Weak Reference Support" section has been updated to show the modern way of adding weakref support: https://github.com/python/cpython/commit/1d80a561734b9932961c546b0897405a3bf... ---------- nosy: +berker.peksag resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue13574> _______________________________________
participants (6)
-
Berker Peksag
-
Eli Bendersky
-
Ezio Melotti
-
Florent Xicluna
-
Jesús Cea Avión
-
Mark Lawrence