[New-bugs-announce] [issue7394] sqlite3: some OperationalError exceptions should be ProgrammingError (PEP 249)
dontbugme
report at bugs.python.org
Wed Nov 25 17:39:19 CET 2009
New submission from dontbugme <pythonbugsbugmenot at spamavert.com>:
The following code raises OperationalError exceptions:
python -c 'import sqlite3; sqlite3.connect(":memory:").execute("bad
syntax")'
python -c 'import sqlite3; sqlite3.connect(":memory:").execute("SELECT *
FROM no_such_table")'
python -c 'import sqlite3; sqlite3.connect(":memory:").execute("SELECT
no_such_column")'
But ProgrammingError should be raised, as per PEP 249:
ProgrammingError
Exception raised for programming errors, e.g. table not
found or already exists, syntax error in the SQL
statement, wrong number of parameters specified, etc. It
must be a subclass of DatabaseError.
----------
components: Library (Lib)
messages: 95719
nosy: dontbugme
severity: normal
status: open
title: sqlite3: some OperationalError exceptions should be ProgrammingError (PEP 249)
type: behavior
versions: Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7394>
_______________________________________
More information about the New-bugs-announce
mailing list