On Thu, Dec 18, 2014 at 5:03 AM, Aymeric Augustin <
[email protected]> wrote:

> On 17 déc. 2014, at 21:54, Carl Meyer <[email protected]> wrote:
>
> > So I think there is a backwards-compatibility issue.
>
> Indeed.
>
> > Personally, I would love to decide to just bite this bullet and
> > normalize to lists, but I think it would need to be marked as a
> > backwards-incompatibility in the release notes, and it would certainly
> > bite people.
>
> We can do that. The error is easy to fix if it occurs. Technically
> django.conf.global_settings is a private API.
>
> But I feel guilty to break code just for consistency and aesthetics :-/
>

I agree that lists are preferable to tuples.

As for backwards incompatibility: we can update the new project template,
and we can update the docs; but I don't think we can play the
"global_settings is internal API" card here. The file global_settings might
not be formally documented, but the contents are, and the default settings
provided by Django are documented; and even if they weren't, this is a high
traffic area of the Django API.

One option for handling existing projects might be to define our own
subclass of list that defines __add__, __iadd__, and __radd__ such that it
will accept a tuple, converting to a list, and raise a DeprecationWarning;
in a later version, we can replace that subclass with a simple list. We
wouldn't document this class, and it would only be used in
global_settings.py. This would cover the most common use case (adding
something to a default setting), and provide a migration path. Thoughts?

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAJxq848rBK0pZD_FSXYf-tR8ZBPG7AwrWQwDCO4WnKMu77ZyqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to