#285 AttributeError: show_warnings

MySQLdb-1.3
closed
MySQLdb (285)
5
2012-09-19
2009-05-26
Frantisek Vacek
No

stack trace:
...
File 'build/bdist.linux-x86_64/egg/MySQLdb/cursors.py', line 184 in execute
File 'build/bdist.linux-x86_64/egg/MySQLdb/cursors.py', line 90 in _warning_check
AttributeError: show_warnings

patch:
Index: cursors.py
===================================================================
--- cursors.py (revision 629)
+++ cursors.py (working copy)
@@ -1,3 +1,4 @@
+# -- coding: utf-8 --
"""
MySQLdb Cursors
---------------
@@ -87,7 +88,7 @@
"""Check for warnings, and report via the warnings module."""
from warnings import warn
if self._warnings:
- warnings = self._get_db().show_warnings()
+ warnings = self.connection._show_warnings()
if warnings:
# This is done in two loops in case
# Warnings are set to raise exceptions.

Discussion

  • This is now fixed in trunk by change 633. It doesn't affect 1.2br.