Re: [Django] #35388: force_debug_cursor, assertNumQueries(), and CaptureQueriesContext() doesn't work in async. (was: `force_debug_cursor` does nothing in async)

7 views
Skip to first unread message

Django

unread,
Apr 18, 2024, 2:52:23 PM4/18/24
to django-...@googlegroups.com
#35388: force_debug_cursor, assertNumQueries(), and CaptureQueriesContext() doesn't
work in async.
-------------------------------------+-------------------------------------
Reporter: James Ostrander | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Normal | Resolution: needsinfo
Keywords: connection, db, | Triage Stage:
orm, force_debug_cursor, async | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* keywords: connection, db, orm, force_debug_cursor => connection, db,
orm, force_debug_cursor, async
* resolution: => needsinfo
* status: new => closed
* summary: `force_debug_cursor` does nothing in async =>
force_debug_cursor, assertNumQueries(), and CaptureQueriesContext()
doesn't work in async.
* type: Bug => New feature

Comment:

Replying to [comment:3 James Ostrander]:
> If the fix is something simple, ...

No, it's not. I tried really hard few months ago and it's probably not
doable, check out comments:
- https://github.com/django/django/pull/14843#issuecomment-1023254514
- https://github.com/django/django/pull/16543/files#r1115127795

Marking as "needsinfo", because, as far as I'm aware there is a way to
move it forward. We can reconsider this decision only if someone provides
PoC.
--
Ticket URL: <https://code.djangoproject.com/ticket/35388#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages