Message401528
1. Move internal dependencies (`FrameSummary`, `StackSummary`) to class attributes. Reduce coupling.
2. Separate receiving, processing and presenting traceback information.
How to replace `repr` with `pformat` in `FrameSummary`?
def __init__(...):
...
self.locals = {k: repr(v) for k, v in locals.items()} if locals else None
...
3. Move formatting templates to class attributes.
4. ...
Motivation:
1. For the sake of small changes to the view, you have to rewrite the entire `TracebackException` hierarchy. Or use string parsing.
2.1. During development, I want to see as much information as possible.
2.2. During production, displaying unnecessary information can lead to security problems.
2.3. In large projects, it is more convenient to use JSON for further processing in the system environment.
I have not found any PEPs describing `traceback.py`.
I can make a prototype of the changes if anyone is interested. |
|
Date |
User |
Action |
Args |
2021-09-09 22:41:24 | abrosimov.a.a | set | recipients:
+ abrosimov.a.a |
2021-09-09 22:41:24 | abrosimov.a.a | set | messageid: <1631227284.21.0.317045625732.issue45158@roundup.psfhosted.org> |
2021-09-09 22:41:24 | abrosimov.a.a | link | issue45158 messages |
2021-09-09 22:41:24 | abrosimov.a.a | create | |
|