On Fri, Dec 11, 2009 at 9:15 AM, mattimust...@gmail.com
<mattimust...@gmail.com> wrote:
>
>
> On Dec 11, 11:21 am, Russell Keith-Magee <freakboy3...@gmail.com>
> wrote:
>> Hi all,
>>
>> I've just uploaded RC1 patches to two tickets.
>>
>> Firstly, #7052 - Fixing auth and contenttype serialization. Since the
>> most recent patch, I've added documentation, I've made some tweaks to
>> ensure backwards compatibility, and improved the dependency evaluation
>> process on serialization. I've also made a terminology change - the
>> patch now refers to "natural keys" rather than "surrogate keys".
>>
>> Secondly, #6262 - Cached template loaders. This patch also has a
>> slight change, following on from the BDFL decision to use class-based
>> rather than module-based backend specifiers.
>>
>> Any review notes or bug reports on these patches would be most welcome.
>>
>> My intention is to commit these two patches early next week. If you
>> have any objections to this plan, now is the time to raise those
>> objections.
>>
>
> Hi Russ,
>
> Regarding "natural keys", your patch does not seem to backwards
> compatible with other consumers of serialized models. Once you add the
> the 'natural_key' method to a model then the serializer will always
> use it.
>
> What if a programmer wants the old default (pk only) behaviour for
> Permissions and ContentType?

Valid point. Ironically, this is one of those occasions where a
backwards incompatibility wasn't detected by the test suite because it
wasn't previously possible to have serialization tests that involve
content types.

> I'd like to see an argument to the serializer like 'use_natural_keys'
> so that current behaviour is retained and developers can opt-in to the
> new one if they so wish.

Thanks for the suggestion. Adding a flag to dumpdata and serialize()
seems like a reasonable approach to the problem. I'll try to upload an
updated patch over the weekend.

Yours,
Russ Magee %-)

--

You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.


Reply via email to