#34746: High CPU/memory consumption when a 5XX is raised with large local
variables
-------------------------------------+-------------------------------------
Reporter: Rémi Dupré | Owner: Abdullah
Type: | Mujahid
Cleanup/optimization | Status: assigned
Component: Error reporting | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Abdullah Mujahid):
* needs_tests: 1 => 0
Comment:
I've submitted a fresh PR addressing this issue:
https://github.com/django/django/pull/20578
The implementation uses the standard library's `reprlib.Repr()` to limit
variable representation size during generation, as suggested in the
previous PR discussion. Since Django 6.0+ supports only Python 3.12+, we
can use reprlib directly without compatibility concerns.
Changes include:
- Replaced `pprint` with `reprlib.Repr()` in `django/views/debug.py`
- Updated related tests
- Added release note entry for 6.1
--
Ticket URL: <https://code.djangoproject.com/ticket/34746#comment:24>
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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019bef4457d9-60f450d6-0183-415f-a56b-5866a58986a1-000000%40eu-central-1.amazonses.com.