diff options
| author | Tom Christie | 2013-04-29 12:45:00 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-04-29 12:45:00 +0100 | 
| commit | dc7b1d643020cac5d585aac42f98962cc7aa6bf7 (patch) | |
| tree | af73e602942e2b566580be7c3827c034c2c3cca4 /rest_framework/permissions.py | |
| parent | 70831ad0bb62e88ef93e8c1815444ac709eb9883 (diff) | |
| download | django-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.py | 8 | 
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 | 
