From ce7113ccbe5047baeb317c4b854ec119f8b5b460 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Thu, 22 Mar 2012 18:09:22 +0000 Subject: [PATCH] =?UTF-8?q?Used=20SortedDict=20instead=20of=20dict=20to=20?= =?UTF-8?q?avoid=20random=20errors=20that=20may=20occur=20when=20dict=20ra?= =?UTF-8?q?ndomization=20is=20enabled=20in=20Python.=20Refs=20#17758.=20Th?= =?UTF-8?q?anks=20=C5=81ukasz=20Rekucki.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://code.djangoproject.com/svn/django/trunk@17777 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/sql/query.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 693dde3b40..ce11716aba 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -100,7 +100,7 @@ class Query(object): def __init__(self, model, where=WhereNode): self.model = model - self.alias_refcount = {} + self.alias_refcount = SortedDict() self.alias_map = {} # Maps alias to join information self.table_map = {} # Maps table names to list of aliases. self.join_map = {} @@ -819,7 +819,7 @@ class Query(object): assert current < ord('Z') prefix = chr(current + 1) self.alias_prefix = prefix - change_map = {} + change_map = SortedDict() for pos, alias in enumerate(self.tables): if alias in exceptions: continue