AssertNumQueries and call stacks

57 views
Skip to first unread message

Malcolm Box

unread,
Oct 4, 2016, 4:04:19 AM10/4/16
to django-d...@googlegroups.com
Hi,

I'd like to open a discussion on bug #9363 and #22320 which are about improving query logging to capture call stacks. The 9363 was marked wontfix, but I don't understand the reason given.

The use case is simple: when using assertNumQueries in a testcase, it would be very useful to get the stack trace for where the queries were executed in the output, as well as the queries.

The original bug was accepted as a good idea by Claude Peroz but required a fix to #22320 first. This has now been fixed, removing the concern about memory usage.

The wontfix reason given by Aymeric was "use Django Debug Toolbar" and "the code looks bad". DDT is a great tool, but doesn't solve this use case, and the code is a three-line patch (and 5 lines of test code)


Can this be reconsidered for re-opening? I'm happy to improve the patch if that's needed.

Cheers,

Malcolm

--
Malcolm Box

Aymeric Augustin

unread,
Oct 4, 2016, 4:31:54 AM10/4/16
to django-d...@googlegroups.com
I don’t mind that version. I’m withdrawing my wontfix. Sorry.

-- 
Aymeric.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAF3R4sUfrPj7vf5ir%2BGJfhpk7rrmiq%2B%3DhnRL0jevgyBrP6pqYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages