From c820892eed9ea10879270e64e8109dc44829756a Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 19 Nov 2014 12:22:23 -0500 Subject: Removed django.utils.datastructures.SortedDict per deprecation timeline. --- docs/ref/utils.txt | 28 ---------------------------- docs/releases/1.0-porting-guide.txt | 4 ++-- docs/releases/1.7.txt | 3 +-- docs/topics/python3.txt | 2 +- 4 files changed, 4 insertions(+), 33 deletions(-) (limited to 'docs') diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 55184c277b..d1881bb830 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -97,34 +97,6 @@ need to distinguish caches by the ``Accept-language`` header. cache, this just means that we have to build the response once to get at the Vary header and so at the list of headers to use for the cache key. -``django.utils.datastructures`` -=============================== - -.. module:: django.utils.datastructures - :synopsis: Data structures that aren't in Python's standard library. - -.. class:: SortedDict - -.. deprecated:: 1.7 - ``SortedDict`` is deprecated and will be removed in Django 1.9. Use - :class:`collections.OrderedDict` instead. - - The :class:`django.utils.datastructures.SortedDict` class is a dictionary - that keeps its keys in the order in which they're inserted. - -Creating a new SortedDict -------------------------- - -Creating a new ``SortedDict`` must be done in a way where ordering is -guaranteed. For example:: - - SortedDict({'b': 1, 'a': 2, 'c': 3}) - -will not work. Passing in a basic Python ``dict`` could produce unreliable -results. Instead do:: - - SortedDict([('b', 1), ('a', 2), ('c', 3)]) - ``django.utils.dateparse`` ========================== diff --git a/docs/releases/1.0-porting-guide.txt b/docs/releases/1.0-porting-guide.txt index a3c1a95702..a8b4ccaa26 100644 --- a/docs/releases/1.0-porting-guide.txt +++ b/docs/releases/1.0-porting-guide.txt @@ -714,12 +714,12 @@ Data structures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``django.newforms.forms.SortedDictFromList`` was removed. -:class:`django.utils.datastructures.SortedDict` can now be instantiated with +``django.utils.datastructures.SortedDict`` can now be instantiated with a sequence of tuples. To update your code: -1. Use :class:`django.utils.datastructures.SortedDict` wherever you were +1. Use ``django.utils.datastructures.SortedDict`` wherever you were using ``django.newforms.forms.SortedDictFromList``. 2. Because ``django.utils.datastructures.SortedDict.copy`` doesn't diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index b5888bc52a..2592d64983 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -1511,8 +1511,7 @@ Python versions, this module isn't useful anymore. It has been deprecated. Use ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As :class:`~collections.OrderedDict` was added to the standard library in -Python 2.7, :class:`~django.utils.datastructures.SortedDict` is no longer -needed and has been deprecated. +Python 2.7, ``SortedDict`` is no longer needed and has been deprecated. Custom SQL location for models package ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/topics/python3.txt b/docs/topics/python3.txt index 2f12809163..5dc2cf464c 100644 --- a/docs/topics/python3.txt +++ b/docs/topics/python3.txt @@ -181,7 +181,7 @@ versions of Python. :meth:`dict.keys`, :meth:`dict.items` and :meth:`dict.values` return lists in Python 2 and iterators in Python 3. :class:`~django.http.QueryDict` and the -:class:`dict`-like classes defined in :mod:`django.utils.datastructures` +:class:`dict`-like classes defined in ``django.utils.datastructures`` behave likewise in Python 3. six_ provides compatibility functions to work around this change: -- cgit v1.3