#35395: slice filter crashes on an empty dict with Python 3.12
-------------------------------------+-------------------------------------
Reporter: Tim Richardson | Owner: Tim
| Richardson
Type: Bug | Status: closed
Component: Template system | Version: 4.2
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):
* resolution: => fixed
* status: assigned => closed
Comment:
In [changeset:"e64d42e753e5c7763398d018f5ccaa95efc7588e" e64d42e]:
{{{#!CommitTicketReference repository=""
revision="e64d42e753e5c7763398d018f5ccaa95efc7588e"
Fixed #35395 -- slice filter crashes on an empty dict with Python 3.12.
Keep consistent behaviour of slice() filter between python 3.12 and prior
versions in the case of a dict passed to the filter (catch the new to
python
3.12 KeyError exception).
}}}
--
Ticket URL: <
https://code.djangoproject.com/ticket/35395#comment:13>