Message11980

Author jeff.allen
Recipients Arfrever, jeff.allen, psykiatris, zyasoft
Date 2018-05-15.08:07:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526371643.59.0.682650639539.issue2305@psf.upfronthosting.co.za>
In-reply-to
Content
You don't need to condition this on "interactive" here, I would say. The problem (I think) is twofold, or one-and-a-half-fold, anyway.

In jython.java we are assigning an empty string when we should probably be assigning PyAttributeDeleted.INSTANCE to ps1 and ps2. Perhaps at that same place we should be removing them from __dict__. Take a look at PySystemState.__delattr__.

If that doesn't do it, then it's not so easy, and I think the focus is PySystemState.__rawdir__ . If you set a breakpoint there and watch it work you'll learn a lot about how hard Jython works under the covers to implement duck-typing. However, rather than use the generic dictionary update() method, in __rawdir__, maybe we need to use a loop where we step through __dict__ entries and don't add keys with a PyAttributeDeleted.INSTANCE value to accum. You have to remember that __dict__ is potentially *any* PyObject, so you can't assume it is the type you see in the debugger. You'll need something like PyObject.asIterable() and isMappingType().
History
Date User Action Args
2018-05-15 08:07:23jeff.allensetmessageid: <1526371643.59.0.682650639539.issue2305@psf.upfronthosting.co.za>
2018-05-15 08:07:23jeff.allensetrecipients: + jeff.allen, zyasoft, Arfrever, psykiatris
2018-05-15 08:07:23jeff.allenlinkissue2305 messages
2018-05-15 08:07:22jeff.allencreate