One of the ways that we can deal by not making this backward incompatible
would be to add `**kwargs` to the function definition and do something of
this type along the lines:
{{{#!python
def __init__(self, dirs=None, app_dirs=False, context_processors=None,
debug=False, loaders=None, string_if_invalid='',
file_charset='utf-8', libraries=None, builtins=None,
autoescape=True, /, **kwargs):
# because False is it's default value
if not debug and 'debug' not in kwargs:
raise DeprecationWarning('this argument will be made named only
in a later release')
# the same thing can be done with the other two arguments
}}}
Another way would be to fiddle with `inspect.signature`. While the first
one appears lesser complex to me, I'm open to any other suggestions.
If the proposal seems acceptable, I would want to work on it.
--
Ticket URL: <https://code.djangoproject.com/ticket/32794>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* type: Uncategorized => Cleanup/optimization
* resolution: => wontfix
Comment:
There are dozens of methods and functions which accept boolean positional
arguments in Django. It's not worth the additional complexity and backward
compatibility concerns to change them. Moreover users do not initialize
`Engine()` themself in most of cases.
By the way, you'll reach a wider audience if you write to the
DevelopersMailingList about your ideas.
--
Ticket URL: <https://code.djangoproject.com/ticket/32794#comment:1>