Message11010

Author stefan.richthofer
Recipients stefan.richthofer, zyasoft
Date 2017-01-07.18:31:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483813867.76.0.222817996619.issue2515@psf.upfronthosting.co.za>
In-reply-to
Content
Rewriting PyType.getAbstractmethods to

    public PyObject getAbstractmethods() {
        PyObject result = dict.__finditem__("__abstractmethods__");
        if (result == null || result instanceof PyDataDescr) {
            noAttributeError("__abstractmethods__");
        }
        return result;
    }

i.e. inserting ' || result instanceof PyDataDescr'
seems to solve it. I also checked other magic attributes (e.g. __module__) that are backed by getset_descriptors and __abstractmethods__ seems to be the only one that behaves differently from CPython, so this special-case-fix should be ultimate for the whole issue.

typing.py imports fine with the described fixes. Just running regrtests right now - fingers crossed.
Also: I suppose there were several newer versions of typing.py even for Python 2.7 than I tested with. So I will also investigate these, but suppose this issue is basically done now.
History
Date User Action Args
2017-01-07 18:31:07stefan.richthofersetmessageid: <1483813867.76.0.222817996619.issue2515@psf.upfronthosting.co.za>
2017-01-07 18:31:07stefan.richthofersetrecipients: + stefan.richthofer, zyasoft
2017-01-07 18:31:07stefan.richthoferlinkissue2515 messages
2017-01-07 18:31:07stefan.richthofercreate