mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
Fixed #4607 -- Tweaked checks for features missing in Python 2.3 to not assume
things Python does not guarantee. Patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
284c6ba44b
commit
08aa5c585b
8 changed files with 34 additions and 20 deletions
|
@ -7,9 +7,10 @@ from django.contrib.contenttypes import generic
|
|||
import operator
|
||||
import re
|
||||
|
||||
# For Python 2.3
|
||||
if not hasattr(__builtins__, 'set'):
|
||||
from sets import Set as set
|
||||
try:
|
||||
set
|
||||
except NameError:
|
||||
from sets import Set as set # Python 2.3 fallback
|
||||
|
||||
# The string constant used to separate query parts
|
||||
LOOKUP_SEPARATOR = '__'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue