mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
Advanced pending deprecation warnings.
Also added stacklevel argument, fixed #18127.
This commit is contained in:
parent
130829334c
commit
ef017a5f00
12 changed files with 24 additions and 23 deletions
|
@ -703,7 +703,7 @@ class QuerySet(object):
|
|||
"""
|
||||
if 'depth' in kwargs:
|
||||
warnings.warn('The "depth" keyword argument has been deprecated.\n'
|
||||
'Use related field names instead.', PendingDeprecationWarning)
|
||||
'Use related field names instead.', DeprecationWarning, stacklevel=2)
|
||||
depth = kwargs.pop('depth', 0)
|
||||
if kwargs:
|
||||
raise TypeError('Unexpected keyword arguments to select_related: %s'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue