Message112800
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)
>>> |
|
Date |
User |
Action |
Args |
2010-08-04 13:18:13 | ncw | set | recipients:
+ ncw |
2010-08-04 13:18:12 | ncw | set | messageid: <1280927892.96.0.292259619194.issue9510@psf.upfronthosting.co.za> |
2010-08-04 13:18:10 | ncw | link | issue9510 messages |
2010-08-04 13:18:10 | ncw | create | |
|