diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-12-25 21:07:27 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-12-29 21:59:07 +0100 |
| commit | ef017a5f00d9e84059e00e8fea123be51b293f75 (patch) | |
| tree | ff0bf6ebfb015465e1ceee3d2551f1c7a200d07f /django/utils/datastructures.py | |
| parent | 130829334c32f48b9ba6e6251d0e780c0d99cd4d (diff) | |
Advanced pending deprecation warnings.
Also added stacklevel argument, fixed #18127.
Diffstat (limited to 'django/utils/datastructures.py')
| -rw-r--r-- | django/utils/datastructures.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py index f81fb88a19..64c218fe43 100644 --- a/django/utils/datastructures.py +++ b/django/utils/datastructures.py @@ -217,7 +217,7 @@ class SortedDict(dict): # using collections.OrderedDict (Python 2.7 and up), which we'll # eventually switch to warnings.warn( - "SortedDict.value_for_index is deprecated", PendingDeprecationWarning, + "SortedDict.value_for_index is deprecated", DeprecationWarning, stacklevel=2 ) return self[self.keyOrder[index]] @@ -225,7 +225,7 @@ class SortedDict(dict): def insert(self, index, key, value): """Inserts the key, value pair before the item with the given index.""" warnings.warn( - "SortedDict.insert is deprecated", PendingDeprecationWarning, + "SortedDict.insert is deprecated", DeprecationWarning, stacklevel=2 ) if key in self.keyOrder: |
