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 ned.deily, python-dev, r.david.murray, vstinner
Date 2013-07-22.06:24:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1374474243.72.0.791755853424.issue18519@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2013-07-22 06:24:03vstinnersetrecipients: + vstinner, ned.deily, r.david.murray, python-dev
2013-07-22 06:24:03vstinnersetmessageid: <1374474243.72.0.791755853424.issue18519@psf.upfronthosting.co.za>
2013-07-22 06:24:03vstinnerlinkissue18519 messages
2013-07-22 06:24:03vstinnercreate