Issue1209

classification
Title: jython traps AttributeError exceptions in some cases leading to unexpected behaviors
Type: behaviour Severity: major
Components: Core Versions: 2.5b0
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, mcella, pjenvey
Priority: high Keywords:

Created on 2008-12-17.15:07:32 by mcella, last changed 2009-03-30.17:13:15 by pjenvey.

Files
File name Uploaded Description Edit Remove
test_eq.py mcella, 2008-12-17.15:07:31 test case
Messages
msg3949 (view) Author: Michele Cella (mcella) Date: 2008-12-17.15:07:31
One very annoying thing I've noticed while working with jython has to do
with equality comparison operations, basically jython traps
AttributeError exceptions that can happen inside the __eq__
implementation and just returns False, while the error is on the
programmer side this behavior is very annoying since it makes almost
impossible to recognize the source of the error (I've lost a good amount
of time to find out my typo on the __eq__ implementation).

I've attached a small test case to show the problem:

$ python test_eq.py 
test... ok

$ jython2.5 test_eq.py
test... failed

Note that here I've tested only __eq__ but I think the problem is more
extended than just __eq__ and is probably related to any special method
(http://docs.python.org/reference/datamodel.html#specialnames).

I haven't yet found the time to also test if properties, getattr,
setattr and hasattr are all coherent with the CPython behavior, I'm
mentioning them since I remember there is something tricky going on
there also, see
http://www.mail-archive.com/python-3000@python.org/msg11630.html for
more links and info.
msg4388 (view) Author: Philip Jenvey (pjenvey) Date: 2009-03-30.16:41:36
This was broken by this: http://fisheye3.atlassian.com/changelog/jython/?
cs=2556

reverting it doesn't seem to break test_class, running it through the 
regrtest now..
msg4389 (view) Author: Philip Jenvey (pjenvey) Date: 2009-03-30.16:42:06
that is r2556
msg4391 (view) Author: Philip Jenvey (pjenvey) Date: 2009-03-30.17:13:15
reverted r2556 in r6124, fixed
thanks
History
Date User Action Args
2009-03-30 17:13:15pjenveysetstatus: open -> closed
resolution: accepted -> fixed
messages: + msg4391
2009-03-30 16:48:20fwierzbickisetassignee: fwierzbicki ->
2009-03-30 16:42:06pjenveysetmessages: + msg4389
2009-03-30 16:41:36pjenveysetnosy: + pjenvey
messages: + msg4388
2009-03-14 03:11:40fwierzbickisetpriority: high
assignee: fwierzbicki
2008-12-17 19:44:00fwierzbickisetnosy: + fwierzbicki
resolution: accepted
2008-12-17 15:18:21mcellasetcomponents: + Core
2008-12-17 15:18:08mcellasettype: behaviour
severity: normal -> major
versions: + 2.5b0
2008-12-17 15:07:32mcellacreate