#35459: Case.extra is undocumented, untested, and can hide potential issues
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Priyank
Type: | Panchal
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):
Thanks, Tim. Before I saw the test case I wasn't aware that template was
an allowed kwarg to `Case` and `Subquery`. I thought it had to be a class
attribute, which is why I thought there was a use case for interpolating
params at query time. But if you can provide the template dynamically, I
agree the use case isn't compelling. Given that, deprecating `**extra`
here makes sense to me.
Regardless, should we accept a unit test for providing a `template` kwarg
to Case and Subquery? I don't see one in the suite.
--
Ticket URL: <https://code.djangoproject.com/ticket/35459#comment:14>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/01070191c286ccf0-a8abf495-fcec-4c95-9b83-887bc6d8f96c-000000%40eu-central-1.amazonses.com.