#25646: Sort the `local vars` in the rich exception reporter
---------------------------------+--------------------
Reporter: kezabelle | Owner:
Type: New feature | Status: new
Component: Error reporting | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------
Currently, I think the locals for each stack in the technical 500 template
(and email) are ordered by ... their order in the source, maybe? I'm not
actually sure, but it's probably either that, or is just plain non-
deterministic.
I think it'd be nicer if the locals were instead sorted by their name,
alphabetically, such that you can reasonably approximate where to look in
the expanded element.
For example, where currently I see:
{{{
e, callback_args, resolver_match, middleware_method, request,
wrapped_callback, resolver, callback_kwargs
}}}
all listed with their values, I'd prefer to see:
{{{
callback_args, callback_kwargs, e, middleware_method, request, resolver,
resolver_match, wrapped_callback
}}}
It might also be nice to change the title for each frame from `Local vars`
to `<N> Local vars` (though I'd prefer `vars` become `variables` tbh) so
that its clearer how much information might be gleaned from inspecting a
stack, and how might work it might do.
I believe that the only change necessary to fix the sorting is to change
{{{
frame['vars'] = frame_vars
}}}
to
{{{
frame['vars'] = sorted(frame_vars, key=itemgetter(0))
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25646>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.549fbd672035e9aae78a3b251a50d8d4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.