Deprecated SortedDict (replaced with collections.OrderedDict)

Thanks Loic Bistuer for the review.
This commit is contained in:
Curtis Maloney 2013-08-03 15:41:15 +10:00 committed by Tim Graham
parent b278f7478d
commit 07876cf02b
26 changed files with 139 additions and 107 deletions

View file

@ -1,4 +1,5 @@
from __future__ import unicode_literals
from collections import OrderedDict
import hashlib
from importlib import import_module
import os
@ -16,7 +17,6 @@ from django.core.cache import (get_cache, InvalidCacheBackendError,
from django.core.exceptions import ImproperlyConfigured
from django.core.files.base import ContentFile
from django.core.files.storage import FileSystemStorage, get_storage_class
from django.utils.datastructures import SortedDict
from django.utils.encoding import force_bytes, force_text
from django.utils.functional import LazyObject
from django.utils._os import upath
@ -64,7 +64,7 @@ class CachedFilesMixin(object):
except InvalidCacheBackendError:
# Use the default backend
self.cache = default_cache
self._patterns = SortedDict()
self._patterns = OrderedDict()
for extension, patterns in self.patterns:
for pattern in patterns:
if isinstance(pattern, (tuple, list)):
@ -202,7 +202,7 @@ class CachedFilesMixin(object):
def post_process(self, paths, dry_run=False, **options):
"""
Post process the given SortedDict of files (called from collectstatic).
Post process the given OrderedDict of files (called from collectstatic).
Processing is actually two separate operations: