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 2009-12-11.12:11:17
SpamBayes Score 1.5200199e-07
Marked as misclassified No
Message-id <1260533479.81.0.324820101165.issue7478@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2009-12-11 12:11:19vstinnersetrecipients: + vstinner
2009-12-11 12:11:19vstinnersetmessageid: <1260533479.81.0.324820101165.issue7478@psf.upfronthosting.co.za>
2009-12-11 12:11:18vstinnerlinkissue7478 messages
2009-12-11 12:11:17vstinnercreate