Issue1758318

classification
Title: StackOverflow if __nonzero__ returns self
Type: Severity: normal
Components: None Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: cgroves, fwierzbicki, pjenvey, zyasoft
Priority: normal Keywords: test failure causes

Created on 2007-07-22.04:43:42 by cgroves, last changed 2008-12-15.17:05:12 by fwierzbicki.

Messages
msg1772 (view) Author: Charlie Groves (cgroves) Date: 2007-07-22.04:43:42
If a subclass of object returns self from __nonzero__ a StackOverflow is eventually raised.  This is tested in test_bool.test_convert_to_bool and currently fails.
msg1773 (view) Author: Charlie Groves (cgroves) Date: 2007-08-06.00:05:12
See http://wiki.python.org/jython/JythonDeveloperGuide/VersionTransitionTestExclusions for how to get the test running again to fix this.
msg3214 (view) Author: Philip Jenvey (pjenvey) Date: 2008-06-02.03:08:01
this simply requires __nonzero__ in derived classes to work more like 
CPython's typeobject::slot_nb_nonzero: i.e. raise a TypeError if 
__nonzero__ returns anything but an actual (not subclass of) bool or int 
object
msg3548 (view) Author: Jim Baker (zyasoft) Date: 2008-09-13.23:02:12
test_bool.test_convert_to_bool is currently not run if on Jython. This
should be changed back.
msg3926 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2008-12-15.17:05:12
Fixed in r5767
History
Date User Action Args
2008-12-15 17:05:12fwierzbickisetstatus: open -> closed
resolution: accepted -> fixed
messages: + msg3926
2008-12-15 16:11:06fwierzbickisetresolution: accepted
2008-12-15 16:10:57fwierzbickisetassignee: fwierzbicki
nosy: + fwierzbicki
2008-09-13 23:02:13zyasoftsetnosy: + zyasoft
messages: + msg3548
2008-06-02 03:08:06pjenveysetnosy: + pjenvey
messages: + msg3214
2007-07-22 04:43:42cgrovescreate