Message11010
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. |
|
Date |
User |
Action |
Args |
2017-01-07 18:31:07 | stefan.richthofer | set | messageid: <1483813867.76.0.222817996619.issue2515@psf.upfronthosting.co.za> |
2017-01-07 18:31:07 | stefan.richthofer | set | recipients:
+ stefan.richthofer, zyasoft |
2017-01-07 18:31:07 | stefan.richthofer | link | issue2515 messages |
2017-01-07 18:31:07 | stefan.richthofer | create | |
|