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.951131e-07
Marked as misclassified No
Message-id <1215436611.84.0.797718972528.issue3312@psf.upfronthosting.co.za>
In-reply-to
Content
(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.
History
Date User Action Args
2008-07-07 13:16:52vstinnersetspambayes_score: 2.95113e-07 -> 2.951131e-07
recipients: + vstinner
2008-07-07 13:16:52vstinnersetspambayes_score: 2.95113e-07 -> 2.95113e-07
messageid: <1215436611.84.0.797718972528.issue3312@psf.upfronthosting.co.za>
2008-07-07 13:16:50vstinnerlinkissue3312 messages
2008-07-07 13:16:50vstinnercreate