This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2008-07-07.13:16:48
SpamBayes Score 2.95113e-07
Marked as misclassified No
Message-id <>
(A) module_register_adapter() doesn't check microprotocols_add() 
result, whereas it can fails (eg. dict setitem error). 
Example: "import _sqlite3; _sqlite3.register_adapter({}, None)" => 
should raise a TypeError (unhashable type: 'dict').

(B) Connection.set_isolation_level() tries to create the 
string "BEGIN "+isolation_level and the store it as PyString in 
begin_statement. But if the result can not be converted to string, 
Python crashs. Example:

>>> import _sqlite3
>>> c=_sqlite3.Connection("a")
>>> c.isolation_level = u"\xe9"
Erreur de segmentation (core dumped)

Attached patch fix the two bugs.
Date User Action Args
2008-07-07 13:16:52vstinnersetspambayes_score: 2.95113e-07 -> 2.95113e-07
recipients: + vstinner
2008-07-07 13:16:52vstinnersetspambayes_score: 2.95113e-07 -> 2.95113e-07
messageid: <>
2008-07-07 13:16:50vstinnerlinkissue3312 messages
2008-07-07 13:16:50vstinnercreate