* cc: Hrushikesh Vaidya (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Adam Johnson):
Relatedly I also opened #33747 to show exception notes, another feature in
Python 3.11
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:3>
* cc: Keryn Knight (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:4>
Old description:
> 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.
New description:
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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:5>
* stage: Someday/Maybe => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:6>
* owner: (none) => Giebisch
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:7>
* has_patch: 0 => 1
Comment:
I've created a PR (https://github.com/django/django/pull/16250).
Somehow I am not completely satisfied with the code, so I appreciate
feedback.
Still passes all tests and works also with older Python versions.
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:8>
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:9>
* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:10>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:11>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:12>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:13>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:14>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"85b52d22fd2841c34e95b3a80d6f2b668ce2f160" 85b52d22]:
{{{
#!CommitTicketReference repository=""
revision="85b52d22fd2841c34e95b3a80d6f2b668ce2f160"
Fixed #33701 -- Added fine-grained error locations to the technical 500
debug page.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:15>