Replace deprecated distutils.LooseVersion by packaging.version
- Degrade more gracefully in environments where the standard output streams (stdout, stderr) are not available, such as the
pythonw.exe
GUI. Concretely: 1) If stackprinter'sshow()
function is called in such an environment and with default arguments, it will now return silently (doing nothing) instead of crashing. 2) the 'Traceprinter' toy now uses the built in print function (so that it doesn't try to access sys.stderr.write on import).
- New kwarg
suppressed_vars
to redact certain variables, e.g. to keep secrets out of error logs
- Allows passing
(None, None, None)
toformat_exception
- Fixed a crashing type error that could occur in longer code scopes (e.g. in the repl)
- Disabled verbose formatting for KeyboardInterrupts by default. Call
format(..., suppressed_exceptions=None
) to enforce verbose printing even on a keyboard interrupt.
- New keyword arg
suppressed_exceptions
to disable verbose formatting for certain types of exceptions (generating a standard python-like traceback instead). - New keyword arg
line_wrap
to adjust or disable the line wrap on variable values.
(beginning of time)