aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/permissions.py
diff options
context:
space:
mode:
authorTom Christie2013-04-29 12:45:00 +0100
committerTom Christie2013-04-29 12:45:00 +0100
commitdc7b1d643020cac5d585aac42f98962cc7aa6bf7 (patch)
treeaf73e602942e2b566580be7c3827c034c2c3cca4 /rest_framework/permissions.py
parent70831ad0bb62e88ef93e8c1815444ac709eb9883 (diff)
downloaddjango-rest-framework-dc7b1d643020cac5d585aac42f98962cc7aa6bf7.tar.bz2
2.2's PendingDeprecationWarnings now become DeprecationWarnings. 2.3's PendingDeprecationWarnings added.
Diffstat (limited to 'rest_framework/permissions.py')
-rw-r--r--rest_framework/permissions.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/rest_framework/permissions.py b/rest_framework/permissions.py
index 2aa45c71..91bf5ad6 100644
--- a/rest_framework/permissions.py
+++ b/rest_framework/permissions.py
@@ -26,9 +26,11 @@ class BasePermission(object):
Return `True` if permission is granted, `False` otherwise.
"""
if len(inspect.getargspec(self.has_permission).args) == 4:
- warnings.warn('The `obj` argument in `has_permission` is due to be deprecated. '
- 'Use `has_object_permission()` instead for object permissions.',
- PendingDeprecationWarning, stacklevel=2)
+ warnings.warn(
+ 'The `obj` argument in `has_permission` is deprecated. '
+ 'Use `has_object_permission()` instead for object permissions.',
+ DeprecationWarning, stacklevel=2
+ )
return self.has_permission(request, view, obj)
return True