r52069 - in python/trunk: Lib/pyclbr.py Lib/test/test_pyclbr.py Misc/NEWS
![](https://secure.gravatar.com/avatar/8ac615df352a970211b0e3d94a307c6d.jpg?s=120&d=mm&r=g)
Author: georg.brandl Date: Sat Sep 30 13:06:47 2006 New Revision: 52069 Modified: python/trunk/Lib/pyclbr.py python/trunk/Lib/test/test_pyclbr.py python/trunk/Misc/NEWS Log: Bug #1560617: in pyclbr, return full module name not only for classes, but also for functions. Modified: python/trunk/Lib/pyclbr.py ============================================================================== --- python/trunk/Lib/pyclbr.py (original) +++ python/trunk/Lib/pyclbr.py Sat Sep 30 13:06:47 2006 @@ -172,7 +172,7 @@ # else it's a nested def else: # it's a function - dict[meth_name] = Function(module, meth_name, file, lineno) + dict[meth_name] = Function(fullmodule, meth_name, file, lineno) stack.append((None, thisindent)) # Marker for nested fns elif token == 'class': lineno, thisindent = start Modified: python/trunk/Lib/test/test_pyclbr.py ============================================================================== --- python/trunk/Lib/test/test_pyclbr.py (original) +++ python/trunk/Lib/test/test_pyclbr.py Sat Sep 30 13:06:47 2006 @@ -93,6 +93,9 @@ py_item = getattr(module, name) if isinstance(value, pyclbr.Function): self.assert_(isinstance(py_item, (FunctionType, BuiltinFunctionType))) + if py_item.__module__ != moduleName: + continue # skip functions that came from somewhere else + self.assertEquals(py_item.__module__, value.module) else: self.failUnless(isinstance(py_item, (ClassType, type))) if py_item.__module__ != moduleName: Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Sep 30 13:06:47 2006 @@ -63,6 +63,9 @@ Library ------- +- Bug #1560617: in pyclbr, return full module name not only for classes, + but also for functions. + - Bug #1457823: cgi.(Sv)FormContentDict's constructor now takes keep_blank_values and strict_parsing keyword arguments.
participants (1)
-
georg.brandl