Author: aaugustin
Date: 2012-03-22 11:09:22 -0700 (Thu, 22 Mar 2012)
New Revision: 17777

Modified:
   django/trunk/django/db/models/sql/query.py
Log:
Used SortedDict instead of dict to avoid random errors that may occur when dict 
randomization is enabled in Python. Refs #17758. Thanks ?\197?\129ukasz Rekucki.


Modified: django/trunk/django/db/models/sql/query.py
===================================================================
--- django/trunk/django/db/models/sql/query.py  2012-03-22 08:49:48 UTC (rev 
17776)
+++ django/trunk/django/db/models/sql/query.py  2012-03-22 18:09:22 UTC (rev 
17777)
@@ -100,7 +100,7 @@
 
     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 @@
         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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to