mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-06-18 22:54:22 -04:00
- the raw 2to3 run
- went through examples/ and cleaned out excess list() calls
This commit is contained in:
@@ -127,7 +127,7 @@ class RegexSQL(SQLMatchRule):
|
||||
# do a positive compare only
|
||||
|
||||
for param, received in zip(params, _received_parameters):
|
||||
for k, v in param.iteritems():
|
||||
for k, v in param.items():
|
||||
if k not in received or received[k] != v:
|
||||
equivalent = False
|
||||
break
|
||||
@@ -180,7 +180,7 @@ class CompiledSQL(SQLMatchRule):
|
||||
all_received = list(_received_parameters)
|
||||
while params:
|
||||
param = dict(params.pop(0))
|
||||
for k, v in context.compiled.params.iteritems():
|
||||
for k, v in context.compiled.params.items():
|
||||
param.setdefault(k, v)
|
||||
if param not in _received_parameters:
|
||||
equivalent = False
|
||||
@@ -195,9 +195,9 @@ class CompiledSQL(SQLMatchRule):
|
||||
all_received = []
|
||||
self._result = equivalent
|
||||
if not self._result:
|
||||
print 'Testing for compiled statement %r partial params '\
|
||||
print('Testing for compiled statement %r partial params '\
|
||||
'%r, received %r with params %r' % (self.statement,
|
||||
all_params, _received_statement, all_received)
|
||||
all_params, _received_statement, all_received))
|
||||
self._errmsg = \
|
||||
'Testing for compiled statement %r partial params %r, '\
|
||||
'received %r with params %r' % (self.statement,
|
||||
@@ -262,7 +262,7 @@ def _process_engine_statement(query, context):
|
||||
|
||||
# oracle+zxjdbc passes a PyStatement when returning into
|
||||
|
||||
query = unicode(query)
|
||||
query = str(query)
|
||||
if context.engine.name == 'mssql' \
|
||||
and query.endswith('; select scope_identity()'):
|
||||
query = query[:-25]
|
||||
|
||||
Reference in New Issue
Block a user