--
Ticket URL: <https://code.djangoproject.com/ticket/16137>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0
Comment:
The check is enforced at the very beginning of
`django.db.models.query.get_or_create()`:
{{{
assert kwargs, 'get_or_create() must be passed at least one
keyword argument'
}}}
This line has been there, unchanged, since the merge of queryset-refactor.
Actually, it was even in the initial proposal by Adrian:
https://groups.google.com/group/django-developers/msg/1c39b286a3e9e2cb
As far as I can tell, it is not necessary.
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:1>
* type: Uncategorized => Cleanup/optimization
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:2>
* ui_ux: => 0
Comment:
Removing that line causes no unexpected test failures.
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:3>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:4>
* needs_better_patch: 0 => 1
* needs_docs: 0 => 1
Comment:
Patch doesn't apply cleanly.
Also, this needs a mention in the release notes -- nothing fancy, but
people could be relying on the current behavior, even if it isn't really
justified.
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:5>
* owner: nobody => poirier
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:6>
* needs_docs: 1 => 0
* needs_tests: 1 => 0
* needs_better_patch: 1 => 0
Comment:
Updated patch to apply to Django trunk.
Added brief note to 1.4 release notes.
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:7>
Comment (by charettes):
Updated patch with a more descriptive test failure (instead of
{{{self.assertTrue(False)}}})
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:8>
* owner: poirier => nobody
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:9>
Comment (by aaugustin):
#10993 was closed in favor of this ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:10>
* cc: timograham@… (added)
Comment:
Updated patch to apply cleanly to master.
https://github.com/django/django/pull/1214
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:11>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:12>
Comment (by aaugustin):
I left two minor comments on the PR, otherwise this is indeed RFC.
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:13>
* status: new => closed
* resolution: => fixed
Comment:
In 90af278203963e3e3f96e443971cd38a2dad34e4:
Fixed #16137 - Removed kwargs requirement for QuerySet.get_or_create
Thanks wilfred@, poirier, and charettes for work
on the patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:14>