epydoc-commits Mailing List for Python API documentation generation tool (Page 6)
Brought to you by:
edloper
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(77) |
May
|
Jun
(6) |
Jul
(8) |
Aug
(91) |
Sep
(67) |
Oct
(4) |
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(17) |
Feb
(135) |
Mar
(25) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
|
Sep
(62) |
Oct
(1) |
Nov
(3) |
Dec
|
2008 |
Jan
(40) |
Feb
(102) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ed...@us...> - 2008-01-30 03:39:24
|
Revision: 1687 http://epydoc.svn.sourceforge.net/epydoc/?rev=1687&view=rev Author: edloper Date: 2008-01-29 19:39:22 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Updated webpage index: api docs are now for py2.5 Modified Paths: -------------- trunk/epydoc/doc/index.html Modified: trunk/epydoc/doc/index.html =================================================================== --- trunk/epydoc/doc/index.html 2008-01-30 03:25:49 UTC (rev 1686) +++ trunk/epydoc/doc/index.html 2008-01-30 03:39:22 UTC (rev 1687) @@ -26,7 +26,7 @@ <a href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>, Javadoc, and plaintext. For a more extensive example of epydoc's output, see the API documentation for <a -href="http://epydoc.sourceforge.net/stdlib/">Python 2.4</a>. </p> +href="http://epydoc.sourceforge.net/stdlib/">Python 2.5</a>. </p> </div> <!-- ================= Documentation ================= --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 03:25:51
|
Revision: 1686 http://epydoc.svn.sourceforge.net/epydoc/?rev=1686&view=rev Author: edloper Date: 2008-01-29 19:25:49 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Updated index page for 3.0 Modified Paths: -------------- trunk/epydoc/doc/index.html Modified: trunk/epydoc/doc/index.html =================================================================== --- trunk/epydoc/doc/index.html 2008-01-30 01:56:08 UTC (rev 1685) +++ trunk/epydoc/doc/index.html 2008-01-30 03:25:49 UTC (rev 1686) @@ -93,18 +93,13 @@ <div class="box"> <h2 class="box-title">Latest Release</h2> -<ul> -<li> The latest testing release is <a href="http://sourceforge.net/project/platformdownload.php?group_id=32455">Epydoc 3.0 beta 1</a>. </li> - -<li>The -latest stable release is <a href="http://sourceforge.net/project/showfiles.php?group_id=32455&package_id=24617&release_id=225095">Epydoc 2.1</a>. </li> -</ul> - -<p> Both can be -downloaded from the <a -href="http://sourceforge.net/project/showfiles.php?group_id=32455">SourceForge -download page</a>. See <a href="installing.html">Installing -Epydoc</a> for more information. </p> +<p> The latest stable release is <a +href="http://sourceforge.net/project/platformdownload.php?group_id=32455" +>Epydoc 3.0</a>. If you wish to keep up on the latest developments, +you can also get epydoc from the <a +href="installing.html#subversion">subversion repository</a>. See <a +href="installing.html">Installing Epydoc</a> for more +information. </p> </div> <!-- ================= Screenshots ================= --> @@ -130,12 +125,13 @@ <div class="box"> <h2 class="box-title">News</h2> -<p><b>Epydoc 3.0 beta 1 released [February 2007]</b></br /> The first -beta release of epydoc 3.0 is now available on the <a -href="http://sourceforge.net/project/platformdownload.php?group_id=32455">SourceForge -download page</a>. See the <a href="whatsnew.html">What's New</a> -page for details. Epydoc is under active development; if you wish to -keep up on the latest developments, you can get epydoc from the <a +<p><b>Epydoc 3.0 released [January 2008]</b><br /> Epydoc version 3.0 is now +available on the <a +href="http://sourceforge.net/project/platformdownload.php?group_id=32455" +>SourceForge download page</a>. See the <a +href="whatsnew.html">What's New</a> page for details. Epydoc is under +active development; if you wish to keep up on the latest developments, +you can get epydoc from the <a href="installing.html#subversion">subversion repository</a>. If you find any bugs, or have suggestions for improving it, please report them on sourceforge.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 01:56:09
|
Revision: 1685 http://epydoc.svn.sourceforge.net/epydoc/?rev=1685&view=rev Author: edloper Date: 2008-01-29 17:56:08 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Updated version string to 3.0 Modified Paths: -------------- trunk/epydoc/doc/installing.html trunk/epydoc/doc/manual-install.txt trunk/epydoc/doc/whatsnew.html Modified: trunk/epydoc/doc/installing.html =================================================================== --- trunk/epydoc/doc/installing.html 2008-01-30 01:55:13 UTC (rev 1684) +++ trunk/epydoc/doc/installing.html 2008-01-30 01:56:08 UTC (rev 1685) @@ -83,13 +83,13 @@ <div class="screen"><pre> <code class="prompt">[/tmp]$</code> <code class="user">su</code> Password: -<code class="prompt">[/tmp]#</code> <code class="user">rpm -i epydoc-3.0beta1.noarch.rpm</code> +<code class="prompt">[/tmp]#</code> <code class="user">rpm -i epydoc-3.0.noarch.rpm</code> </pre></div></li> <li> Once epydoc is installed, you can delete the RPM file. <div class="screen"><pre> -<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0beta1.rpm</code> +<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0.rpm</code> </pre></div> </li> </ol> @@ -97,7 +97,7 @@ <h2> Installing from the Windows Installer </h2> <ol> - <li> Download and run <code>epydoc-3.0beta1.win32.exe</code>. </li> + <li> Download and run <code>epydoc-3.0.win32.exe</code>. </li> <li> Follow the on-screen instructions. Epydoc will be installed in the <code>epydoc</code> subdirectory of your Python installation directory (typically <code>C:\Python23\</code>). </li> @@ -109,7 +109,7 @@ scripts to more convenient locations (such as your desktop or start menu). </li> <li> Once epydoc is installed, you can delete - <code>epydoc-3.0beta1.win32.exe</code>. </li> + <code>epydoc-3.0.win32.exe</code>. </li> </ol> <a name="src"></a> @@ -120,19 +120,19 @@ to a directory of your choice, and uncompress it. <div class="screen"><pre> -<code class="prompt">[/tmp]$</code> <code class="user">wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0beta1.tar.gz</code> -<code class="prompt">[/tmp]$</code> <code class="user">gunzip epydoc-3.0beta1.tar.gz</code> -<code class="prompt">[/tmp]$</code> <code class="user">tar -xvf epydoc-3.0beta1.tar</code> +<code class="prompt">[/tmp]$</code> <code class="user">wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.tar.gz</code> +<code class="prompt">[/tmp]$</code> <code class="user">gunzip epydoc-3.0.tar.gz</code> +<code class="prompt">[/tmp]$</code> <code class="user">tar -xvf epydoc-3.0.tar</code> </pre></div></li> - <li> Use "<code>make install</code>" in the <code>eydoc-3.0beta1/</code> + <li> Use "<code>make install</code>" in the <code>eydoc-3.0/</code> directory to install epydoc. <div class="screen"><pre> -<code class="prompt">[/tmp]$</code> <code class="user">cd epydoc-3.0beta1/</code> -<code class="prompt">[/tmp/epydoc-3.0beta1]$</code> <code class="user">su</code> +<code class="prompt">[/tmp]$</code> <code class="user">cd epydoc-3.0/</code> +<code class="prompt">[/tmp/epydoc-3.0]$</code> <code class="user">su</code> Password: -<code class="prompt">[/tmp/epydoc-3.0beta1]#</code> <code class="user">make install</code> +<code class="prompt">[/tmp/epydoc-3.0]#</code> <code class="user">make install</code> running install running build <i>[...]</i> @@ -150,16 +150,16 @@ running "<code>make installdocs</code>". <div class="screen"><pre> -<code class="prompt">[/tmp/epydoc-3.0beta1]#</code> <code class="user">make installdocs</code> +<code class="prompt">[/tmp/epydoc-3.0]#</code> <code class="user">make installdocs</code> </pre></div></li> <li> Once epydoc is installed, you can delete the installation directory and the source distribution file. <div class="screen"><pre> -<code class="prompt">[/tmp/epydoc-3.0beta1]#</code> <code class="user">cd ..</code> -<code class="prompt">[/tmp]#</code> <code class="user">rm -r epydoc-3.0beta1</code> -<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0beta1.tar</code> +<code class="prompt">[/tmp/epydoc-3.0]#</code> <code class="user">cd ..</code> +<code class="prompt">[/tmp]#</code> <code class="user">rm -r epydoc-3.0</code> +<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0.tar</code> </pre></div> </li> </ol> @@ -171,25 +171,25 @@ to a directory of your choice, and uncompress it. <div class="screen"><pre> -<code class="prompt">[/tmp]$</code> <code class="user">wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0beta1.tar.gz</code> -<code class="prompt">[/tmp]$</code> <code class="user">gunzip epydoc-3.0beta1.tar.gz</code> -<code class="prompt">[/tmp]$</code> <code class="user">tar -xvf epydoc-3.0beta1.tar</code> +<code class="prompt">[/tmp]$</code> <code class="user">wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.tar.gz</code> +<code class="prompt">[/tmp]$</code> <code class="user">gunzip epydoc-3.0.tar.gz</code> +<code class="prompt">[/tmp]$</code> <code class="user">tar -xvf epydoc-3.0.tar</code> </pre></div></li> <li> Use the <code>setup.py</code> script in the - <code>eydoc-3.0beta1/</code> directory to install epydoc. + <code>eydoc-3.0/</code> directory to install epydoc. <div class="screen"><pre> -<code class="prompt">[/tmp]$</code> <code class="user">cd epydoc-3.0beta1/</code> -<code class="prompt">[/tmp/epydoc-3.0beta1]$</code> <code class="user">su</code> +<code class="prompt">[/tmp]$</code> <code class="user">cd epydoc-3.0/</code> +<code class="prompt">[/tmp/epydoc-3.0]$</code> <code class="user">su</code> Password: -<code class="prompt">[/tmp/epydoc-3.0beta1]#</code> <code class="user">python setup.py install</code> +<code class="prompt">[/tmp/epydoc-3.0]#</code> <code class="user">python setup.py install</code> running install running build <i>[...]</i> copying build/scripts/epydoc -> /usr/bin changing mode of /usr/bin/epydoc to 100775 -<code class="prompt">[/tmp/epydoc-3.0beta1]#</code> <code class="user">cd ..</code> +<code class="prompt">[/tmp/epydoc-3.0]#</code> <code class="user">cd ..</code> <code class="prompt">[/tmp]#</code> </pre></div></li> @@ -199,16 +199,16 @@ as <code>/usr/share/man/</code>. <div class="screen"><pre> -<code class="prompt">[/tmp]#</code> <code class="user">cp -r epydoc-3.0beta1/doc/ /usr/share/doc/epydoc/</code> -<code class="prompt">[/tmp]#</code> <code class="user">cp epydoc-3.0beta1/man/* /usr/share/man/</code> +<code class="prompt">[/tmp]#</code> <code class="user">cp -r epydoc-3.0/doc/ /usr/share/doc/epydoc/</code> +<code class="prompt">[/tmp]#</code> <code class="user">cp epydoc-3.0/man/* /usr/share/man/</code> </pre></div> </li> <li> Once epydoc is installed, you can delete the installation directory and the source distribution file. <div class="screen"><pre> -<code class="prompt">[/tmp]#</code> <code class="user">rm -r epydoc-3.0beta1</code> -<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0beta1.tar</code> +<code class="prompt">[/tmp]#</code> <code class="user">rm -r epydoc-3.0</code> +<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0.tar</code> </pre></div> </li> </ol> Modified: trunk/epydoc/doc/manual-install.txt =================================================================== --- trunk/epydoc/doc/manual-install.txt 2008-01-30 01:55:13 UTC (rev 1684) +++ trunk/epydoc/doc/manual-install.txt 2008-01-30 01:56:08 UTC (rev 1685) @@ -55,17 +55,17 @@ [/tmp]$ su Password: - [/tmp]# rpm -i epydoc-3.0beta1.noarch.rpm + [/tmp]# rpm -i epydoc-3.0.noarch.rpm 3. Once epydoc is installed, you can delete the RPM file. :: - [/tmp]# rm epydoc-3.0beta1.rpm + [/tmp]# rm epydoc-3.0.rpm Installing from the Windows Installer ------------------------------------- -1. Download and run ``epydoc-3.0beta1.win32.exe``. +1. Download and run ``epydoc-3.0.win32.exe``. 2. Follow the on-screen instructions. Epydoc will be installed in the epydoc subdirectory of your Python installation directory (typically ``C:\Python24\``). @@ -74,7 +74,7 @@ interface, and ``epydoc.py`` calls the command line interface. If you'd like, you can create shortcuts from these scripts to more convenient locations (such as your desktop or start menu). -4. Once epydoc is installed, you can delete ``epydoc-3.0beta1.win32.exe``. +4. Once epydoc is installed, you can delete ``epydoc-3.0.win32.exe``. Installing from the Source Distribution (using make) @@ -83,17 +83,17 @@ 1. Download an epydoc source distribution to a directory of your choice, and uncompress it. :: - [/tmp]$ wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0beta1.tar.gz - [/tmp]$ gunzip epydoc-3.0beta1.tar.gz - [/tmp]$ tar -xvf epydoc-3.0beta1.tar + [/tmp]$ wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.tar.gz + [/tmp]$ gunzip epydoc-3.0.tar.gz + [/tmp]$ tar -xvf epydoc-3.0.tar -2. Use ``make install`` in the ``eydoc-3.0beta1/`` directory to install +2. Use ``make install`` in the ``eydoc-3.0/`` directory to install epydoc. :: - [/tmp]$ cd epydoc-3.0beta1/ - [/tmp/epydoc-3.0beta1]$ su + [/tmp]$ cd epydoc-3.0/ + [/tmp/epydoc-3.0]$ su Password: - [/tmp/epydoc-3.0beta1]# make install + [/tmp/epydoc-3.0]# make install running install running build [...] @@ -107,14 +107,14 @@ ``/usr/lib/doc``), then edit the ``MAN`` and ``DOC`` variables at the top of ``Makefile`` before running ``make installdocs``. :: - [/tmp/epydoc-3.0beta1]# make installdocs + [/tmp/epydoc-3.0]# make installdocs 4. Once epydoc is installed, you can delete the installation directory and the source distribution file. :: - [/tmp/epydoc-3.0beta1]# cd .. - [/tmp]# rm -r epydoc-3.0beta1 - [/tmp]# rm epydoc-3.0beta1.tar + [/tmp/epydoc-3.0]# cd .. + [/tmp]# rm -r epydoc-3.0 + [/tmp]# rm epydoc-3.0.tar Installing from the Source Distribution (without make) @@ -123,37 +123,37 @@ 1. Download an epydoc source distribution to a directory of your choice, and uncompress it. :: - [/tmp]$ wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0beta1.tar.gz - [/tmp]$ gunzip epydoc-3.0beta1.tar.gz - [/tmp]$ tar -xvf epydoc-3.0beta1.tar + [/tmp]$ wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.tar.gz + [/tmp]$ gunzip epydoc-3.0.tar.gz + [/tmp]$ tar -xvf epydoc-3.0.tar -2. Use the ``setup.py`` script in the ``eydoc-3.0beta1/`` directory to install +2. Use the ``setup.py`` script in the ``eydoc-3.0/`` directory to install epydoc. :: - [/tmp]$ cd epydoc-3.0beta1/ - [/tmp/epydoc-3.0beta1]$ su + [/tmp]$ cd epydoc-3.0/ + [/tmp/epydoc-3.0]$ su Password: - [/tmp/epydoc-3.0beta1]# python setup.py install + [/tmp/epydoc-3.0]# python setup.py install running install running build [...] copying build/scripts/epydoc -> /usr/bin changing mode of /usr/bin/epydoc to 100775 - [/tmp/epydoc-3.0beta1]# cd .. + [/tmp/epydoc-3.0]# cd .. [/tmp]# 3. If you'd like to keep a local copy of the documentation, then copy it to a permanant location, such as ``/usr/share/doc/``. You may also want to copy the man pages to a permanant location, such as ``/usr/share/man/``. :: - [/tmp]# cp -r epydoc-3.0beta1/doc/ /usr/share/doc/epydoc/ - [/tmp]# cp epydoc-3.0beta1/man/* /usr/share/man/ + [/tmp]# cp -r epydoc-3.0/doc/ /usr/share/doc/epydoc/ + [/tmp]# cp epydoc-3.0/man/* /usr/share/man/ 4. Once epydoc is installed, you can delete the installation directory and the source distribution file. :: - [/tmp]# rm -r epydoc-3.0beta1 - [/tmp]# rm epydoc-3.0beta1.tar + [/tmp]# rm -r epydoc-3.0 + [/tmp]# rm epydoc-3.0.tar Installing on Debian Modified: trunk/epydoc/doc/whatsnew.html =================================================================== --- trunk/epydoc/doc/whatsnew.html 2008-01-30 01:55:13 UTC (rev 1684) +++ trunk/epydoc/doc/whatsnew.html 2008-01-30 01:56:08 UTC (rev 1685) @@ -10,8 +10,8 @@ <h1> What's New in Epydoc </h1> <div class="box"> -<h2 class="box-title">Epydoc 3.0 (beta)</h2> -<center><i>Beta 1 released February, 2007</i></center> +<h2 class="box-title">Epydoc 3.0</h2> +<center><i>Released January, 2008</i></center> <h3>Support for Parsing & Introspection</h3> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 01:55:15
|
Revision: 1684 http://epydoc.svn.sourceforge.net/epydoc/?rev=1684&view=rev Author: edloper Date: 2008-01-29 17:55:13 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Updated version string Modified Paths: -------------- trunk/epydoc/src/epydoc/__init__.py Modified: trunk/epydoc/src/epydoc/__init__.py =================================================================== --- trunk/epydoc/src/epydoc/__init__.py 2008-01-29 22:17:39 UTC (rev 1683) +++ trunk/epydoc/src/epydoc/__init__.py 2008-01-30 01:55:13 UTC (rev 1684) @@ -167,7 +167,7 @@ :author: `Edward Loper <ed...@gr...>`__ :requires: Python 2.3+ -:version: 3.0 beta 1 +:version: 3.0 :see: `The epydoc webpage <http://epydoc.sourceforge.net>`__ :see: `The epytext markup language manual <http://epydoc.sourceforge.net/epytext.html>`__ @@ -200,7 +200,7 @@ """ __docformat__ = 'restructuredtext en' -__version__ = '3.0beta1' +__version__ = '3.0' """The version of epydoc""" __author__ = 'Edward Loper <ed...@gr...>' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 22:17:43
|
Revision: 1683 http://epydoc.svn.sourceforge.net/epydoc/?rev=1683&view=rev Author: edloper Date: 2008-01-29 14:17:39 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Fixed bug that prevented overridden methods from inerhiting info - Expanded special case of overridden extension methods to cover the cases where the overriding or overriden method have type method_descriptor. Modified Paths: -------------- trunk/epydoc/src/epydoc/docbuilder.py Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 21:06:38 UTC (rev 1682) +++ trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 22:17:39 UTC (rev 1683) @@ -1294,8 +1294,7 @@ # that shadows var_doc. But if class_doc's var is # local, then record the fact that it overrides # var_doc. - elif (class_doc.variables[name].container==class_doc and - class_doc.variables[name].overrides is UNKNOWN): + elif class_doc.variables[name].container==class_doc: class_doc.variables[name].overrides = var_doc _inherit_info(class_doc.variables[name]) @@ -1304,6 +1303,8 @@ 'type_descr', 'arg_descrs', 'arg_types', 'return_descr', 'return_type', 'exception_descrs'] +_method_descriptor = type(list.append) + def _inherit_info(var_doc): """ Copy any relevant documentation information from the variable that @@ -1313,25 +1314,25 @@ src_val = var_doc.overrides.value val_doc = var_doc.value - # If the new variable has a docstring, then don't inherit - # anything, even if the docstring is blank. - if var_doc.docstring not in (None, UNKNOWN): - inherited_attribs = set() - else: - inherited_attribs = set(_INHERITED_ATTRIBS) - # Special case: if the source value and target values are both c # extension methods, and the target value's signature is not # specified, then inherit the source value's signature. if (isinstance(val_doc, RoutineDoc) and isinstance(src_val, RoutineDoc) and - inspect.isbuiltin(val_doc.pyval) and - inspect.isbuiltin(src_val.pyval) and + (inspect.isbuiltin(val_doc.pyval) or + isinstance(val_doc.pyval, _method_descriptor)) and + (inspect.isbuiltin(src_val.pyval) or + isinstance(src_val.pyval, _method_descriptor)) and val_doc.all_args() in (['...'], UNKNOWN) and src_val.all_args() not in (['...'], UNKNOWN)): - inherited_attribs.update(['posargs', 'posarg_defaults', 'vararg', - 'kwarg', 'return_type']) + for attrib in ['posargs', 'posarg_defaults', 'vararg', + 'kwarg', 'return_type']: + setattr(val_doc, attrib, getattr(src_val, attrib)) + # If the new variable has a docstring, then don't inherit + # anything, even if the docstring is blank. + if var_doc.docstring not in (None, UNKNOWN): + return # [xx] Do I want a check like this:? # # If it's a method and the signature doesn't match well enough, # # then give up. @@ -1346,7 +1347,7 @@ # return # Inherit attributes! - for attrib in inherited_attribs: + for attrib in _INHERITED_ATTRIBS: if (hasattr(var_doc, attrib) and hasattr(src_var, attrib) and getattr(src_var, attrib) not in (None, UNKNOWN)): setattr(var_doc, attrib, getattr(src_var, attrib)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 21:07:30
|
Revision: 1682 http://epydoc.svn.sourceforge.net/epydoc/?rev=1682&view=rev Author: edloper Date: 2008-01-29 13:06:38 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Removed generator expression (for compatibility with py2.3) Modified Paths: -------------- trunk/epydoc/src/epydoc/docbuilder.py Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 19:37:51 UTC (rev 1681) +++ trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 21:06:38 UTC (rev 1682) @@ -1030,8 +1030,8 @@ if (n1 != n2) and (n2 != []): log.info('Introspector & parser disagree about submodules ' 'for %s: (%s) vs (%s)' % (path, - ', '.join(str(n) for n in n1), - ', '.join(str(n) for n in n2))) + ', '.join([str(n) for n in n1]), + ', '.join([str(n) for n in n2]))) return v1 + [m for m in v2 if m.canonical_name not in n1] return v1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 19:37:53
|
Revision: 1681 http://epydoc.svn.sourceforge.net/epydoc/?rev=1681&view=rev Author: edloper Date: 2008-01-29 11:37:51 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Changed warning when introspector & parser disagree about submodules to an info log statement. Modified Paths: -------------- trunk/epydoc/src/epydoc/docbuilder.py Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 17:28:22 UTC (rev 1680) +++ trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 19:37:51 UTC (rev 1681) @@ -1028,10 +1028,10 @@ n1 = sorted([m.canonical_name for m in v1]) n2 = sorted([m.canonical_name for m in v2]) if (n1 != n2) and (n2 != []): - log.warning('Introspector & parser disagree about submodules ' - 'for %s: (%s) vs (%s)' % (path, - ', '.join(str(n) for n in n1), - ', '.join(str(n) for n in n2))) + log.info('Introspector & parser disagree about submodules ' + 'for %s: (%s) vs (%s)' % (path, + ', '.join(str(n) for n in n1), + ', '.join(str(n) for n in n2))) return v1 + [m for m in v2 if m.canonical_name not in n1] return v1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 17:29:26
|
Revision: 1680 http://epydoc.svn.sourceforge.net/epydoc/?rev=1680&view=rev Author: edloper Date: 2008-01-29 09:28:22 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Updated doctests for APIDoc Modified Paths: -------------- trunk/epydoc/src/epydoc/test/apidoc.doctest Modified: trunk/epydoc/src/epydoc/test/apidoc.doctest =================================================================== --- trunk/epydoc/src/epydoc/test/apidoc.doctest 2008-01-29 17:28:03 UTC (rev 1679) +++ trunk/epydoc/src/epydoc/test/apidoc.doctest 2008-01-29 17:28:22 UTC (rev 1680) @@ -7,6 +7,8 @@ Python program is encoded using a graph of `APIDoc` objects, each of which encodes information about a single Python variable or value. + >>> import epydoc; epydoc.DEBUG = True + >>> from epydoc.apidoc import * >>> from epydoc.test.util import print_warnings @@ -158,12 +160,15 @@ >>> DottedName() Traceback (most recent call last): InvalidDottedName: Empty DottedName - >>> DottedName('1+2') + >>> DottedName('1+2', strict=True) Traceback (most recent call last): InvalidDottedName: Bad identifier '1+2' >>> DottedName({}) Traceback (most recent call last): TypeError: Bad identifier {}: expected DottedName or str + >>> DottedName('1+2', strict=False) + Identifier '1+2' looks suspicious; using it anyway. + DottedName('1+2') The one exception is that '??' is treated as if it were a valid python identifier: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 17:28:04
|
Revision: 1679 http://epydoc.svn.sourceforge.net/epydoc/?rev=1679&view=rev Author: edloper Date: 2008-01-29 09:28:03 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Fixed bug: valdocs was used before it was defined Modified Paths: -------------- trunk/epydoc/src/epydoc/docbuilder.py Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 17:21:29 UTC (rev 1678) +++ trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 17:28:03 UTC (rev 1679) @@ -254,6 +254,8 @@ # Set overrides pointers log.start_progress('Checking for overridden methods') + valdocs = sorted(docindex.reachable_valdocs( + imports=False, submodules=False, packages=False, subclasses=False)) for i, val_doc in enumerate(valdocs): if isinstance(val_doc, ClassDoc): percent = float(i)/len(valdocs) @@ -263,8 +265,6 @@ # Parse the docstrings for each object. log.start_progress('Parsing docstrings') - valdocs = sorted(docindex.reachable_valdocs( - imports=False, submodules=False, packages=False, subclasses=False)) suppress_warnings = set(valdocs).difference( docindex.reachable_valdocs( imports=False, submodules=False, packages=False, subclasses=False, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 17:21:31
|
Revision: 1678 http://epydoc.svn.sourceforge.net/epydoc/?rev=1678&view=rev Author: edloper Date: 2008-01-29 09:21:29 -0800 (Tue, 29 Jan 2008) Log Message: ----------- Fixed spelling error (supress -> suppress) Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py trunk/epydoc/src/epydoc/docbuilder.py trunk/epydoc/src/epydoc/docintrospecter.py trunk/epydoc/src/epydoc/docstringparser.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-01-29 17:16:38 UTC (rev 1677) +++ trunk/epydoc/src/epydoc/cli.py 2008-01-29 17:21:29 UTC (rev 1678) @@ -792,13 +792,13 @@ else: print >>sys.stderr, '\nUnsupported action %s!' % options.action - # If we supressed docstring warnings, then let the user know. - if logger is not None and logger.supressed_docstring_warning: - if logger.supressed_docstring_warning == 1: + # If we suppressed docstring warnings, then let the user know. + if logger is not None and logger.suppressed_docstring_warning: + if logger.suppressed_docstring_warning == 1: prefix = '1 markup error was found' else: prefix = ('%d markup errors were found' % - logger.supressed_docstring_warning) + logger.suppressed_docstring_warning) log.warning("%s while processing docstrings. Use the verbose " "switch (-v) to display markup errors." % prefix) @@ -1125,7 +1125,7 @@ etc) that have been reported. It is used by the options --fail-on-warning etc to determine the return value.""" - self.supressed_docstring_warning = 0 + self.suppressed_docstring_warning = 0 """This variable will be incremented once every time a docstring warning is reported tothe logger, but the verbosity level is too low for it to be displayed.""" @@ -1202,7 +1202,7 @@ message = self._format(' Debug: ', message, self.term.CYAN) else: if level >= log.DOCSTRING_WARNING: - self.supressed_docstring_warning += 1 + self.suppressed_docstring_warning += 1 return self._report(message) Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 17:16:38 UTC (rev 1677) +++ trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 17:21:29 UTC (rev 1678) @@ -265,14 +265,14 @@ log.start_progress('Parsing docstrings') valdocs = sorted(docindex.reachable_valdocs( imports=False, submodules=False, packages=False, subclasses=False)) - supress_warnings = set(valdocs).difference( + suppress_warnings = set(valdocs).difference( docindex.reachable_valdocs( imports=False, submodules=False, packages=False, subclasses=False, bases=False, overrides=True)) for i, val_doc in enumerate(valdocs): _report_valdoc_progress(i, val_doc, valdocs) # the value's docstring - parse_docstring(val_doc, docindex, supress_warnings) + parse_docstring(val_doc, docindex, suppress_warnings) # the value's variables' docstrings if (isinstance(val_doc, NamespaceDoc) and val_doc.variables not in (None, UNKNOWN)): @@ -283,7 +283,7 @@ if (isinstance(var_doc.value, ValueDoc) and var_doc.value.defining_module is UNKNOWN): var_doc.value.defining_module = val_doc.defining_module - parse_docstring(var_doc, docindex, supress_warnings) + parse_docstring(var_doc, docindex, suppress_warnings) log.end_progress() # Take care of inheritance. @@ -422,7 +422,7 @@ try: _, parse_docs = _get_docs_from_pyname( str(introspect_doc.canonical_name), options, - progress_estimator, supress_warnings=True) + progress_estimator, suppress_warnings=True) finally: options.introspect = prev_introspect @@ -437,7 +437,7 @@ return (introspect_doc, parse_doc) def _get_docs_from_pyname(name, options, progress_estimator, - supress_warnings=False): + suppress_warnings=False): progress_estimator.complete += 1 if options.must_introspect(name) or options.must_parse(name): log.progress(progress_estimator.progress(), name) @@ -460,7 +460,7 @@ pass # Report any errors we encountered. - if not supress_warnings: + if not suppress_warnings: _report_errors(name, introspect_doc, parse_doc, introspect_error, parse_error) @@ -1247,7 +1247,7 @@ """ Set the C{overrides} attribute for all variables in C{class_doc}. This needs to be done early (before docstring parsing), so we can - know which docstrings to supress warnings for. + know which docstrings to suppress warnings for. """ for base_class in list(class_doc.mro(warn_about_bad_bases=True)): if base_class == class_doc: continue Modified: trunk/epydoc/src/epydoc/docintrospecter.py =================================================================== --- trunk/epydoc/src/epydoc/docintrospecter.py 2008-01-29 17:16:38 UTC (rev 1677) +++ trunk/epydoc/src/epydoc/docintrospecter.py 2008-01-29 17:21:29 UTC (rev 1678) @@ -893,7 +893,7 @@ """ Run the given callable in a 'sandboxed' environment. Currently, this includes saving and restoring the contents of - sys and __builtins__; and supressing stdin, stdout, and stderr. + sys and __builtins__; and suppressing stdin, stdout, and stderr. """ # Note that we just do a shallow copy of sys. In particular, # any changes made to sys.modules will be kept. But we do @@ -908,7 +908,7 @@ # in get_value_from_filename might get overwritten sys.path.append('') - # Supress input and output. (These get restored when we restore + # Suppress input and output. (These get restored when we restore # sys to old_sys). sys.stdin = sys.stdout = sys.stderr = _dev_null sys.__stdin__ = sys.__stdout__ = sys.__stderr__ = _dev_null Modified: trunk/epydoc/src/epydoc/docstringparser.py =================================================================== --- trunk/epydoc/src/epydoc/docstringparser.py 2008-01-29 17:16:38 UTC (rev 1677) +++ trunk/epydoc/src/epydoc/docstringparser.py 2008-01-29 17:21:29 UTC (rev 1678) @@ -167,7 +167,7 @@ # asked to process one twice? e.g., for @include we might have to # parse the included docstring earlier than we might otherwise..?? -def parse_docstring(api_doc, docindex, supress_warnings=[]): +def parse_docstring(api_doc, docindex, suppress_warnings=[]): """ Process the given C{APIDoc}'s docstring. In particular, populate the C{APIDoc}'s C{descr} and C{summary} attributes, and add any @@ -176,8 +176,8 @@ @param docindex: A DocIndex, used to find the containing module (to look up the docformat); and to find any user docfields defined by containing objects. - @param supress_warnings: A set of objects for which docstring - warnings should be supressed. + @param suppress_warnings: A set of objects for which docstring + warnings should be suppressed. """ if api_doc.metadata is not UNKNOWN: if not (isinstance(api_doc, RoutineDoc) @@ -231,7 +231,7 @@ initvar = api_doc.variables.get('__init__') if initvar and isinstance(initvar.value, RoutineDoc): init_api_doc = initvar.value - parse_docstring(init_api_doc, docindex, supress_warnings) + parse_docstring(init_api_doc, docindex, suppress_warnings) parse_function_signature(init_api_doc, api_doc, docformat, parse_errors) @@ -276,9 +276,9 @@ # vars/params? # Report any errors that occured - if api_doc in supress_warnings: + if api_doc in suppress_warnings: if parse_errors or field_warnings: - log.info("Supressing docstring warnings for %s, since it " + log.info("Suppressing docstring warnings for %s, since it " "is not included in the documented set." % api_doc.canonical_name) else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 17:17:05
|
Revision: 1677 http://epydoc.svn.sourceforge.net/epydoc/?rev=1677&view=rev Author: edloper Date: 2008-01-29 09:16:38 -0800 (Tue, 29 Jan 2008) Log Message: ----------- Supress docstring warnings for any objects that are not included in the documented set. This includes inherited values and variables, *unless* they are overridden, in which case the docstring may be inherited. Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py trunk/epydoc/src/epydoc/docbuilder.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-01-29 17:14:05 UTC (rev 1676) +++ trunk/epydoc/src/epydoc/cli.py 2008-01-29 17:16:38 UTC (rev 1677) @@ -667,6 +667,7 @@ 7, # Merging parsed & introspected information 1, # Linking imported variables 3, # Indexing documentation + 1, # Checking for overridden methods 30, # Parsing Docstrings 1, # Inheriting documentation 2] # Sorting & Grouping Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 17:14:05 UTC (rev 1676) +++ trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 17:16:38 UTC (rev 1677) @@ -198,7 +198,8 @@ options = BuildOptions(parse=parse, introspect=introspect, exclude_introspect=exclude_introspect, exclude_parse=exclude_parse, add_submodules=add_submodules) - except Exception: + except Exception, e: + # log.error already reported by constructor. return None # Get the basic docs for each item. @@ -251,14 +252,27 @@ assign_canonical_names(val_doc, val_doc.canonical_name, docindex) log.end_progress() + # Set overrides pointers + log.start_progress('Checking for overridden methods') + for i, val_doc in enumerate(valdocs): + if isinstance(val_doc, ClassDoc): + percent = float(i)/len(valdocs) + log.progress(percent, val_doc.canonical_name) + find_overrides(val_doc) + log.end_progress() + # Parse the docstrings for each object. log.start_progress('Parsing docstrings') valdocs = sorted(docindex.reachable_valdocs( imports=False, submodules=False, packages=False, subclasses=False)) + supress_warnings = set(valdocs).difference( + docindex.reachable_valdocs( + imports=False, submodules=False, packages=False, subclasses=False, + bases=False, overrides=True)) for i, val_doc in enumerate(valdocs): _report_valdoc_progress(i, val_doc, valdocs) # the value's docstring - parse_docstring(val_doc, docindex) + parse_docstring(val_doc, docindex, supress_warnings) # the value's variables' docstrings if (isinstance(val_doc, NamespaceDoc) and val_doc.variables not in (None, UNKNOWN)): @@ -269,7 +283,7 @@ if (isinstance(var_doc.value, ValueDoc) and var_doc.value.defining_module is UNKNOWN): var_doc.value.defining_module = val_doc.defining_module - parse_docstring(var_doc, docindex) + parse_docstring(var_doc, docindex, supress_warnings) log.end_progress() # Take care of inheritance. @@ -1229,6 +1243,24 @@ ## Documentation Inheritance ###################################################################### +def find_overrides(class_doc): + """ + Set the C{overrides} attribute for all variables in C{class_doc}. + This needs to be done early (before docstring parsing), so we can + know which docstrings to supress warnings for. + """ + for base_class in list(class_doc.mro(warn_about_bad_bases=True)): + if base_class == class_doc: continue + if base_class.variables is UNKNOWN: continue + for name, var_doc in base_class.variables.items(): + if ( not (name.startswith('__') and not name.endswith('__')) and + base_class == var_doc.container and + name in class_doc.variables and + class_doc.variables[name].container==class_doc and + class_doc.variables[name].overrides is UNKNOWN ): + class_doc.variables[name].overrides = var_doc + + def inherit_docs(class_doc): for base_class in list(class_doc.mro(warn_about_bad_bases=True)): if base_class == class_doc: continue This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 17:14:09
|
Revision: 1676 http://epydoc.svn.sourceforge.net/epydoc/?rev=1676&view=rev Author: edloper Date: 2008-01-29 09:14:05 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Added supress_warnings param for parse_docstrings -- contains a set of apidocs for which warnings should be supressed. Modified Paths: -------------- trunk/epydoc/src/epydoc/docstringparser.py Modified: trunk/epydoc/src/epydoc/docstringparser.py =================================================================== --- trunk/epydoc/src/epydoc/docstringparser.py 2008-01-29 17:12:56 UTC (rev 1675) +++ trunk/epydoc/src/epydoc/docstringparser.py 2008-01-29 17:14:05 UTC (rev 1676) @@ -167,7 +167,7 @@ # asked to process one twice? e.g., for @include we might have to # parse the included docstring earlier than we might otherwise..?? -def parse_docstring(api_doc, docindex): +def parse_docstring(api_doc, docindex, supress_warnings=[]): """ Process the given C{APIDoc}'s docstring. In particular, populate the C{APIDoc}'s C{descr} and C{summary} attributes, and add any @@ -176,11 +176,14 @@ @param docindex: A DocIndex, used to find the containing module (to look up the docformat); and to find any user docfields defined by containing objects. + @param supress_warnings: A set of objects for which docstring + warnings should be supressed. """ if api_doc.metadata is not UNKNOWN: if not (isinstance(api_doc, RoutineDoc) and api_doc.canonical_name[-1] == '__init__'): - log.debug("%s's docstring processed twice" % api_doc.canonical_name) + log.debug("%s's docstring processed twice" % + api_doc.canonical_name) return initialize_api_doc(api_doc) @@ -228,7 +231,7 @@ initvar = api_doc.variables.get('__init__') if initvar and isinstance(initvar.value, RoutineDoc): init_api_doc = initvar.value - parse_docstring(init_api_doc, docindex) + parse_docstring(init_api_doc, docindex, supress_warnings) parse_function_signature(init_api_doc, api_doc, docformat, parse_errors) @@ -273,7 +276,13 @@ # vars/params? # Report any errors that occured - report_errors(api_doc, docindex, parse_errors, field_warnings) + if api_doc in supress_warnings: + if parse_errors or field_warnings: + log.info("Supressing docstring warnings for %s, since it " + "is not included in the documented set." % + api_doc.canonical_name) + else: + report_errors(api_doc, docindex, parse_errors, field_warnings) def add_metadata_from_var(api_doc, field): for varname in field.varnames: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 17:13:08
|
Revision: 1675 http://epydoc.svn.sourceforge.net/epydoc/?rev=1675&view=rev Author: edloper Date: 2008-01-29 09:12:56 -0800 (Tue, 29 Jan 2008) Log Message: ----------- - Added 'overrides' filter, which is False by default. Modified Paths: -------------- trunk/epydoc/src/epydoc/apidoc.py Modified: trunk/epydoc/src/epydoc/apidoc.py =================================================================== --- trunk/epydoc/src/epydoc/apidoc.py 2008-01-29 06:03:36 UTC (rev 1674) +++ trunk/epydoc/src/epydoc/apidoc.py 2008-01-29 17:12:56 UTC (rev 1675) @@ -544,6 +544,8 @@ - C{subclasses}: Subclasses for classes. - C{variables}: All variables. - C{private}: Private variables. + - C{overrides}: Points from class variables to the variables + they override. This filter is False by default. """ return [] @@ -677,10 +679,16 @@ of the variable's container.""") def apidoc_links(self, **filters): + # nb: overrides filter is *False* by default. + if (filters.get('overrides', False) and + (self.overrides not in (None, UNKNOWN))): + overrides = [self.overrides] + else: + overrides = [] if self.value in (None, UNKNOWN): - return [] + return []+overrides else: - return [self.value] + return [self.value]+overrides def is_detailed(self): pval = super(VariableDoc, self).is_detailed() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 06:03:38
|
Revision: 1674 http://epydoc.svn.sourceforge.net/epydoc/?rev=1674&view=rev Author: edloper Date: 2008-01-28 22:03:36 -0800 (Mon, 28 Jan 2008) Log Message: ----------- - Applied sourceforge patch #1678242 -- added command-line option '-src-code-tab-width'. Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py trunk/epydoc/src/epydoc/docwriter/html.py trunk/epydoc/src/epydoc/docwriter/html_colorize.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-01-29 05:42:58 UTC (rev 1673) +++ trunk/epydoc/src/epydoc/cli.py 2008-01-29 06:03:36 UTC (rev 1674) @@ -136,8 +136,8 @@ list_classes_separately=False, graph_font=None, graph_font_size=None, include_source_code=True, pstat_files=[], simple_term=False, fail_on=None, exclude=[], exclude_parse=[], exclude_introspect=[], - external_api=[],external_api_file=[],external_api_root=[], - redundant_details=False) + external_api=[], external_api_file=[], external_api_root=[], + redundant_details=False, src_code_tab_width=8) def parse_arguments(): # Construct the option parser. @@ -338,6 +338,11 @@ "its own section, instead of listing them under their " "containing module.")) + output_group.add_option('--src-code-tab-width', + action='store', type='int', dest='src_code_tab_width', + help=("When generating HTML output, sets the number of spaces " + "each tab in source code listings is replaced with.")) + # The group of external API options. # Skip if the module couldn't be imported (usually missing docutils) if xlink is not None: @@ -573,6 +578,8 @@ options.show_frames = _str_to_bool(val, optname) elif optname in ('separate-classes', 'separate_classes'): options.list_classes_separately = _str_to_bool(val, optname) + elif optname in ('src-code-tab-width', 'src_code_tab_width'): + options.src_code_tab_width = _str_to_int(val, optname) # External API elif optname in ('external-api', 'external_api'): Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2008-01-29 05:42:58 UTC (rev 1673) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2008-01-29 06:03:36 UTC (rev 1674) @@ -291,6 +291,9 @@ @type include_log: C{boolean} @keyword include_log: If true, the the footer will include an href to the page 'epydoc-log.html'. + @type src_code_tab_width: C{int} + @keyword src_code_tab_width: Number of spaces to replace each tab + with in source code listings. """ self.docindex = docindex @@ -354,6 +357,10 @@ self._include_log = kwargs.get('include_log', False) """Are we generating an HTML log page?""" + + self._src_code_tab_width = kwargs.get('src_code_tab_width', 8) + """Number of spaces to replace each tab with in source code + listings.""" self._callgraph_cache = {} """Map the callgraph L{uid<DotGraph.uid>} to their HTML @@ -797,7 +804,8 @@ self.href(doc, label='%s %s' % (self.doc_kind(doc), name))) out('<pre class="py-src">\n') out(PythonSourceColorizer(filename, name, self.docindex, - self.url, name_to_docs).colorize()) + self.url, name_to_docs, + self._src_code_tab_width).colorize()) out('</pre>\n<br />\n') # Footer Modified: trunk/epydoc/src/epydoc/docwriter/html_colorize.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2008-01-29 05:42:58 UTC (rev 1673) +++ trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2008-01-29 06:03:36 UTC (rev 1674) @@ -324,7 +324,8 @@ GUESS_LINK_TARGETS = False def __init__(self, module_filename, module_name, - docindex=None, url_func=None, name_to_docs=None): + docindex=None, url_func=None, name_to_docs=None, + tab_width=8): """ Create a new HTML colorizer for the specified module. @@ -406,6 +407,9 @@ #: Can be C{'func'}, C{'class'}, C{None}. self.def_type = None + #: The number of spaces to replace each tab in source code with + self.tab_width = tab_width + def find_line_offsets(self): """ @@ -450,7 +454,7 @@ # Load the module's text. self.text = open(self.module_filename).read() - self.text = self.text.expandtabs().rstrip()+'\n' + self.text = self.text.expandtabs(self.tab_width).rstrip()+'\n' # Construct the line_offsets table. self.find_line_offsets() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 05:43:00
|
Revision: 1673 http://epydoc.svn.sourceforge.net/epydoc/?rev=1673&view=rev Author: edloper Date: 2008-01-28 21:42:58 -0800 (Mon, 28 Jan 2008) Log Message: ----------- - Applied sourceforge patch #1723597 -- convert imported names to global names before adding them to ModuleDoc.imports. Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2008-01-29 03:53:51 UTC (rev 1672) +++ trunk/epydoc/src/epydoc/docparser.py 2008-01-29 05:42:58 UTC (rev 1673) @@ -902,14 +902,15 @@ list of exports is found by importing and introspecting C{M{<src>}}. """ - # Record the import - parent_docs[0].imports.append(src) # mark that it's .*?? - + # This is redundant: already checked by caller. if not isinstance(parent_docs[-1], NamespaceDoc): return # If src is package-local, then convert it to a global name. src = _global_name(src, parent_docs) + # Record the import + parent_docs[0].imports.append(src) # mark that it's .*?? + # [xx] add check for if we already have the source docs in our # cache?? @@ -956,15 +957,16 @@ we need to create a variable C{'a'} in parentdoc containing a proxy module; and a variable C{'b'} in the proxy module. """ - # Record the import - parent_docs[0].imports.append(name) - + # This is redundant: already checked by caller. if not isinstance(parent_docs[-1], NamespaceDoc): return # If name is package-local, then convert it to a global name. src = _global_name(name, parent_docs) src_prefix = src[:len(src)-len(name)] + # Record the import + parent_docs[0].imports.append(name) + # [xx] add check for if we already have the source docs in our # cache?? @@ -1012,14 +1014,15 @@ Otherwise, create a variables with its C{imported_from} attribute pointing to the imported object. """ - # Record the import - parent_docs[0].imports.append(src) - + # This is redundant: already checked by caller. if not isinstance(parent_docs[-1], NamespaceDoc): return # If src is package-local, then convert it to a global name. src = _global_name(src, parent_docs) + # Record the import + parent_docs[0].imports.append(src) + if IMPORT_HANDLING == 'parse': # Parse the value and create a variable for it. try: val_doc = _find(src) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 03:53:54
|
Revision: 1672 http://epydoc.svn.sourceforge.net/epydoc/?rev=1672&view=rev Author: edloper Date: 2008-01-28 19:53:51 -0800 (Mon, 28 Jan 2008) Log Message: ----------- - Fixed sourceforge bug #1837874 -- fix_self_shadowing_var was setting canonical_name to a tuple by accident. - Fixed typo introduced by previous svn checkin in _inherit_info() - Made warning for introspector/parser disagreements about submodules a little prettier. Modified Paths: -------------- trunk/epydoc/src/epydoc/docbuilder.py Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 02:55:49 UTC (rev 1671) +++ trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 03:53:51 UTC (rev 1672) @@ -1015,7 +1015,9 @@ n2 = sorted([m.canonical_name for m in v2]) if (n1 != n2) and (n2 != []): log.warning('Introspector & parser disagree about submodules ' - 'for %s: %s vs %s' % (path, n1, n2)) + 'for %s: (%s) vs (%s)' % (path, + ', '.join(str(n) for n in n1), + ', '.join(str(n) for n in n2))) return v1 + [m for m in v2 if m.canonical_name not in n1] return v1 @@ -1184,7 +1186,7 @@ return # If we couldn't find the actual value, use an unreachable name. - name = _unreachable_name_for(var_doc.value, docindex) + name, score = _unreachable_name_for(var_doc.value, docindex) log.warning('%s shadows itself -- using %s instead' % (varname, name)) var_doc.value.canonical_name = name @@ -1282,7 +1284,7 @@ # If the new variable has a docstring, then don't inherit # anything, even if the docstring is blank. if var_doc.docstring not in (None, UNKNOWN): - inerited_attribs = set() + inherited_attribs = set() else: inherited_attribs = set(_INHERITED_ATTRIBS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 02:55:51
|
Revision: 1671 http://epydoc.svn.sourceforge.net/epydoc/?rev=1671&view=rev Author: edloper Date: 2008-01-28 18:55:49 -0800 (Mon, 28 Jan 2008) Log Message: ----------- - For run_subprocess() on py <2.3 non-unix systems, read stdout before reading stderr, as suggested by sourceforge bug #1838649. Modified Paths: -------------- trunk/epydoc/src/epydoc/util.py Modified: trunk/epydoc/src/epydoc/util.py =================================================================== --- trunk/epydoc/src/epydoc/util.py 2008-01-29 02:43:32 UTC (rev 1670) +++ trunk/epydoc/src/epydoc/util.py 2008-01-29 02:55:49 UTC (rev 1671) @@ -279,8 +279,8 @@ except IOError, e: raise OSError(e) to_child.close() + out = from_child.read() err = child_err.read() - out = from_child.read() # Assume that there was an error iff anything was written # to the child's stderr. if err == '': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 02:43:35
|
Revision: 1670 http://epydoc.svn.sourceforge.net/epydoc/?rev=1670&view=rev Author: edloper Date: 2008-01-28 18:43:32 -0800 (Mon, 28 Jan 2008) Log Message: ----------- - (partially) fixed sourceforge bug #1845188: the <div> for a function or method should include its decorators. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html_colorize.py Modified: trunk/epydoc/src/epydoc/docwriter/html_colorize.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2008-01-29 02:21:41 UTC (rev 1669) +++ trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2008-01-29 02:43:32 UTC (rev 1670) @@ -442,6 +442,7 @@ self.lineno = 1 self.def_name = None self.def_type = None + self.has_decorators = False # Cache, used so we only need to list the target elements once # for each variable. @@ -465,6 +466,8 @@ self.out = output.write tokenize.tokenize(StringIO(self.text).readline, self.tokeneater) html = output.getvalue() + if self.has_decorators: + html = self._FIX_DECORATOR_RE.sub(r'\2\1', html) except tokenize.TokenError, ex: html = self.text @@ -654,6 +657,7 @@ ((i>0 and line[i-1][1]=='@') or (i>1 and line[i-1][0]==None and line[i-2][1] == '@'))): css_class = self.CSS_CLASSES['DECORATOR'] + self.has_decorators = True # If it's a name, try to link it. elif toktype == token.NAME: @@ -868,6 +872,14 @@ else: return '%s-module.html#%s' % (self.module_name, func_name) + #: A regexp used to move the <div> that marks the beginning of a + #: function or method to just before the decorators. + _FIX_DECORATOR_RE = re.compile( + r'((?:^<a name="L\d+"></a><tt class="py-lineno">\s*\d+</tt>' + r'\s*<tt class="py-line">(?:<tt class="py-decorator">.*|\s*</tt>|' + r'\s*<tt class="py-comment">.*)\n)+)' + r'(<a name="\w+"></a><div id="\w+-def">)', re.MULTILINE) + _HDR = '''\ <?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 02:21:43
|
Revision: 1669 http://epydoc.svn.sourceforge.net/epydoc/?rev=1669&view=rev Author: edloper Date: 2008-01-28 18:21:41 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Removed constraint in is_package_dir requiring package directory names to be valid identifiers, persuant to sourceforge bug #1787028. Modified Paths: -------------- trunk/epydoc/src/epydoc/util.py Modified: trunk/epydoc/src/epydoc/util.py =================================================================== --- trunk/epydoc/src/epydoc/util.py 2008-01-29 01:54:56 UTC (rev 1668) +++ trunk/epydoc/src/epydoc/util.py 2008-01-29 02:21:41 UTC (rev 1669) @@ -56,9 +56,12 @@ # "foo/", where os.path.split -> ("foo", "").) (parent, dir) = os.path.split(dirname) if dir == '': (parent, dir) = os.path.split(parent) - if not re.match('\w+$', dir): - return False + # The following constraint was removed because of sourceforge + # bug #1787028 -- in some cases (eg eggs), it's too strict. + #if not re.match('\w+$', dir): + # return False + for name in os.listdir(dirname): filename = os.path.join(dirname, name) if name.startswith('__init__.') and is_module_file(filename): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 01:54:58
|
Revision: 1668 http://epydoc.svn.sourceforge.net/epydoc/?rev=1668&view=rev Author: edloper Date: 2008-01-28 17:54:56 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Fixed sourceforge bug #1825472 -- metadata fields (such as __authors__) with multiple values were causing epydoc to die, because the code to remove it was inside a loop that got repeated once for each value: the second time through the loop, it had already been removed. Modified Paths: -------------- trunk/epydoc/src/epydoc/docstringparser.py Modified: trunk/epydoc/src/epydoc/docstringparser.py =================================================================== --- trunk/epydoc/src/epydoc/docstringparser.py 2008-01-29 01:47:51 UTC (rev 1667) +++ trunk/epydoc/src/epydoc/docstringparser.py 2008-01-29 01:54:56 UTC (rev 1668) @@ -326,12 +326,14 @@ # Add in the metadata and remove from the variables api_doc.metadata.append( (field, varname, elt) ) - if var_doc.docstring in (None, UNKNOWN): - del api_doc.variables[varname] - if api_doc.sort_spec is not UNKNOWN: - try: api_doc.sort_spec.remove(varname) - except ValueError: pass + # Remove the variable itself (unless it's documented) + if var_doc.docstring in (None, UNKNOWN): + del api_doc.variables[varname] + if api_doc.sort_spec is not UNKNOWN: + try: api_doc.sort_spec.remove(varname) + except ValueError: pass + def initialize_api_doc(api_doc): """A helper function for L{parse_docstring()} that initializes the attributes that C{parse_docstring()} will write to.""" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 01:47:54
|
Revision: 1667 http://epydoc.svn.sourceforge.net/epydoc/?rev=1667&view=rev Author: edloper Date: 2008-01-28 17:47:51 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Fixed sourceforge bug #1847592 -- The code that looked up user-defined docfields from the enclosing objects was broken. Modified Paths: -------------- trunk/epydoc/src/epydoc/docstringparser.py Modified: trunk/epydoc/src/epydoc/docstringparser.py =================================================================== --- trunk/epydoc/src/epydoc/docstringparser.py 2008-01-29 01:29:53 UTC (rev 1666) +++ trunk/epydoc/src/epydoc/docstringparser.py 2008-01-29 01:47:51 UTC (rev 1667) @@ -602,7 +602,7 @@ docfields += api_doc.extra_docstring_fields # Get any docfields from `api_doc`'s ancestors for i in range(len(api_doc.canonical_name)-1, 0, -1): - ancestor = docindex.get_valdoc(api_doc.canonical_name.container()) + ancestor = docindex.get_valdoc(api_doc.canonical_name[:i]) if ancestor is not None \ and ancestor.extra_docstring_fields not in (None, UNKNOWN): docfields += ancestor.extra_docstring_fields This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 01:30:07
|
Revision: 1666 http://epydoc.svn.sourceforge.net/epydoc/?rev=1666&view=rev Author: edloper Date: 2008-01-28 17:29:53 -0800 (Mon, 28 Jan 2008) Log Message: ----------- When parsing relative imports, check to make sure it's not done in a non-package, or beyond the toplevel package. Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2008-01-29 00:14:37 UTC (rev 1665) +++ trunk/epydoc/src/epydoc/docparser.py 2008-01-29 01:29:53 UTC (rev 1666) @@ -1700,6 +1700,9 @@ # >>> from . import foo if not elt_list: + if prefix_name == []: + raise ParseError("Attempted relative import in non-package, " + "or beyond toplevel package") return prefix_name if len(elt_list) % 2 != 1: raise ParseError("Bad dotted name") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-29 00:14:42
|
Revision: 1665 http://epydoc.svn.sourceforge.net/epydoc/?rev=1665&view=rev Author: edloper Date: 2008-01-28 16:14:37 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Fixed SF bug #1856056: now c extension methods will inherit the signature from their base class method, if they don't specify their own signature. This only applies if both the inherited & overridden method satisfy inspect.isbuiltin(). Modified Paths: -------------- trunk/epydoc/src/epydoc/docbuilder.py Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2008-01-28 23:40:29 UTC (rev 1664) +++ trunk/epydoc/src/epydoc/docbuilder.py 2008-01-29 00:14:37 UTC (rev 1665) @@ -67,7 +67,7 @@ ## Imports ###################################################################### -import sys, os, os.path, __builtin__, imp, re +import sys, os, os.path, __builtin__, imp, re, inspect from epydoc.apidoc import * from epydoc.docintrospecter import introspect_docs from epydoc.docparser import parse_docs, ParseError @@ -1275,15 +1275,29 @@ Copy any relevant documentation information from the variable that C{var_doc} overrides into C{var_doc} itself. """ + src_var = var_doc.overrides + src_val = var_doc.overrides.value + val_doc = var_doc.value + # If the new variable has a docstring, then don't inherit # anything, even if the docstring is blank. if var_doc.docstring not in (None, UNKNOWN): - return + inerited_attribs = set() + else: + inherited_attribs = set(_INHERITED_ATTRIBS) - src_var = var_doc.overrides - src_val = var_doc.overrides.value - val_doc = var_doc.value - + # Special case: if the source value and target values are both c + # extension methods, and the target value's signature is not + # specified, then inherit the source value's signature. + if (isinstance(val_doc, RoutineDoc) and + isinstance(src_val, RoutineDoc) and + inspect.isbuiltin(val_doc.pyval) and + inspect.isbuiltin(src_val.pyval) and + val_doc.all_args() in (['...'], UNKNOWN) and + src_val.all_args() not in (['...'], UNKNOWN)): + inherited_attribs.update(['posargs', 'posarg_defaults', 'vararg', + 'kwarg', 'return_type']) + # [xx] Do I want a check like this:? # # If it's a method and the signature doesn't match well enough, # # then give up. @@ -1298,7 +1312,7 @@ # return # Inherit attributes! - for attrib in _INHERITED_ATTRIBS: + for attrib in inherited_attribs: if (hasattr(var_doc, attrib) and hasattr(src_var, attrib) and getattr(src_var, attrib) not in (None, UNKNOWN)): setattr(var_doc, attrib, getattr(src_var, attrib)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-28 23:40:30
|
Revision: 1664 http://epydoc.svn.sourceforge.net/epydoc/?rev=1664&view=rev Author: edloper Date: 2008-01-28 15:40:29 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Fixed sf bug #1853339: an exception was being raised in DottedName.__init__ even when strict=False. Modified Paths: -------------- trunk/epydoc/src/epydoc/apidoc.py Modified: trunk/epydoc/src/epydoc/apidoc.py =================================================================== --- trunk/epydoc/src/epydoc/apidoc.py 2007-11-07 15:29:47 UTC (rev 1663) +++ trunk/epydoc/src/epydoc/apidoc.py 2008-01-28 23:40:29 UTC (rev 1664) @@ -119,8 +119,6 @@ raise DottedName.InvalidDottedName( 'Bad identifier %r' % (piece,)) else: - raise DottedName.InvalidDottedName( - 'Bad identifier %r' % (piece,)) log.warning("Identifier %r looks suspicious; " "using it anyway." % piece) self._ok_identifiers.add(piece) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dva...@us...> - 2007-11-07 15:29:48
|
Revision: 1663 http://epydoc.svn.sourceforge.net/epydoc/?rev=1663&view=rev Author: dvarrazzo Date: 2007-11-07 07:29:47 -0800 (Wed, 07 Nov 2007) Log Message: ----------- - Import graph correctly reconstructed. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/dotgraph.py Modified: trunk/epydoc/src/epydoc/docwriter/dotgraph.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/dotgraph.py 2007-11-07 15:23:41 UTC (rev 1662) +++ trunk/epydoc/src/epydoc/docwriter/dotgraph.py 2007-11-07 15:29:47 UTC (rev 1663) @@ -1163,7 +1163,7 @@ if dst.imports in (None, UNKNOWN): continue for var_name in dst.imports: for i in range(len(var_name), 0, -1): - val_doc = docindex.get_valdoc(var_name[:i]) + val_doc = docindex.find(var_name[:i], context) if isinstance(val_doc, ModuleDoc): if val_doc in nodes and dst in nodes: edges.add((nodes[val_doc], nodes[dst])) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |