Message11009

Author stefan.richthofer
Recipients stefan.richthofer, zyasoft
Date 2017-01-07.15:49:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483804172.66.0.941930219681.issue2515@psf.upfronthosting.co.za>
In-reply-to
Content
Next issue boils down to

getattr(types.TypeType, "__abstractmethods__")

should raise AttributeError: __abstractmethods__
(like it does in CPython)

but in Jython it returns
<attribute '__abstractmethods__' of 'type' objects>

Code in abc.py expects
getattr(types.TypeType, "__abstractmethods__", set())
to be iterable, which Jython's result isn't. In CPython, the default-result set() is triggered by the AttributeError, so provides an empty iterable. Once <type 'type'> is in a base (like happens in typing.py), Jython lets abc.py crash with
'getset_descriptor' object is not iterable

Now I try to figure out where and why Jython inserts __abstractmethods__ into TypeType...
History
Date User Action Args
2017-01-07 15:49:32stefan.richthofersetmessageid: <1483804172.66.0.941930219681.issue2515@psf.upfronthosting.co.za>
2017-01-07 15:49:32stefan.richthofersetrecipients: + stefan.richthofer, zyasoft
2017-01-07 15:49:32stefan.richthoferlinkissue2515 messages
2017-01-07 15:49:31stefan.richthofercreate