STINNER Victor added the comment:
> Raised by what?
The test raising the assertion error is a Python authorizer callback which
returns a Python int (2**32) larger than a C int (> INT_MAX) and so an
OverflowError is raised in the C authorizer callback.
> Are you sure you don't just need to clear the exception
> if the callback function raises one?
I read the code one more time, and I saw this:
if (_enable_callback_tracebacks) {
PyErr_Print();
} else {
PyErr_Clear();
}
So it is expected that the C authorizer callback clears the error.
Here is a new patch which implement the same behaviour on _PyLong_AsInt()
failure.
----------
keywords: +patch
resolution: fixed ->
status: closed -> open
Added file: http://bugs.python.org/file31002/sqlite_authorizer_err.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18519>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com