#36477: Add an internal helper for deprecating positional arguments in favor of
keyword-only arguments
-------------------------------------+-------------------------------------
Reporter: Sarah | Owner: Mike Edmunds
Boyce |
Type: | Status: assigned
Cleanup/optimization |
Component: Utilities | Version: dev
Severity: Normal | Keywords:
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
It is a fairly common pattern that "passing positional arguments [argument
names] to [something] is deprecated in favor of keyword-only arguments".
See #34355, #35060 and #36163 for some examples.
As this is common, it would be useful to have a utility to help do this
correctly (see #35554 for an issue we have had with this deprecation
pathway previously).
It would also be nice to have this utility documented within the
deprecation section in the contributing docs:
https://docs.djangoproject.com/en/5.2/internals/contributing/writing-code
/submitting-patches/#deprecating-a-feature
https://github.com/django/django/pull/19145 implements a decorator to do
this
--
Ticket URL: <
https://code.djangoproject.com/ticket/36477>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.