[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: > tp_traverse is optional, so we should not add this assertion. It is required by types implementing the GC protocol. This assumption is non-obvious and was not documented. The documentation was completed in bpo-44263 by commit

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: This issue was fixed differently in bpo-44263, by adding a test in PyType_Ready(): // bpo-44263: tp_traverse is required if Py_TPFLAGS_HAVE_GC is set. // Note: tp_clear is optional. if (type->tp_flags & Py_TPFLAGS_HAVE_GC &&

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2021-05-14 Thread Irit Katriel
Irit Katriel added the comment: tp_traverse is optional, so we should not add this assertion. -- resolution: -> rejected stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2021-04-28 Thread Bryan Silverthorn
Bryan Silverthorn added the comment: I submitted this patch 14 years ago and am sure of nothing. :) -- ___ Python tracker ___ ___

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2021-04-28 Thread Irit Katriel
Irit Katriel added the comment: Are you sure this assertion is correct? tp_traverse is optional. -- nosy: +iritkatriel ___ Python tracker ___

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2011-06-26 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.2, Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1662 ___

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2009-05-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It would be probably be better to put this check in PyType_Ready() instead. -- nosy: +pitrou versions: +Python 2.7, Python 3.1 -Python 2.6 ___ Python tracker rep...@bugs.python.org

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2009-04-27 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Bryan: can you provide a test case without external dependencies? If not, confirming this is still valid in 2.6 would also help. -- nosy: +ajaksu2 stage: - test needed ___ Python tracker

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2009-04-27 Thread Bryan Silverthorn
Bryan Silverthorn bc...@cornell.edu added the comment: Well, there's no Python bug per se, hence no test case; this patch just adds a single additional assert that might catch a particular extension implementation mistake. It was prompted by tracking down the bug in pygtk mentioned above. I've

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2009-04-27 Thread Bryan Silverthorn
Changes by Bryan Silverthorn bc...@cornell.edu: Removed file: http://bugs.python.org/file8998/bcs_typeobject_assert.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1662 ___

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2007-12-19 Thread Bryan Silverthorn
New submission from Bryan Silverthorn: Attached is a very short patch against r59568 which asserts tp_traverse on (the types of) objects allocated in PyType_GenericAlloc(). As far as I'm aware, tp_traverse should always be set at this point. Catching that error early, even if only in debug

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2007-12-19 Thread Christian Heimes
Changes by Christian Heimes: -- keywords: +patch priority: - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1662 __ ___ Python-bugs-list mailing list