[Python-checkins] python/dist/src/Lib inspect.py,1.51,1.52
bcannon at users.sourceforge.net
bcannon at users.sourceforge.net
Fri Aug 13 20:46:26 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21072/Lib
Modified Files:
inspect.py
Log Message:
'inspect' was not listing the functions in a module properly if the module was
reached through a symlink (was comparing path of module to path to function and
were not matching because of the symlink). os.path.realpath() is now used to
solve this discrepency.
Closes bug #570300. Thanks Johannes Gijsbers for the fix.
Index: inspect.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/inspect.py,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** inspect.py 15 Jun 2004 11:22:53 -0000 1.51
--- inspect.py 13 Aug 2004 18:46:23 -0000 1.52
***************
*** 381,385 ****
for module in sys.modules.values():
if hasattr(module, '__file__'):
! modulesbyfile[getabsfile(module)] = module.__name__
if file in modulesbyfile:
return sys.modules.get(modulesbyfile[file])
--- 381,387 ----
for module in sys.modules.values():
if hasattr(module, '__file__'):
! modulesbyfile[
! os.path.realpath(
! getabsfile(module))] = module.__name__
if file in modulesbyfile:
return sys.modules.get(modulesbyfile[file])
More information about the Python-checkins
mailing list