Join GitHub today
AttributeError when Cython functions are loaded #25
Even on Python 2 certain Cython objects have a
File "//src/zope/app/apidoc/ifacemodule/browser.py", line 176, in getGenericRequiredAdapters for reg in regs] File "//src/zope/app/apidoc/component.py", line 194, in getAdapterInfoDictionary if isReferencable(path): File "//src/zope/app/apidoc/utilities.py", line 186, in isReferencable if hasattr(obj, '__class__') and getPythonPath(obj.__class__) == path: File "//src/zope/app/apidoc/utilities.py", line 138, in getPythonPath qname = qname.split('.') AttributeError: 'getset_descriptor' object has no attribute 'split'
Here, we're looking the path passed to
if hasattr(naked, '__qualname__'): # Python 3. This makes unbound functions inside classes # do the same thing as they do an Python 2: return just their # class name. qname = naked.__qualname__ qname = qname.split('.') # <--- BAM!
This makes the entire Interface tree of the apidoc a series of broken links.
I agree the behaviour is weird at best on Cython's part. I can and will file an issue there too, I just wanted to understand a bit better what was happening first.
It turns out it may not be an easy fix.
Moreover it will take a while to propagate. The