This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sleepycal
Recipients ncoghlan, sleepycal
Date 2015-11-23.14:49:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448290164.96.0.435205932558.issue25708@psf.upfronthosting.co.za>
In-reply-to
Content
Originally posted here:
http://stackoverflow.com/q/33873243/1267398

The problem is caused by this line:

    # For -m switch, just display the exception
    info = str(exc)

Caused by the following commit in 2008;
https://mail.python.org/pipermail/python-checkins/2008-February/066256.html

The commit states;
"Try to make command line error messages from runpy easier to understand (and suppress traceback cruft from the implicitly invoked runpy machinery)"

However by suppressing the traceback it's now impossible to debug what caused the error when running with `runpy` without wrapping the entire `__init__.py` with your own try/except statement.

I'd like to propose either displaying the full traceback by default, or adding a CLI option to enable it at runtime. The fact that it only suppresses *some* tracebacks and not all is a flawed approach surely?

Thoughts?
History
Date User Action Args
2015-11-23 14:49:25sleepycalsetrecipients: + sleepycal, ncoghlan
2015-11-23 14:49:24sleepycalsetmessageid: <1448290164.96.0.435205932558.issue25708@psf.upfronthosting.co.za>
2015-11-23 14:49:24sleepycallinkissue25708 messages
2015-11-23 14:49:24sleepycalcreate