From 33002cedff527063418a6b611b3492be98dc703a Mon Sep 17 00:00:00 2001 From: adustman Date: Fri, 7 Sep 2012 18:09:19 +0000 Subject: [PATCH] Delay setting cursorclass until after superclass initialization. Fixes #3211938 --- MySQLdb/MySQLdb/connections.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MySQLdb/MySQLdb/connections.py b/MySQLdb/MySQLdb/connections.py index 63801d9..2b60311 100644 --- a/MySQLdb/MySQLdb/connections.py +++ b/MySQLdb/MySQLdb/connections.py @@ -164,7 +164,7 @@ class Connection(_mysql.connection): conv2[k] = v kwargs2['conv'] = conv2 - self.cursorclass = kwargs2.pop('cursorclass', self.default_cursor) + cursorclass = kwargs2.pop('cursorclass', self.default_cursor) charset = kwargs2.pop('charset', '') if charset: @@ -185,7 +185,7 @@ class Connection(_mysql.connection): kwargs2['client_flag'] = client_flag super(Connection, self).__init__(*args, **kwargs2) - + self.cursorclass = cursorclass self.encoders = dict([ (k, v) for k, v in conv.items() if type(k) is not int ])