mirror of
https://github.com/django/django.git
synced 2025-10-19 23:07:33 +00:00
Deprecated SortedDict (replaced with collections.OrderedDict)
Thanks Loic Bistuer for the review.
This commit is contained in:
parent
b278f7478d
commit
07876cf02b
26 changed files with 139 additions and 107 deletions
|
@ -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:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue