Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue3312] bugs in _sqlite module

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Jul 7, 2008, 6:16 AM

Post #1 of 2 (71 views)
Permalink
[issue3312] bugs in _sqlite module

New submission from STINNER Victor <haypo[at]users.sourceforge.net>:

(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.

----------
components: Library (Lib)
files: _sqlite.patch
keywords: patch
messages: 69387
nosy: haypo
severity: normal
status: open
title: bugs in _sqlite module
versions: Python 2.6
Added file: http://bugs.python.org/file10841/_sqlite.patch

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue3312>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 16, 2008, 3:33 PM

Post #2 of 2 (51 views)
Permalink
[issue3312] bugs in _sqlite module [In reply to]

Georg Brandl <georg[at]python.org> added the comment:

Thanks, fixed in r65040.

----------
nosy: +georg.brandl
resolution: -> fixed
status: open -> closed

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue3312>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.