summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
diff options
context:
space:
mode:
authorCurtis Maloney <curtis@tinbrain.net>2013-08-03 15:41:15 +1000
committerTim Graham <timograham@gmail.com>2013-08-04 07:09:39 -0400
commit07876cf02b6db453ca0397c29c225668872fa96d (patch)
tree2a27c0e5e6ea67e8736547b42e29c9f43af5433e /django/utils/datastructures.py
parentb278f7478d37d3620e5addf7cc2070bc38c10871 (diff)
Deprecated SortedDict (replaced with collections.OrderedDict)
Thanks Loic Bistuer for the review.
Diffstat (limited to 'django/utils/datastructures.py')
-rw-r--r--django/utils/datastructures.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index 3b1638392c..d6447ec0c7 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -1,7 +1,7 @@
import copy
+import warnings
from django.utils import six
-
class MergeDict(object):
"""
A simple class for creating new "virtual" dictionaries that actually look
@@ -124,6 +124,10 @@ class SortedDict(dict):
return instance
def __init__(self, data=None):
+ warnings.warn(
+ "SortedDict is deprecated and will be removed in Django 1.9.",
+ PendingDeprecationWarning, stacklevel=2
+ )
if data is None or isinstance(data, dict):
data = data or []
super(SortedDict, self).__init__(data)