[Django] #36882: Add debug instrumentation for callproc() in CursorDebugWrapper

3 views
Skip to first unread message

Django

unread,
Jan 24, 2026, 7:10:55 AM (13 days ago) Jan 24
to django-...@googlegroups.com
#36882: Add debug instrumentation for callproc() in CursorDebugWrapper
-------------------------------------+-------------------------------------
Reporter: akshaytheflash | Type: Bug
Status: new | Component: Database
| layer (models, ORM)
Version: 6.0 | Severity: Normal
Keywords: callproc, debug, | Triage Stage:
logging, stored procedures | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
The callproc() method in CursorDebugWrapper is not currently instrumented
for debug logging, unlike execute() and executemany(). This means stored
procedure calls are not logged when DEBUG=True.

This patch adds the callproc() method to CursorDebugWrapper to log
procedure calls with timing information, consistent with how other
database operations are logged.

The fix includes:
- Implementation of callproc() in CursorDebugWrapper
- Test to verify the instrumentation works correctly
- Removal of the "XXX callproc isn't instrumented" comment
--
Ticket URL: <https://code.djangoproject.com/ticket/36882>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 24, 2026, 9:56:31 PM (12 days ago) Jan 24
to django-...@googlegroups.com
#36882: Add debug instrumentation for callproc() in CursorDebugWrapper
-------------------------------------+-------------------------------------
Reporter: akshaytheflash | Owner: Harsh007
Type: Bug | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: callproc, debug, | Triage Stage:
logging, stored procedures | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Harsh007):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/36882#comment:1>

Django

unread,
Jan 24, 2026, 10:41:02 PM (12 days ago) Jan 24
to django-...@googlegroups.com
#36882: Add debug instrumentation for callproc() in CursorDebugWrapper
-------------------------------------+-------------------------------------
Reporter: akshaytheflash | Owner: Harsh007
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: callproc, debug, | Triage Stage:
logging | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Clifford Gama):

* keywords: callproc, debug, logging, stored procedures => callproc,
debug, logging
* type: Bug => New feature
* version: 6.0 => dev

--
Ticket URL: <https://code.djangoproject.com/ticket/36882#comment:2>

Django

unread,
Jan 24, 2026, 11:20:17 PM (12 days ago) Jan 24
to django-...@googlegroups.com
#36882: Add debug instrumentation for callproc() in CursorDebugWrapper
-------------------------------------+-------------------------------------
Reporter: akshaytheflash | Owner:
| akshaytheflash
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: callproc, debug, | Triage Stage:
logging | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by akshaytheflash):

* owner: Harsh007 => akshaytheflash

--
Ticket URL: <https://code.djangoproject.com/ticket/36882#comment:3>

Django

unread,
Jan 24, 2026, 11:24:25 PM (12 days ago) Jan 24
to django-...@googlegroups.com
#36882: Add debug instrumentation for callproc() in CursorDebugWrapper
-------------------------------------+-------------------------------------
Reporter: akshaytheflash | Owner:
| akshaytheflash
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: callproc, debug, | Triage Stage:
logging | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by akshaytheflash):

https://github.com/django/django/pull/20579
--
Ticket URL: <https://code.djangoproject.com/ticket/36882#comment:4>

Django

unread,
Jan 30, 2026, 1:54:12 PM (6 days ago) Jan 30
to django-...@googlegroups.com
#36882: Add debug instrumentation for callproc() in CursorDebugWrapper
-------------------------------------+-------------------------------------
Reporter: akshaytheflash | Owner:
| akshaytheflash
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: callproc, debug, | Triage Stage: Accepted
logging |
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 0 => 1
* needs_docs: 0 => 1
* stage: Unreviewed => Accepted

Comment:

Linters are failing, and needs a release note.
--
Ticket URL: <https://code.djangoproject.com/ticket/36882#comment:5>

Django

unread,
Jan 31, 2026, 2:57:57 AM (6 days ago) Jan 31
to django-...@googlegroups.com
#36882: Add debug instrumentation for callproc() in CursorDebugWrapper
-------------------------------------+-------------------------------------
Reporter: akshaytheflash | Owner:
| akshaytheflash
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: callproc, debug, | Triage Stage: Accepted
logging |
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by akshaytheflash):

I’m working on fixing the linters, adding a release note, and updating the
documentation.
Please let me know if there are specific improvements you’d like in the
patch.

Replying to [comment:5 Jacob Walls]:
> Linters are failing, and needs a release note.
--
Ticket URL: <https://code.djangoproject.com/ticket/36882#comment:6>
Reply all
Reply to author
Forward
0 new messages