From 907014dab93dc24ff754257c00f1e9c561061cc8 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Fri, 11 Oct 2013 13:32:07 -0600 Subject: [PATCH] Flesh out the backwards-incompatibility note about indexing Choices. --- CHANGES.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 51f6022..9b869ac 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,9 +10,12 @@ master (unreleased) * `get_subclass()` method is now available on both managers and querysets. Thanks Travis Swicegood. Merge of GH-82. -* Indexing into a ``Choices`` instance now translates database representations - to human-readable choice names, rather than simply indexing into an array of - choice tuples. (Indexing into ``Choices`` was previously not documented.) +* BACKWARDS-INCOMPATIBLE: Indexing into a ``Choices`` instance now translates + database representations to human-readable choice names, rather than simply + indexing into an array of choice tuples. (Indexing into ``Choices`` was + previously not documented.) If you have code that is relying on indexing or + slicing ``Choices``, the simplest workaround is to change e.g. ``STATUS[1:]`` + to ``list(STATUS)[1:]``. * Fix bug in `InheritanceManager` with grandchild classes on Django 1.6+; `select_subclasses('child', 'child__grandchild')` would only ever get to the