epydoc-commits Mailing List for Python API documentation generation tool (Page 22)
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...> - 2006-08-22 01:44:41
|
Revision: 1285 Author: edloper Date: 2006-08-21 18:44:36 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1285&view=rev Log Message: ----------- Fixed SF bug [ 1543564 ] epydoc (without the ".py") needs sys.path hack. Modified Paths: -------------- trunk/epydoc/src/scripts/epydoc Modified: trunk/epydoc/src/scripts/epydoc =================================================================== --- trunk/epydoc/src/scripts/epydoc 2006-08-22 01:44:11 UTC (rev 1284) +++ trunk/epydoc/src/scripts/epydoc 2006-08-22 01:44:36 UTC (rev 1285) @@ -3,6 +3,12 @@ # Call the command line interface for Epydoc. # +# Make sure that we don't get confused between an epydoc.py script and +# the real epydoc package. +import sys, os.path +if os.path.exists(os.path.join(sys.path[0], 'epydoc.py')): + del sys.path[0] + from epydoc.cli import cli cli() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-22 01:44:16
|
Revision: 1284 Author: edloper Date: 2006-08-21 18:44:11 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1284&view=rev Log Message: ----------- Fixed typo in comment Modified Paths: -------------- trunk/epydoc/src/scripts/epydoc.py Modified: trunk/epydoc/src/scripts/epydoc.py =================================================================== --- trunk/epydoc/src/scripts/epydoc.py 2006-08-22 01:32:36 UTC (rev 1283) +++ trunk/epydoc/src/scripts/epydoc.py 2006-08-22 01:44:11 UTC (rev 1284) @@ -5,8 +5,8 @@ # We have to do some path magic to prevent Python from getting # confused about the difference between this epydoc module, and the -# real epydoc package. So sys.path[0], which contains the directory -# of the script. +# real epydoc package. So remove sys.path[0], which contains the +# directory of the script. import sys, os.path script_path = os.path.abspath(sys.path[0]) sys.path = [p for p in sys.path if This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-22 01:32:41
|
Revision: 1283 Author: edloper Date: 2006-08-21 18:32:36 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1283&view=rev Log Message: ----------- Fixed SF bug [ 1501877 ] No indication of decorators in default class view. (Added 'Static Method' or 'Class Method' label right under the function signature in the details section, and removed @staticmethod and @classmethod from the decorators list. Also, put a <code>@...</code> around each decorator in the decorator list. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-22 01:14:31 UTC (rev 1282) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-22 01:32:36 UTC (rev 1283) @@ -1997,6 +1997,12 @@ >>> if var_doc.name in self.SPECIAL_METHODS: <br /><em class="fname">($self.SPECIAL_METHODS[var_doc.name]$)</em> >>> #endif + >>> if isinstance(func_doc, ClassMethodDoc): + <br /><em class="fname">Class Method</em> + >>> #endif + >>> if isinstance(func_doc, StaticMethodDoc): + <br /><em class="fname">Static Method</em> + >>> #endif </h3> </td><td align="right" valign="top" >$self.pysrc_link(func_doc)$ </span @@ -2029,7 +2035,12 @@ <dl><dt>Decorators:</dt></dl> <ul class="nomargin"> >>> for deco in func_doc.decorators: - <li>$deco$</li> + >>> # (staticmethod & classmethod are already shown, above) + >>> if not ((deco=="staticmethod" and + >>> isinstance(func_doc, StaticMethodDoc)) or + >>> (deco=="classmethod" and + >>> isinstance(func_doc, ClassMethodDoc))): + <li><code>@$deco$</code></li> >>> #endfor </ul> >>> #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-22 01:14:36
|
Revision: 1282 Author: edloper Date: 2006-08-21 18:14:31 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1282&view=rev Log Message: ----------- Fixed SF bug [ 1496737 ] Submodules cannot be @undocumented. Modified Paths: -------------- trunk/epydoc/src/epydoc/docstringparser.py Modified: trunk/epydoc/src/epydoc/docstringparser.py =================================================================== --- trunk/epydoc/src/epydoc/docstringparser.py 2006-08-22 00:53:05 UTC (rev 1281) +++ trunk/epydoc/src/epydoc/docstringparser.py 2006-08-22 01:14:31 UTC (rev 1282) @@ -441,6 +441,22 @@ if var_name_re.match(var_name): # Remove the variable from `variables`. api_doc.variables.pop(var_name, None) + # For modules, remove any submodules that match var_name_re. + if isinstance(api_doc, ModuleDoc): + removed = set([m for m in api_doc.submodules + if var_name_re.match(m.canonical_name[-1])]) + if removed: + # Remove the indicated submodules from this module. + api_doc.submodules = [m for m in api_doc.submodules + if m not in removed] + # Remove all ancestors of the indicated submodules + # from the docindex root. E.g., if module x + # declares y to be undocumented, then x.y.z should + # also be undocumented. + for elt in docindex.root[:]: + for m in removed: + if m.canonical_name.dominates(elt.canonical_name): + docindex.root.remove(elt) def process_group_field(api_doc, docindex, tag, arg, descr): """Define a group named C{arg} containing the variables whose This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-22 00:53:11
|
Revision: 1281 Author: edloper Date: 2006-08-21 17:53:05 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1281&view=rev Log Message: ----------- - Applied patches from SF bug [ 1482145 ] "Cannot introspect or parse Schevo project code". These all basically have to do with handling the case when a RoutineDoc's posargs, varargs, or kwargs attributes are UNKNOWN. Modified Paths: -------------- trunk/epydoc/src/epydoc/apidoc.py trunk/epydoc/src/epydoc/docparser.py trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/apidoc.py =================================================================== --- trunk/epydoc/src/epydoc/apidoc.py 2006-08-21 14:13:15 UTC (rev 1280) +++ trunk/epydoc/src/epydoc/apidoc.py 2006-08-22 00:53:05 UTC (rev 1281) @@ -1347,6 +1347,9 @@ consists of a tuple of names, then that tuple will be flattened. """ + if self.posargs is UNKNOWN: + return UNKNOWN + all_args = _flatten(self.posargs) if self.vararg not in (None, UNKNOWN): all_args.append(self.vararg) @@ -1603,9 +1606,10 @@ return None # Is it a parameter's name or an attribute of a parameter? - if (isinstance(context, RoutineDoc) and - name[0] in context.all_args()): - return None + if isinstance(context, RoutineDoc): + all_args = context.all_args() + if all_args is not UNKNOWN and name[0] in all_args: + return None #//////////////////////////////////////////////////////////// # etc Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2006-08-21 14:13:15 UTC (rev 1280) +++ trunk/epydoc/src/epydoc/docparser.py 2006-08-22 00:53:05 UTC (rev 1281) @@ -1151,6 +1151,7 @@ # the name of the first arg to the containing routinedoc, and # <name> is a simple name. posargs = parent_docs[-1].posargs + if posargs is UNKNOWN: return False if not (len(lhs_pieces)==1 and len(posargs) > 0 and len(lhs_pieces[0]) == 3 and lhs_pieces[0][0] == (token.NAME, posargs[0]) and Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 14:13:15 UTC (rev 1280) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-22 00:53:05 UTC (rev 1281) @@ -2424,13 +2424,13 @@ else: args = [self.func_arg(n, d, css_class) for (n, d) in zip(func_doc.posargs, func_doc.posarg_defaults)] - if func_doc.vararg: + if func_doc.vararg not in (None, UNKNOWN): if func_doc.vararg == '...': args.append('<span class="%s-arg">...</span>' % css_class) else: args.append('<span class="%s-arg">*%s</span>' % (css_class, func_doc.vararg)) - if func_doc.kwarg: + if func_doc.kwarg not in (None, UNKNOWN): args.append('<span class="%s-arg">**%s</span>' % (css_class, func_doc.kwarg)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 14:13:19
|
Revision: 1280 Author: edloper Date: 2006-08-21 07:13:15 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1280&view=rev Log Message: ----------- - Fixed a but in pyval_repr (failed when given a tuple value.) Modified Paths: -------------- trunk/epydoc/src/epydoc/apidoc.py Modified: trunk/epydoc/src/epydoc/apidoc.py =================================================================== --- trunk/epydoc/src/epydoc/apidoc.py 2006-08-21 14:05:00 UTC (rev 1279) +++ trunk/epydoc/src/epydoc/apidoc.py 2006-08-21 14:13:15 UTC (rev 1280) @@ -725,7 +725,7 @@ if self.pyval is UNKNOWN: return UNKNOWN try: - s = '%r' % self.pyval + s = '%r' % (self.pyval,) if isinstance(s, str): s = decode_with_backslashreplace(s) return s This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 14:05:08
|
Revision: 1279 Author: edloper Date: 2006-08-21 07:05:00 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1279&view=rev Log Message: ----------- - Removed debug printf Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2006-08-21 14:03:29 UTC (rev 1278) +++ trunk/epydoc/src/epydoc/docparser.py 2006-08-21 14:05:00 UTC (rev 1279) @@ -1922,7 +1922,6 @@ def pp_toktree(elts, spacing='normal', indent=0): pieces = [''] _pp_toktree(elts, spacing, indent, pieces) - log.debug(''.join(pieces)) return ''.join(pieces) def _pp_toktree(elts, spacing, indent, pieces): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 14:03:32
|
Revision: 1278 Author: edloper Date: 2006-08-21 07:03:29 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1278&view=rev Log Message: ----------- - Made some fixes to pp_toktree(). (Previously, it was printing eg "[x for x in xs]" as "[xforxinxs]") Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2006-08-21 13:25:16 UTC (rev 1277) +++ trunk/epydoc/src/epydoc/docparser.py 2006-08-21 14:03:29 UTC (rev 1278) @@ -1889,42 +1889,68 @@ #{ Tree tokens #///////////////////////////////////////////////////////////////// +def _join_toktree(s1, s2): + # Join them. s1 = left side; s2 = right side. + if (s2=='' or s1=='' or + s1 in ('-','`') or s2 in ('}',']',')','`',':') or + s2[0] in ('.',',') or s1[-1] in ('(','[','{','.','\n',' ') or + (s2[0] == '(' and s1[-1] not in (',','='))): + return '%s%s' % (s1,s2) + elif (spacing=='tight' and + s1[-1] in '+-*/=,' or s2[0] in '+-*/=,'): + return '%s%s' % (s1, s2) + else: + return '%s %s' % (s1, s2) + +def _pp_toktree_add_piece(spacing, pieces, piece): + s1 = pieces[-1] + s2 = piece + + if (s2=='' or s1=='' or + s1 in ('-','`') or s2 in ('}',']',')','`',':') or + s2[0] in ('.',',') or s1[-1] in ('(','[','{','.','\n',' ') or + (s2[0] == '(' and s1[-1] not in (',','='))): + pass + elif (spacing=='tight' and + s1[-1] in '+-*/=,' or s2[0] in '+-*/=,'): + pass + else: + pieces.append(' ') + + pieces.append(piece) + def pp_toktree(elts, spacing='normal', indent=0): - s = u'' + pieces = [''] + _pp_toktree(elts, spacing, indent, pieces) + log.debug(''.join(pieces)) + return ''.join(pieces) + +def _pp_toktree(elts, spacing, indent, pieces): + add_piece = _pp_toktree_add_piece + for elt in elts: # Put a blank line before class & def statements. if elt == (token.NAME, 'class') or elt == (token.NAME, 'def'): - s += '\n%s' % (' '*indent) + add_piece(spacing, pieces, '\n%s' % (' '*indent)) if isinstance(elt, tuple): if elt[0] == token.NEWLINE: - s += ' '+elt[1] - s += '\n%s' % (' '*indent) + add_piece(spacing, pieces, ' '+elt[1]) + add_piece(spacing, pieces, '\n%s' % (' '*indent)) elif elt[0] == token.INDENT: - s += ' ' + add_piece(spacing, pieces, ' ') indent += 1 elif elt[0] == token.DEDENT: - assert s[-4:] == ' ' - s = s[:-4] + assert pieces[-1] == ' ' + pieces.pop() indent -= 1 elif elt[0] == tokenize.COMMENT: - s += elt[1].rstrip() + '\n' + ' '*indent + add_piece(spacing, pieces, elt[1].rstrip() + '\n') + add_piece(' '*indent) else: - s += elt[1] + add_piece(spacing, pieces, elt[1]) else: - elt_s = pp_toktree(elt, spacing, indent) - # Join them. s = left side; elt_s = right side. - if (elt_s=='' or s=='' or - s in ('-','`') or elt_s in ('}',']',')','`',':') or - elt_s[0] in ('.',',') or s[-1] in ('(','[','{','.','\n',' ') or - (elt_s[0] == '(' and s[-1] not in (',','='))): - s = '%s%s' % (s, elt_s) - elif (spacing=='tight' and - s[-1] in '+-*/=,' or elt_s[0] in '+-*/=,'): - s = '%s%s' % (s, elt_s) - else: - s = '%s %s' % (s, elt_s) - return s + _pp_toktree(elt, spacing, indent, pieces) #///////////////////////////////////////////////////////////////// #{ Helper Functions This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 13:25:19
|
Revision: 1277 Author: edloper Date: 2006-08-21 06:25:16 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1277&view=rev Log Message: ----------- - Treat any modules that begin with '_' as private. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 13:09:34 UTC (rev 1276) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 13:25:16 UTC (rev 1277) @@ -3005,9 +3005,15 @@ def _doc_or_ancestor_is_private(self, api_doc): name = api_doc.canonical_name for i in range(len(name), 0, -1): + # Is it (or an ancestor) a private var? var_doc = self.docindex.get_vardoc(name[:i]) if var_doc is not None and var_doc.is_public == False: return True + # Is it (or an ancestor) a private module? + val_doc = self.docindex.get_valdoc(name[:i]) + if (val_doc is not None and isinstance(val_doc, ModuleDoc) and + val_doc.canonical_name[-1].startswith('_')): + return True return False class _HTMLDocstringLinker(epydoc.markup.DocstringLinker): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 13:09:37
|
Revision: 1276 Author: edloper Date: 2006-08-21 06:09:34 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1276&view=rev Log Message: ----------- - Fixed SF bug [ 1480680 ] Alpha 2 Windows Forgets Output Directory. Modified Paths: -------------- trunk/epydoc/src/epydoc/gui.py Modified: trunk/epydoc/src/epydoc/gui.py =================================================================== --- trunk/epydoc/src/epydoc/gui.py 2006-08-21 12:15:25 UTC (rev 1275) +++ trunk/epydoc/src/epydoc/gui.py 2006-08-21 13:09:34 UTC (rev 1276) @@ -208,7 +208,7 @@ @param options: The options to use for generating documentation. This includes keyword options that can be given to - L{html.HTMLFormatter}, as well as the option C{outdir}, which + L{html.HTMLFormatter}, as well as the option C{target}, which controls where the output is written to. @type options: C{dictionary} """ @@ -1037,7 +1037,7 @@ self._help_entry.insert(0, opts.get('help')) self._out_entry.delete(0, 'end') - self._out_entry.insert(0, opts.get('outdir', 'html')) + self._out_entry.insert(0, opts.get('target', 'html')) self._frames_var.set(opts.get('frames', 1)) self._private_var.set(opts.get('private', 1)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 12:15:29
|
Revision: 1275 Author: edloper Date: 2006-08-21 05:15:25 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1275&view=rev Log Message: ----------- - Fixed bug with printing of exceptions list for function details. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 12:14:48 UTC (rev 1274) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 12:15:25 UTC (rev 1275) @@ -2044,7 +2044,7 @@ >>> #endif $self.labelled_list_item( "<code><strong class=\'fraise\'>" + - name + "</strong></code>", + str(name) + "</strong></code>", self.docstring_to_html(descr, func_doc, 8))$ >>> #endfor </ul> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 12:14:52
|
Revision: 1274 Author: edloper Date: 2006-08-21 05:14:48 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1274&view=rev Log Message: ----------- - fixed sf bug [ 1511214 ] uml error. This involved an exception raised because the uml graph tried to create a class node for non-class objects. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/dotgraph.py Modified: trunk/epydoc/src/epydoc/docwriter/dotgraph.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/dotgraph.py 2006-08-21 11:49:30 UTC (rev 1273) +++ trunk/epydoc/src/epydoc/docwriter/dotgraph.py 2006-08-21 12:14:48 UTC (rev 1274) @@ -420,6 +420,9 @@ the types of a linked attributes if no node yet exists for that type. """ + if not isinstance(class_doc, ClassDoc): + raise TypeError('Expected a ClassDoc as 1st argument') + self.class_doc = class_doc """The class represented by this node.""" @@ -591,6 +594,9 @@ type_doc = self.linker.docindex.find(type_str, var) if not type_doc: return False + # Make sure the type is a class. + if not isinstance(type_doc, ClassDoc): return False + # Get the type ValueDoc's node. If it doesn't have one (and # add_nodes_for_linked_attributes=True), then create it. type_node = nodes.get(type_doc) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 11:49:33
|
Revision: 1273 Author: edloper Date: 2006-08-21 04:49:30 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1273&view=rev Log Message: ----------- - Added a 'remove module' button (sf bug #1480448). Modified Paths: -------------- trunk/epydoc/src/epydoc/gui.py Modified: trunk/epydoc/src/epydoc/gui.py =================================================================== --- trunk/epydoc/src/epydoc/gui.py 2006-08-21 11:45:59 UTC (rev 1272) +++ trunk/epydoc/src/epydoc/gui.py 2006-08-21 11:49:30 UTC (rev 1273) @@ -368,6 +368,10 @@ self._module_entry = Entry(mframe3, **ENTRY_CONFIG) self._module_entry.pack(side='left', fill='x', expand=1) self._module_entry.bind('<Return>', self._entry_module) + self._module_delete = Button(mframe3, text="Remove", + command=self._delete_module, + **BUTTON_CONFIG) + self._module_delete.pack(side='right', expand=0, padx=2) self._module_browse = Button(mframe3, text="Browse", command=self._browse_module, **BUTTON_CONFIG) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 11:46:04
|
Revision: 1272 Author: edloper Date: 2006-08-21 04:45:59 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1272&view=rev Log Message: ----------- - Fixed bug in display of exceptions, where it would raise an exception if docindex.find() couldn't find it. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 11:34:36 UTC (rev 1271) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 11:45:59 UTC (rev 1272) @@ -2038,8 +2038,10 @@ <dl><dt>Raises:</dt></dl> <ul class="nomargin"> >>> for name, descr in func_doc.exception_descrs: - >>> name = self.href(self.docindex.find(name, func_doc), - >>> label=str(name)) + >>> exc_name = self.docindex.find(name, func_doc) + >>> if exc_name is not None: + >>> name = self.href(exc_name, label=str(name)) + >>> #endif $self.labelled_list_item( "<code><strong class=\'fraise\'>" + name + "</strong></code>", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 11:34:41
|
Revision: 1271 Author: edloper Date: 2006-08-21 04:34:36 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1271&view=rev Log Message: ----------- - Made py_src_filename's ValueError a little more verbose. Modified Paths: -------------- trunk/epydoc/src/epydoc/util.py Modified: trunk/epydoc/src/epydoc/util.py =================================================================== --- trunk/epydoc/src/epydoc/util.py 2006-08-21 11:34:12 UTC (rev 1270) +++ trunk/epydoc/src/epydoc/util.py 2006-08-21 11:34:36 UTC (rev 1271) @@ -73,7 +73,7 @@ return '%s%s' % (basefile, ext) else: raise ValueError('Could not find a corresponding ' - 'Python source file.') + 'Python source file for %r.' % filename) def munge_script_name(filename): name = os.path.split(filename)[1] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 11:34:20
|
Revision: 1270 Author: edloper Date: 2006-08-21 04:34:12 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1270&view=rev Log Message: ----------- - Fixed bug in introspect_module from recent checkin -- catch and ignore ValueError's from py_src_filename when trying to find the src filename of a module. Modified Paths: -------------- trunk/epydoc/src/epydoc/docintrospecter.py Modified: trunk/epydoc/src/epydoc/docintrospecter.py =================================================================== --- trunk/epydoc/src/epydoc/docintrospecter.py 2006-08-21 11:24:09 UTC (rev 1269) +++ trunk/epydoc/src/epydoc/docintrospecter.py 2006-08-21 11:34:12 UTC (rev 1270) @@ -226,7 +226,8 @@ except KeyboardInterrupt: raise except: pass if module_doc.filename is not UNKNOWN: - module_doc.filename = py_src_filename(module_doc.filename) + try: module_doc.filename = py_src_filename(module_doc.filename) + except ValueError: pass # If this is just a preliminary introspection, then don't do # anything else. (Typically this is true if this module was This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 11:24:12
|
Revision: 1269 Author: edloper Date: 2006-08-21 04:24:09 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1269&view=rev Log Message: ----------- - Add a check to make sure we don't have an object that's its own container, which would generate an infinite loop. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 11:02:13 UTC (rev 1268) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 11:24:09 UTC (rev 1269) @@ -1654,6 +1654,7 @@ # Generate the crumbs for uid's ancestors. while True: container = self.docindex.container(doc) + assert doc != container, 'object is its own container?' if container is None: if doc.canonical_name is UNKNOWN: return ['??']+crumbs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 11:02:17
|
Revision: 1268 Author: edloper Date: 2006-08-21 04:02:13 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1268&view=rev Log Message: ----------- - Display the decorators that have been applied to a function in the function details section. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 11:01:45 UTC (rev 1267) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 11:02:13 UTC (rev 1268) @@ -2023,6 +2023,15 @@ >>> elif rtype: <dl><dt>Returns: <code>$rtype$</code></dt></dl> >>> #endif + >>> # === decorators === + >>> if func_doc.decorators not in (None, UNKNOWN, (), []): + <dl><dt>Decorators:</dt></dl> + <ul class="nomargin"> + >>> for deco in func_doc.decorators: + <li>$deco$</li> + >>> #endfor + </ul> + >>> #endif >>> # === exceptions === >>> if func_doc.exception_descrs not in (None, UNKNOWN, (), []): <dl><dt>Raises:</dt></dl> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 11:01:49
|
Revision: 1267 Author: edloper Date: 2006-08-21 04:01:45 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1267&view=rev Log Message: ----------- - Changed default decorator behavior to TRANSPARENT; and added code to keep track of which decorators have been applied. Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2006-08-21 11:00:15 UTC (rev 1266) +++ trunk/epydoc/src/epydoc/docparser.py 2006-08-21 11:01:45 UTC (rev 1267) @@ -153,7 +153,7 @@ be parsed, e.g., if it's a builtin.) """ -DEFAULT_DECORATOR_BEHAVIOR = 'opaque' +DEFAULT_DECORATOR_BEHAVIOR = 'transparent' """When C{DocParse} encounters an unknown decorator, what should it do to the documentation of the decorated function? - C{'transparent'}: leave the function's documentation as-is. @@ -1370,6 +1370,7 @@ add_docstring_from_comments(func_doc, comments) # Apply any decorators. + func_doc.decorators = [pp_toktree(deco[1:]) for deco in decorators] decorators.reverse() for decorator in decorators: try: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 11:00:21
|
Revision: 1266 Author: edloper Date: 2006-08-21 04:00:15 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1266&view=rev Log Message: ----------- - Added RoutineDoc.decorators Modified Paths: -------------- trunk/epydoc/src/epydoc/apidoc.py Modified: trunk/epydoc/src/epydoc/apidoc.py =================================================================== --- trunk/epydoc/src/epydoc/apidoc.py 2006-08-21 10:33:55 UTC (rev 1265) +++ trunk/epydoc/src/epydoc/apidoc.py 2006-08-21 11:00:15 UTC (rev 1266) @@ -1300,6 +1300,14 @@ @type: C{int}""" #} end of "signature" group + #{ Decorators + decorators = UNKNOWN + """@ivar: A list of names of decorators that were applied to this + routine, in the order that they are listed in the source code. + (I.e., in the reverse of the order that they were applied in.) + @type: C{list} of L{string}""" + #} end of "decorators" group + #{ Information Extracted from Docstrings arg_descrs = UNKNOWN """@ivar: A list of descriptions of the routine's This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 10:33:59
|
Revision: 1265 Author: edloper Date: 2006-08-21 03:33:55 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1265&view=rev Log Message: ----------- - Don't crash if __bases__ doesn't contain a list; instead, issue a warning and ignore the base list. Modified Paths: -------------- trunk/epydoc/src/epydoc/docintrospecter.py Modified: trunk/epydoc/src/epydoc/docintrospecter.py =================================================================== --- trunk/epydoc/src/epydoc/docintrospecter.py 2006-08-21 10:15:08 UTC (rev 1264) +++ trunk/epydoc/src/epydoc/docintrospecter.py 2006-08-21 10:33:55 UTC (rev 1265) @@ -367,17 +367,23 @@ # Record the class's base classes; and add the class to its # base class's subclass lists. if hasattr(cls, '__bases__'): - class_doc.bases = [] - for base in cls.__bases__: - basedoc = introspect_docs(base) - class_doc.bases.append(basedoc) - basedoc.subclasses.append(class_doc) + try: bases = list(cls.__bases__) + except: + bases = None + log.warning("Class '%s' defines __bases__, but it does not " + "contain an iterable; ignoring base list." + % cls.__name__) + if bases is not None: + class_doc.bases = [] + for base in bases: + basedoc = introspect_docs(base) + class_doc.bases.append(basedoc) + basedoc.subclasses.append(class_doc) - bases = list(cls.__bases__) - bases.reverse() - for base in bases: - if hasattr(base, '__dict__'): - base_children.update(base.__dict__) + bases.reverse() + for base in bases: + if hasattr(base, '__dict__'): + base_children.update(base.__dict__) # Record the class's local variables. class_doc.variables = {} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 10:15:11
|
Revision: 1264 Author: edloper Date: 2006-08-21 03:15:08 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1264&view=rev Log Message: ----------- - Use absolute paths when checking if a directory is a package. (otherwise, we would get the wrong answer when checking the directory '.'). Modified Paths: -------------- trunk/epydoc/src/epydoc/util.py Modified: trunk/epydoc/src/epydoc/util.py =================================================================== --- trunk/epydoc/src/epydoc/util.py 2006-08-21 10:14:18 UTC (rev 1263) +++ trunk/epydoc/src/epydoc/util.py 2006-08-21 10:15:08 UTC (rev 1264) @@ -45,6 +45,7 @@ # Make sure it's a directory. if not os.path.isdir(dirname): return False + dirname = os.path.abspath(dirname) # Make sure it's a valid identifier. (Special case for # "foo/", where os.path.split -> ("foo", "").) (parent, dir) = os.path.split(dirname) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 10:14:22
|
Revision: 1263 Author: edloper Date: 2006-08-21 03:14:18 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1263&view=rev Log Message: ----------- - Use absolute paths for packages (so we have access to parents) Modified Paths: -------------- trunk/epydoc/src/epydoc/docbuilder.py Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2006-08-21 10:13:34 UTC (rev 1262) +++ trunk/epydoc/src/epydoc/docbuilder.py 2006-08-21 10:14:18 UTC (rev 1263) @@ -239,7 +239,7 @@ doc_pairs.append(_get_docs_from_module_file( item, introspect, parse, progress_estimator)) elif is_package_dir(item): - pkgfile = os.path.join(item, '__init__') + pkgfile = os.path.abspath(os.path.join(item, '__init__')) doc_pairs.append(_get_docs_from_module_file( pkgfile, introspect, parse, progress_estimator)) elif os.path.isfile(item): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 10:13:38
|
Revision: 1262 Author: edloper Date: 2006-08-21 03:13:34 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1262&view=rev Log Message: ----------- - Fixed bug in introspection when the current directory contained a module with the same name as the module we want to introspect in a different directory. Modified Paths: -------------- trunk/epydoc/src/epydoc/docintrospecter.py Modified: trunk/epydoc/src/epydoc/docintrospecter.py =================================================================== --- trunk/epydoc/src/epydoc/docintrospecter.py 2006-08-21 09:48:17 UTC (rev 1261) +++ trunk/epydoc/src/epydoc/docintrospecter.py 2006-08-21 10:13:34 UTC (rev 1262) @@ -822,7 +822,9 @@ # Add the current directory to sys.path, in case they're trying to # import a module by name that resides in the current directory. - sys.path.insert(0, '') + # But add it to the end -- otherwise, the explicit directory added + # in get_value_from_filename might get overwritten + sys.path.append('') # Supress input and output. (These get restored when we restore # sys to old_sys). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 09:48:21
|
Revision: 1261 Author: edloper Date: 2006-08-21 02:48:17 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1261&view=rev Log Message: ----------- Fixed sf bug "[ 1504812 ] AttributeError: 'GenericValueDoc' object has no attribute ..." (There was a bug in the code that handled shadowing of modules by variables in docparser) Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2006-08-21 09:40:18 UTC (rev 1260) +++ trunk/epydoc/src/epydoc/docparser.py 2006-08-21 09:48:17 UTC (rev 1261) @@ -1971,9 +1971,9 @@ # If so, then add a "'" to the end of its canonical name, to # distinguish it from the variable. if package_doc is not None and name in package_doc.variables: - valdoc = package_doc.variables[name].value - if (valdoc not in (None, UNKNOWN) and - valdoc.imported_from != dotted_name): + vardoc = package_doc.variables[name] + if (vardoc.value not in (None, UNKNOWN) and + vardoc.imported_from != dotted_name): log.warning("Module %s might be shadowed by a variable with " "the same name." % dotted_name) dotted_name = DottedName(str(dotted_name)+"'") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |