Items that will affect this project at the next release of Friendly-traceback
The traceback item info["simulated_python_traceback"]
used to be a list; it is now a string, like all the other items. This is the only true breaking change. The word "Simulated"
has been removed -- so you will no longer need to remove it yourself.
A new header for the "variable info" has been added, in part inspired by your markdown formatter. You are/were inserting something like Variables:
before showing the value of the "variables". Since "variables" that are shown can be other types of identifiers (e.g. functions, classes, etc.) and not simply "variables", the new header reflects this. See for example https://aroberge.github.io/friendly-traceback-docs/docs/html/tracebacks_en_3.8.html#indexerror-short-tuple. With the exception of NameError
, your code should show exactly the same output as before "as is", but might benefit from making use of this.
This header can be different in the case of a NameError; it can be Perhaps you meant to write one of the following:
, when a possible typo is identified, or something like "Type hint found for '{name}' as a local variable."
(no tests in documentation yet), which is something that could arise if someone writes this:
a: 3 # not a syntax error!
b = a
In the case of NameError
, this new header used to be part of the "variable info" shown; it is now separate so that its appearance can be customized.
Items that should have no immediate impact on this project, but could be of some use
The default formatter has been rewritten nearly from scratch
https://github.com/aroberge/friendly-traceback/blob/master/friendly_traceback/formatters.py
A new public API function, tb_items_to_show(level)
, makes it possible for custom formatters to easily use the verbosity level selected.
A new public function, run
, makes it easier to run scripts using friendly traceback. Examples are to be added (soon) in the documentation. The documentation navigation is broken, as I am in the middle of doing a major reorganisation.
Negative verbosity level values are no longer allowed. A negative value used to indicate that the "true" traceback would be shown instead of the "simulated" one.
The new code has not yet been released on Pypi. I want to give you the chance to avoid breakage in case you do any kind of "live install" of Friendly-traceback.