On Wednesday, November 7, 2012 1:48:09 AM UTC-8, Marc Tamlyn wrote:
>
> It seems there had been a little confusion as to exactly what the initial 
> proposal was. I had assumed it was just about removing the `depth` argument 
> but it was still possible to pass *no* arguments to get the implicit 
> "follow everything" behaviour. In fact Luke was suggesting that we remove 
> this behaviour as well, requiring the user to pass in some field names. 
> This has various knock on effects within Django (mostly in the admin), but 
> they're not particularly difficult to fix. My concern is that I've seen 
> "blank" select related calls quite often in the wild (although never seen 
> depth=), so it may break a few more things. Then again, blank select 
> related calls are pretty risky, and although it's not documented are 
> actually equivalent to `depth=5`. I'm not really against deprecating this 
> but I thought it should be made clear exactly what the deprecation was (and 
> we should get this sorted out for 1.5).
>
> Marc
>
>
I agree deprecating select_related() in favor of select_related(*fields) is 
a whole 'nother ball of wax over just deprecating depth kwarg (which has 
now been done).

While using *fields explicitly may be the better way to go in most cases, 
and we can document that more strongly - it feels like eliminating the 
historically simple version, which can still be useful in simple, shallow 
cases goes a bit far - but I'm more of a -0 than -1 on it.

-Preston

On Saturday, 3 November 2012 01:19:59 UTC, Russell Keith-Magee wrote:
>>
>>
>> On Fri, Nov 2, 2012 at 10:33 PM, Jacob Kaplan-Moss <ja...@jacobian.org>wrote:
>>
>>> On Fri, Nov 2, 2012 at 9:29 AM, Marc Tamlyn <marc....@gmail.com> wrote:
>>> > If anyone has any major objections to the deprecation of depth, you 
>>> should
>>> > shout now. If there are no objections and people think it's ok to push 
>>> this
>>> > deprecation in now, then I'll get a patch done on Monday.
>>>
>>> No objections here. Depth was a simple protection we added before we
>>> got select_related(*fields); the *fields form is a ton more useful. +1
>>> on deprecating depth.
>>>
>>>  
>> Sounds good to me too. +1.
>>
>> Russ %-)
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-developers/-/6Fj-Dft7feQJ.
To post to this group, send email to django-developers@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