[Pyobjc-dev] Problems documenting API using code introspection tools
Brought to you by:
ronaldoussoren
From: Dinu G. <gh...@da...> - 2003-07-29 18:07:44
|
Hi, when epydoc 2.0 was announced I immediately tried it on PyObjC, but as it seems it always fails doing proper code introspection for some parts of the code tree. I'm attaching a log of sample run below. I am pretty sure this is not a bug in epydoc and Edward Loper can't do any debugging without having a Mac, I guess. I'm making a wild estimate that there is too much magic going on in the __init__ files. Has anybody else succedeed in using a tool like epydoc (maybe pydoc) on the PyObjC code base? Thanks, Dinu PS: http://epydoc.sourceforge.net/ [localhost:python2.2/site-packages/PyObjC] dinu% ll total 280 drwxr-xr-x 13 dinu staff 442 Jul 29 19:57 Foundation/ drwxr-xr-x 5 dinu staff 170 Jul 23 12:55 PreferencePanes/ drwxr-xr-x 15 dinu staff 510 Jul 23 12:55 PyObjCTools/ drwxr-xr-x 17 dinu staff 578 Jul 23 12:55 ./ -rw-r--r-- 1 dinu staff 124 Jul 23 12:55 __init__.pyc -rw-r--r-- 1 dinu staff 0 Jul 23 12:54 __init__.py drwxr-xr-x 58 dinu staff 1972 Jul 22 08:44 ../ drwxr-xr-x 4 root staff 136 Jun 18 14:52 ScreenSaver/ drwxr-xr-x 7 dinu staff 238 Jun 18 14:52 InterfaceBuilder/ drwxr-xr-x 8 dinu staff 272 Jun 18 14:52 AddressBook/ drwxr-xr-x 17 dinu staff 578 Jun 18 14:52 AppKit/ drwxr-xr-x 14 dinu staff 476 Jun 18 14:52 objc/ -rwxr-xr-x 1 root staff 43932 Jun 18 14:51 autoGIL.so* -rw-r--r-- 1 dinu staff 30760 May 30 20:09 bundlebuilder.pyc -rw-r--r-- 1 root staff 24310 May 6 15:49 bundlebuilder.py -rw-r--r-- 1 dinu staff 22592 May 2 21:57 plistlib.pyc -rw-r--r-- 1 dinu staff 10843 Nov 22 2002 plistlib.py [localhost:python2.2/site-packages/PyObjC] dinu% [localhost:python2.2/site-packages/PyObjC] dinu% [localhost:python2.2/site-packages/PyObjC] dinu% sudo epydoc --debug --pdf Foundation/ Password: Importing 23 modules. [.......................] Building API documentation for 23 modules. [.... Warning: UID conflict detected: Foundation.NSStringFromClass Warning: UID conflict detected: Foundation.NSSelectorFromString ...Traceback (most recent call last): File "/usr/bin/epydoc", line 8, in ? cli() File "/usr/lib/python2.2/site-packages/epydoc/cli.py", line 90, in cli docmap = _make_docmap(modules, options) File "/usr/lib/python2.2/site-packages/epydoc/cli.py", line 455, in _make_docmap try: d.add(module) File "/usr/lib/python2.2/site-packages/epydoc/objdoc.py", line 2837, in add self._add(objID) File "/usr/lib/python2.2/site-packages/epydoc/objdoc.py", line 2850, in _add self._add(link.target()) File "/usr/lib/python2.2/site-packages/epydoc/objdoc.py", line 2843, in _add self.add_one(objID) File "/usr/lib/python2.2/site-packages/epydoc/objdoc.py", line 2786, in add_one self.data[objID] = ClassDoc(objID, self._verbosity) File "/usr/lib/python2.2/site-packages/epydoc/objdoc.py", line 1514, in __init__ self._base_order = [make_uid(b) for b in base_order] File "/usr/lib/python2.2/site-packages/epydoc/uid.py", line 726, in make_uid uid = ObjectUID(object) File "/usr/lib/python2.2/site-packages/epydoc/uid.py", line 399, in __init__ name = self._findname() File "/usr/lib/python2.2/site-packages/epydoc/uid.py", line 448, in _findname objname = obj.__name__ AttributeError: No attribute __name__ -- Dinu C. Gherman ...................................................................... "I am a gentlemen: I live by robbing the poor." (George Bernard Shaw) |