@@ -80,7 +80,7 @@ class NoDefault:
8080safeSQLRE = re .compile (r'^[a-zA-Z_][a-zA-Z0-9_\.]*$' )
8181def sqlIdentifier (obj ):
8282 # some db drivers return unicode column names
83- return isinstance (obj , types . StringTypes ) and bool (safeSQLRE .search (obj .strip ()))
83+ return isinstance (obj , basestring ) and bool (safeSQLRE .search (obj .strip ()))
8484
8585
8686def execute (expr , executor ):
@@ -584,7 +584,7 @@ def filter(self, filter_clause):
584584 # None doesn't filter anything, it's just a no-op:
585585 return self
586586 clause = self .ops ['clause' ]
587- if isinstance (clause , ( str , unicode ) ):
587+ if isinstance (clause , basestring ):
588588 clause = SQLConstant ('(%s)' % clause )
589589
590590 if clause == SQLTrueClause :
@@ -849,7 +849,7 @@ def ISNOTNULL(expr):
849849class ColumnAS (SQLOp ):
850850 ''' Just like SQLOp('AS', expr, name) except without the parentheses '''
851851 def __init__ (self , expr , name ):
852- if isinstance (name , ( str , unicode ) ):
852+ if isinstance (name , basestring ):
853853 name = SQLConstant (name )
854854 SQLOp .__init__ (self , 'AS' , expr , name )
855855 def __sqlrepr__ (self , db ):
@@ -888,7 +888,7 @@ def __sqlrepr__(self, db):
888888 return "CONCAT(%s)" % ", " .join (values )
889889 else :
890890 return " || " .join (values )
891- elif isinstance (s , ( str , unicode ) ):
891+ elif isinstance (s , basestring ):
892892 s = _quote_percent (sqlrepr (s , db )[1 :- 1 ], db )
893893 return "'%s%s%s'" % (self .prefix , s , self .postfix )
894894 else :
0 commit comments