﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35060	Make Model.save() arguments keyword-only	Jacob Walls	Salvo Polizzi	"Following this forum [https://forum.djangoproject.com/t/hook-for-extending-update-fields-in-save-overrides/26040/5 discussion], I suggest making `Model.save()` accept keyword arguments only (following a deprecation period, of course).

For users who need to patch `update_fields` in an overridden `save()`, it would be much simpler to only have to drill into `**kwargs` and not also drill into (and check the length of) `*args` first.

Implementing this ticket would alleviate a small part of a current inconsistency in the advice for overridding save(). In one portion, the implementer is advised to pass through both `*args` and `**kwargs`:

{{{
It's also important that you pass through the arguments that can be
passed to the model method -- that's what the ``*args, **kwargs`` bit
does. Django will, from time to time, extend the capabilities of
built-in model methods, adding new arguments. If you use ``*args,
**kwargs`` in your method definitions, you are guaranteed that your
code will automatically support those arguments when they are added.
}}}

Then, an example tailored to passing through `update_fields`, passes through *no* variadic arguments:
{{{
        def save(
            self, force_insert=False, force_update=False, using=None, update_fields=None
        ):
}}}

We could make the situation better by taking away swallowed `*args` as a vector for bugs."	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	fixed		Adam Johnson David Wobrock	Ready for checkin	1	0	0	0	0	0
