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

Mailing List Archive: Python: Bugs

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

 

 

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


report at bugs

Dec 11, 2009, 4:11 AM

Post #1 of 5 (240 views)
Permalink
[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

New submission from STINNER Victor <victor.stinner [at] haypocalc>:

Methods create_function, create_aggregate, set_authorizer,
set_progress_handler, create_collation of the _sqlite3.Connection class
doesn't catch PyDict_SetItem/PyDict_DelItem errors. The error will be
catched by next opcode/function call.

The error occurs if the callback argument is not hashable.

Attached patch adds the missing tests, and add unit tests.

There is not unit test for Connection.create_collation() because I don't
know how to test it. The call to PyDict_SetItem() is different, because
the callback is not the dictionary key but the value (so it's not a
problem if the callback is not hashable).

----------
components: Extension Modules
messages: 96248
nosy: haypo
severity: normal
status: open
title: _sqlite3 doesn't catch PyDict_SetItem error
versions: Python 2.7

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7478>
_______________________________________
_______________________________________________
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

Dec 11, 2009, 4:13 AM

Post #2 of 5 (223 views)
Permalink
[issue7478] _sqlite3 doesn't catch PyDict_SetItem error [In reply to]

Changes by STINNER Victor <victor.stinner [at] haypocalc>:


----------
keywords: +patch
Added file: http://bugs.python.org/file15525/_sqlite3_setdict.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7478>
_______________________________________
_______________________________________________
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

Dec 11, 2009, 5:09 AM

Post #3 of 5 (217 views)
Permalink
[issue7478] _sqlite3 doesn't catch PyDict_SetItem error [In reply to]

Changes by Antoine Pitrou <pitrou [at] free>:


----------
nosy: +ghaering
priority: -> normal
stage: -> patch review
type: -> crash
versions: +Python 2.6, Python 3.1, Python 3.2

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7478>
_______________________________________
_______________________________________________
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

Dec 18, 2009, 6:24 AM

Post #4 of 5 (194 views)
Permalink
[issue7478] _sqlite3 doesn't catch PyDict_SetItem error [In reply to]

Gerhard Häring <gh [at] ghaering> added the comment:

Thanks!

I've integrated this into pysqlite
(http://code.google.com/p/pysqlite/source/detail?r=6455981b3283b26c147d949a9031a0d74ea7ffe8)
and will soon push updates to the version in Python core.

In my opinion this changes is not critical enough to warrant pushing it
into Python 2.6. Do you agree?

----------
assignee: -> ghaering

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7478>
_______________________________________
_______________________________________________
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

Dec 18, 2009, 6:28 AM

Post #5 of 5 (194 views)
Permalink
[issue7478] _sqlite3 doesn't catch PyDict_SetItem error [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

It should be backported to Python 2.6, like any bug fix (and especially
when it's about a crasher).

----------
nosy: +pitrou

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7478>
_______________________________________
_______________________________________________
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 Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.