classification
Title: refresh example in doc for Extending and Embedding
Type: behavior Stage: resolved
Components: Documentation, Extension Modules Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: BreamoreBoy, berker.peksag, docs@python, eli.bendersky, flox, jcea
Priority: normal Keywords:

Created on 2011-12-10 19:52 by flox, last changed 2018-08-04 15:01 by berker.peksag. This issue is now closed.

Messages (3)
msg149183 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2011-12-10 19:52
The example uses PyInstanceObject which is Python 2 only (old-style classes).

http://docs.python.org/dev/extending/newtypes.html#weak-reference-support
msg222775 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-11 18:29
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.
msg323109 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2018-08-04 15:01
The documentation has been modernized in https://github.com/python/cpython/commit/1d80a561734b9932961c546b0897405a3bfbf3e6 and the "Weak Reference Support" section has been updated to show the modern way of adding weakref support:

    https://github.com/python/cpython/commit/1d80a561734b9932961c546b0897405a3bfbf3e6#diff-1ace1cc14bb5b7f4ee77f22238ede084R556
History
Date User Action Args
2018-08-04 15:01:25berker.peksagsetstatus: open -> closed

nosy: + berker.peksag
messages: + msg323109

resolution: out of date
stage: needs patch -> resolved
2014-07-11 18:29:42BreamoreBoysetnosy: + BreamoreBoy

messages: + msg222775
versions: + Python 3.5, - Python 3.2, Python 3.3
2012-11-09 15:01:05ezio.melottisetversions: + Python 3.4
2011-12-11 13:58:30eli.benderskysetnosy: + eli.bendersky
2011-12-10 22:41:46jceasetnosy: + jcea
2011-12-10 19:52:05floxcreate