Help save net neutrality! Learn more.
Close

#161 When introspecting, limit how much introspection you do

v3.0
closed-fixed
inspection (59)
5
2007-02-14
2007-02-06
No

This item is in the todo list of epydoc/__init__.py

When introspecting, limit how much introspection you do (eg, don't construct docs for imported modules' vars if it's not necessary)

running epydoc on the twisted package, the following modules appear in the modules list:

OpenSSL.SSL
base64
binascii
cStringIO
calendar
cgi
fcntl
grp
math
os
pty
pwd
socket
syslog
tempfile
thread
threading
time

also, in the objects list there is stuff like bool and dict. I'll have some debug session to try to understand how such objects end up in the documented api.

Discussion

  • Edward Loper

    Edward Loper - 2007-02-14

    Logged In: YES
    user_id=195958
    Originator: NO

    Here's a minimal test case that generates the problem:

    import cStringIO
    StringIO = cStringIO

    The problem disappears if either --parse-only or --introspect-only is used.

     
  • Edward Loper

    Edward Loper - 2007-02-14

    Logged In: YES
    user_id=195958
    Originator: NO

    The test case I gave can be fixed by setting MERGE_PRECEDENCE['is_imported'] to 'introspect'. I believe that this is the right thing to do -- if the introspecter assigns a value to is_imported, then it's very likely that it's the correct value. For variables where the introspector can't tell, it wil assign UNKNOWN, so the parser's value will get used.

     
  • Edward Loper

    Edward Loper - 2007-02-14

    Logged In: YES
    user_id=195958
    Originator: NO

    Fixed in rev1493. (Changed MERGE_PRECEDENCE['is_imported'] to introspect)

     
  • Edward Loper

    Edward Loper - 2007-02-14
    • status: open --> closed-fixed
     

Log in to post a comment.