#35561: Model.save()/asave() deprecation allows duplicate arguments
-------------------------------------+-------------------------------------
Reporter: Adam | Owner: nobody
Johnson |
Type: | Status: new
Cleanup/optimization |
Component: Database | Version: 5.1
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Follow-up to #35554.
The deprecation code from #35060 allows duplicate arguments between the
positional and keyword variants. For example, `Model.save(True,
force_insert=False)` tries to set `force_insert` to `True` positionally
and `False` by keyword.
This should be detected and raised as a `TypeError`, like Python would
normally do.
--
Ticket URL: <
https://code.djangoproject.com/ticket/35561>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.