Re: [Django] #33701: Highlight error location in the technical 500 debug page on Python 3.11+.

23 views
Skip to first unread message

Django

unread,
May 20, 2022, 9:33:46 PM5/20/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: (none)
Type: New feature | Status: new
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-----------------------------------------
Changes (by Hrushikesh Vaidya):

* 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.

Django

unread,
May 27, 2022, 11:37:13 AM5/27/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: (none)
Type: New feature | Status: new
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-----------------------------------------

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>

Django

unread,
May 27, 2022, 12:26:29 PM5/27/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: (none)
Type: New feature | Status: new
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-----------------------------------------
Changes (by Keryn Knight):

* cc: Keryn Knight (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:4>

Django

unread,
May 30, 2022, 11:48:24 AM5/30/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: (none)
Type: New feature | Status: new
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-----------------------------------------
Description changed by Adam Johnson:

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>

Django

unread,
Oct 25, 2022, 7:06:53 AM10/25/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+------------------------------------
Reporter: Adam Johnson | Owner: (none)
Type: New feature | Status: new
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* stage: Someday/Maybe => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:6>

Django

unread,
Oct 27, 2022, 6:06:12 AM10/27/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+------------------------------------
Reporter: Adam Johnson | Owner: Giebisch
Type: New feature | Status: assigned

Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Giebisch):

* owner: (none) => Giebisch
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:7>

Django

unread,
Nov 3, 2022, 7:11:52 AM11/3/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+------------------------------------
Reporter: Adam Johnson | Owner: Giebisch
Type: New feature | Status: assigned
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Giebisch):

* 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>

Django

unread,
Nov 3, 2022, 8:04:02 AM11/3/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+------------------------------------
Reporter: Adam Johnson | Owner: Giebisch
Type: New feature | Status: assigned
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1
* needs_tests: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:9>

Django

unread,
Nov 5, 2022, 9:50:02 AM11/5/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+------------------------------------
Reporter: Adam Johnson | Owner: Giebisch
Type: New feature | Status: assigned
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Giebisch):

* needs_better_patch: 1 => 0
* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:10>

Django

unread,
Nov 9, 2022, 6:00:06 AM11/9/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+------------------------------------
Reporter: Adam Johnson | Owner: Giebisch
Type: New feature | Status: assigned
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Adam Johnson):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:11>

Django

unread,
Nov 13, 2022, 3:29:15 PM11/13/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+------------------------------------
Reporter: Adam Johnson | Owner: Giebisch
Type: New feature | Status: assigned
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Giebisch):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:12>

Django

unread,
Nov 14, 2022, 4:55:43 AM11/14/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
---------------------------------+------------------------------------
Reporter: Adam Johnson | Owner: Giebisch
Type: New feature | Status: assigned
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:13>

Django

unread,
Nov 29, 2022, 2:20:49 AM11/29/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
-------------------------------------+-------------------------------------

Reporter: Adam Johnson | Owner: Giebisch
Type: New feature | Status: assigned
Component: Error reporting | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/33701#comment:14>

Django

unread,
Nov 29, 2022, 3:25:59 AM11/29/22
to django-...@googlegroups.com
#33701: Highlight error location in the technical 500 debug page on Python 3.11+.
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Giebisch
Type: New feature | Status: closed

Component: Error reporting | Version: dev
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* 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>

Reply all
Reply to author
Forward
0 new messages