Author Mark.Shannon
Recipients Mark.Shannon, asvetlov, benjamin.peterson, brett.cannon, emptysquare, larry, martin.panter, ncoghlan, njs, pitrou, scoder, serhiy.storchaka, vstinner, yselivanov
Date 2017-10-30.10:59:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509361196.75.0.213398074469.issue25612@psf.upfronthosting.co.za>
In-reply-to
Content
Looking at the docs:

https://docs.python.org/3.6/library/sys.html#sys.exc_info states:
     If the current stack frame is not handling an exception, the information is taken from the calling stack frame, or its caller, and so on until a stack frame is found that is handling an exception.

And https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement

If no expressions are present, raise re-raises the last exception that was active in the current scope. If no exception is active in the current scope, a RuntimeError exception is raised indicating that this is an error.

Note that `sys.exc_info()` explicitly mentions scanning the stack, but `raise` just says "active in the current scope". Testing on 3.5 shows that "active in the current scope" does scan the stack (for simple calls at least).

Which means that the newly implemented behaviour is correct.



> Note that removing exc_type, exc_value and exc_traceback from PyThreadState breaks Cython.

Is there a matching Cython issue?
History
Date User Action Args
2017-10-30 10:59:57Mark.Shannonsetrecipients: + Mark.Shannon, brett.cannon, ncoghlan, pitrou, scoder, vstinner, larry, benjamin.peterson, njs, asvetlov, martin.panter, serhiy.storchaka, yselivanov, emptysquare
2017-10-30 10:59:56Mark.Shannonsetmessageid: <1509361196.75.0.213398074469.issue25612@psf.upfronthosting.co.za>
2017-10-30 10:59:56Mark.Shannonlinkissue25612 messages
2017-10-30 10:59:56Mark.Shannoncreate