Hi, I think the explanation is the following : The only "module" directive of the rst source file is .. module:: logging. There is no "currentmodule" anywhere. So the current module is "logging". When documenting the DatagramHandler class, the source code is :
.. class:: DatagramHandler(host, port) So Sphinx assume the class is in the current module, logging. To have the correct path, one should have write : .. class:: handlers.DatagramHandler(host, port) OR, somewhere before the class directive : .. currentmodule:: logging.handlers Regards, Christophe 2008/12/30 Vinay Sajip <[email protected]>: > > A post on c.l.py drew my attention to a slight problem with the Sphinx > documentation for the Python logging package. Some of the logging > handler classes are defined in the logging.handlers subpackage. From a > source markup of e.g. > > .. class:: DatagramHandler(host, port) > > The generated HTML documentation renders as > > logging.DatagramHandler > > (see http://docs.python.org/library/logging.html#logging.DatagramHandler > for the actual result) > > and this has caused some confusion which led to the c.l.py post at > > http://tinyurl.com/8lhh7q > > Is this because there is something wrong with the markup, or is it a > Sphinx limitation or configuration problem? I did search for > "subpackage" on sphinx.pocoo.org and on this group, without success. > > Regards, > > Vinay Sajip > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---
