Opened 3 years ago
Last modified 3 years ago
#33701 closed New feature
Highlight error location in the technical 500 debug page on Python 3.11+. — at Version 5
| Reported by: | Adam Johnson | Owned by: | |
|---|---|---|---|
| Component: | Error reporting | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Hrushikesh Vaidya, Keryn Knight | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Similar to these tickets for extending the debug page for Python 3.11 exception changes: #33747, #33752.
Python 3.11 adds "where in the line" highlighting to tracebacks:
$ python3.11 t.py
Traceback (most recent call last):
File "/.../example.py", line 5, in <module>
formula(1, 0)
^^^^^^^^^^^^^
File "/.../example.py", line 2, in formula
return a / b + b / a
~~^~~
ZeroDivisionError: division by zero
Release note: https://docs.python.org/3.11/whatsnew/3.11.html#enhanced-error-locations-in-tracebacks
It would be good if we could use this on Django's error pages as well.
The new code column information API may be required: https://docs.python.org/3.11/whatsnew/3.11.html#column-information-for-code-objects . Note it can be disabled.
Change History (5)
comment:1 by , 3 years ago
| Summary: | Python 3.11 error location traceback highlighting → Highlight error location in the technical 500 debug page on Python 3.11+. |
|---|---|
| Triage Stage: | Unreviewed → Someday/Maybe |
comment:2 by , 3 years ago
| Cc: | added |
|---|
comment:3 by , 3 years ago
Relatedly I also opened #33747 to show exception notes, another feature in Python 3.11
comment:4 by , 3 years ago
| Cc: | added |
|---|
comment:5 by , 3 years ago
| Description: | modified (diff) |
|---|
Thanks for the ticket. Let's wait for the final release first.