Issue1738411

classification
Title: Unable to change function sys.settrace
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: fabioz, zyasoft
Priority: normal Keywords:

Created on 2007-06-16.16:46:43 by fabioz, last changed 2008-09-14.00:09:16 by zyasoft.

Messages
msg1650 (view) Author: Fabio Zadrozny (fabioz) Date: 2007-06-16.16:46:43
sys.settrace cannot be changed. In the pydev debugger, I'd like to give users a warning if they're trying to change sys.settrace while running the debugger, so, I was trying to change it after setting up the debugger to give a warning (and only then call the original function), but this doesn't seem to work.

The code below shows what's happening:

original = sys.settrace
sys.settrace = lambda *args,**kwargs:None
print '%s should differ %s' % (original, sys.settrace)

Is there some other way to change it under jython? (I've tried changing sys.__dict__['settrace'], but the final result is the same)



msg3559 (view) Author: Jim Baker (zyasoft) Date: 2008-09-14.00:09:16
In 2.5, test_trace only partially works, but it does cover this issue as
being fixed.

Added test_trace to regrtest so we also have visibility here for the
remaining issues.
History
Date User Action Args
2008-09-14 00:09:16zyasoftsetstatus: open -> closed
resolution: fixed
messages: + msg3559
nosy: + zyasoft
2007-06-16 16:46:43fabiozcreate