New submission from Nick Craig-Wood <n...@craig-wood.com>: sqlite3.Warning isnt a subclass of exceptions.Warning
This causes this problem when trying to filter warnings >>> import sqlite3 as DB >>> from warnings import filterwarnings >>> filterwarnings("always", category=DB.Warning) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/warnings.py", line 56, in filterwarnings assert issubclass(category, Warning), "category must be a Warning subclass" AssertionError: category must be a Warning subclass >>> Other databases do this correctly, eg >>> import MySQLdb as DB >>> from warnings import filterwarnings >>> filterwarnings("always", category=DB.Warning) >>> ---------- components: Library (Lib) files: sqlite3-warning-fix.patch keywords: patch messages: 112800 nosy: ncw priority: normal severity: normal status: open title: sqlite3.Warning isnt a subclass of exceptions.Warning type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file18383/sqlite3-warning-fix.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9510> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com