comparison MySQLdb/connections.py @ 46:4093fb968cb7 MySQLdb

Bring back conversions for the time being, until we can get trunk actually working right.
author kylev
date Tue, 17 Feb 2009 18:59:35 +0000
parents e7bd07afbcb9
children 7fe4b0b37e8e
comparison
equal deleted inserted replaced
45:28e9be1ca559 46:4093fb968cb7
128 from MySQLdb.constants import CLIENT, FIELD_TYPE 128 from MySQLdb.constants import CLIENT, FIELD_TYPE
129 from MySQLdb.converters import conversions 129 from MySQLdb.converters import conversions
130 from MySQLdb.cursors import Cursor 130 from MySQLdb.cursors import Cursor
131 import _mysql 131 import _mysql
132 from weakref import proxy 132 from weakref import proxy
133 133
134 kwargs2 = kwargs.copy() 134 kwargs2 = kwargs.copy()
135 135
136 if 'conv' in kwargs: 136 if 'conv' in kwargs:
137 conv = kwargs['conv'] 137 conv = kwargs['conv']
138 else: 138 else:
143 if isinstance(k, int): 143 if isinstance(k, int):
144 if isinstance(v, list): 144 if isinstance(v, list):
145 conv2[k] = v[:] 145 conv2[k] = v[:]
146 else: 146 else:
147 conv2[k] = v 147 conv2[k] = v
148 #kwargs2['conv'] = conv2 148 # TODO Remove this when we can do conversions in non-C space.
149 kwargs2['conv'] = conv2
149 150
150 self.cursorclass = kwargs2.pop('cursorclass', Cursor) 151 self.cursorclass = kwargs2.pop('cursorclass', Cursor)
151 charset = kwargs2.pop('charset', '') 152 charset = kwargs2.pop('charset', '')
152 153
153 if charset: 154 if charset: