#309 Connection missing attr cursorclass

MySQLdb-1.2
closed
Andy Dustman
MySQLdb (285)
5
2012-09-19
2011-03-14
Anonymous
No

using python 2.7.1 MySQLdb 1.2.3, MySQL 5 on solaris 10
doing the following results in an error Connection has no attribute 'cursorclass' at line 226
http://mysql-python.svn.sourceforge.net/viewvc/mysql-python/tags/MySQLdb-1.2.3b1/MySQLdb/MySQLdb/connections.py?revision=650&view=markup
to fix this line 150(self.cursorclass = kwargs2.pop('cursorclass', self.default_cursor)) needs to be moved to after 170 (super(Connection, self).init(args, *kwargs2))
Then it works. seems that the super().init() wipes out any previously set attributes.
Only tested this on solaris. with python 2.7.1 dont know if the same problem is there on windoze or linux, or if the problem is with python

Discussion

  • Andy Dustman
    Andy Dustman
    2012-09-07

    Fixed in rev 660