garbage collection of cursors.
MySQL database connector for Python programming
Brought to you by:
adustman
Garbage collection of a non closed BaseCursor results
in an error. This typically happens when you have long
living cursors (like fi you'ld have in a Zope product).
The typical exception is:
Exception exceptions.AttributeError: "'None' object has
no attribute 'close'" in <method BaseCursor.del of
Cursor instance at 00CA1A7C> ignored
It is not a critical bug since it only happens on shut
downs and such. But it is ugly ;)
I'm not quite sure which version of the lib I'm using.
I installed it some time (several months) ago, and
I can't find a version number in the code except for:
in init.py
revision = """$Revision: 1.11 $"""[11:-2]
have fun,
Sloot.
Logged In: YES
user_id=186448
Call me blind.
version_info = (0,9,1,"final",1)
Logged In: YES
user_id=71372
0.9.2 fixed this, iirc. Note that there are currently
problems with the MySQLdb-0.9.2/ZMySQLDA-2.0.x/Python-2.2.x
combination, due to a bug in the handling of attributes that
only affects direct use of _mysql in Python 2.2. 0.9.2
should work fine if you are still using Python 2.1.3 with Zope.
Logged In: NO
I'm getting errors like this in 0.9.2 with Python 2.1.1.
File "/usr/lib/python2.1/site-
packages/MySQLdb/cursors.py", line 246, in close
BaseCursor.close(self)
TypeError: unbound method close() must be called with
instance as first argument
Nick Murtagh