[New-bugs-announce] [issue20290] inspect module bug for modules with same filename

cqxz report at bugs.python.org
Fri Jan 17 22:08:16 CET 2014

New submission from cqxz:

When two files have the same name and the first changes directory to the second, the inspect module can retrieve the source code for the latter incorrectly, so a simple call to inspect.stack() can be incorrect, and will fail if there are less lines in the nested module (foo/bar/mod.py) than in the calling module (foo/mod.py)


(the foo/bar/mod.py need only contain a single line, e.g. print "hello")

components: Extension Modules
files: mod.py
messages: 208362
nosy: Nick.Rhinehart
priority: normal
severity: normal
status: open
title: inspect module bug for modules with same filename
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file33519/mod.py

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list