[issue14970] -v command line option is broken

2012-05-31 Thread Brett Cannon
Brett Cannon added the comment: Not a problem. =) If you want to know where an import originated from, you can probably do something as simple as overload builtins.__import__ with a version that does a quick stack look to see where the previous call is coming from. -- __

[issue14970] -v command line option is broken

2012-05-31 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Oh dear, silly me. I misunderstood the point of -v _and_ misunderstood the output of 2.7 I was quoting. I was looking for a way to find out where the import originated from, not which file would be imported as a result. Import errors, along with pickl

[issue14970] -v command line option is broken

2012-05-31 Thread Brett Cannon
Brett Cannon added the comment: I am setting this as pending since I consider the total output acceptable, but if Kristján has specific issues he wants to bring up or change he still can. -- status: open -> pending ___ Python tracker

[issue14970] -v command line option is broken

2012-05-31 Thread Brett Cannon
Brett Cannon added the comment: The information is still there, just in a different output line (i.e. http://hg.python.org/cpython/file/c7b16e2be71a/Lib/importlib/_bootstrap.py#l735 outputs the same info, just on its own line). I couldn't keep the old format as the code has been shifted aroun

[issue14970] -v command line option is broken

2012-05-31 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Yes, I found that. The line in question is, however, this: _verbose_message('import {!r} # {!r}', name, loader) (_bootstrap.py:1254). Unfortunately, I see no way to get at the line from which the import occurred here. The loader itself is not us

[issue14970] -v command line option is broken

2012-05-31 Thread Martin v . Löwis
Martin v. Löwis added the comment: See http://hg.python.org/cpython/file/default/Lib/importlib/_bootstrap.py for the source of SourceFileLoader. -- nosy: +loewis ___ Python tracker

[issue14970] -v command line option is broken

2012-05-31 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : Using the -v command line option to diagnose import problem is no longer useful. In stead of lines like this in version 2.7: import UserDict # from D:\p4\games\branches\development\MAIN\eve\dust\tool\bin/../../../../carbon/src/stackless/Lib/UserDic