[issue20205] inspect.getsource(), P302 loader and '<..>' filenames

2020-03-18 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20205] inspect.getsource(), P302 loader and '..' filenames

2014-01-09 Thread Stefan Müller
New submission from Stefan Müller: Following situation * python 2.7.6 * module loaded via a PEP302 loader. * the loader has get_source(fullname) * assigns a dummy string as a file: module.__file__ == mymodule Then inspect.getsource(module) throws IOError: could not get source code I

[issue20205] inspect.getsource(), P302 loader and '..' filenames

2014-01-09 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20205 ___ ___

[issue20205] inspect.getsource(), P302 loader and '..' filenames

2014-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There would be behavior change if file 'mymodule' exists. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20205 ___

[issue20205] inspect.getsource(), P302 loader and '..' filenames

2014-01-09 Thread R. David Murray
R. David Murray added the comment: Maybe the logic needs to be reordered: look for a loader first, before looking for a file on disk. It seems to me the current lookup order might itself be a bug. Note that the code is the same in python3, so the issue exists there as well. -- nosy: