Code

Ticket #1142: py23_set_fix_28feb07.diff

File py23_set_fix_28feb07.diff, 570 bytes (added by afarnham@…, 7 years ago)

Fixes mulitple-db-support branch django/db/models/manager.py for Python 2.3

Line 
1Index: django/db/models/manager.py
2===================================================================
3--- django/db/models/manager.py (revision 4647)
4+++ django/db/models/manager.py (working copy)
5@@ -11,6 +11,10 @@
6     # Import copy of _thread_local.py from Python 2.4
7     from django.utils._threading_local import local
8
9+# For Python 2.3
10+if not hasattr(__builtins__, 'set'):
11+    from sets import Set as set
12+
13 # Size of each "chunk" for get_iterator calls.
14 # Larger values are slightly faster at the expense of more storage space.
15 GET_ITERATOR_CHUNK_SIZE = 100