Stable version v1.6.0
-
Exception on the multiline statement
From python 3.6 to 3.9, thetokenizemodule and the exception traceback have changed their behavior. So if a multiline statement raised an exception, the lines reported were different between different python versions. Sometimes, too many unrelated lines were reported too.- This release tries to mitigate that and grabs all the lines of the multiline statement as correctly as possible.
- If there are too many lines, it limits the line to be shown to 10.
-
Logging uncaught exception in child thread
Child thread is run in atry-finallyby default, so it doesn't callsys.excepthookwhen an uncaught exception occurred.
Sologger-ttdoesn't receive the traceback to log it.
This release replaces the thread defaulttry-finallytotry-except-finallyandlogger-tthandles the uncaught exception normally.Python 3.8+ has a new
thread.excepthook. But sincelogger-tthas already handled the uncaught exception, thisthread.excepthookwon't be called.