[issue16379] SQLite error code not exposed to python

Daniel Shahaf report at bugs.python.org
Sun Dec 30 19:40:28 CET 2012


Daniel Shahaf added the comment:

A couple of random eyebrow-raisers I noticed while working on v2:

- sqlite3.Warning is a subclass of Exception, rather than sqlite3.Error
  or builtins.Warning.  (Also, the docs say "will raise a Warning",
  intending to refer to sqlite3.Warning, but the lack of markup makes
  this ambiguous --- it would be interpreted as a reference to
  builtins.Warning).

- If _PyUnicode_AsStringAndSize() returns NULL, the code sets a
  sqlite3.Warning exception without first checking what exception is
  already set.  (grep for PYSQLITE_SQL_WRONG_TYPE)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16379>
_______________________________________


More information about the Python-bugs-list mailing list