<div class="gmail_quote">2012/2/18 Stefan Behnel <span dir="ltr">&lt;<a href="mailto:stefan_ml@behnel.de">stefan_ml@behnel.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":wm">The exception handling code that you deleted in __Pyx_GetException(), that<br>
which accesses exc_type and friends, is actually needed for correct<br>
semantics of Cython code and Python code. Basically, it implements the part<br>
of the except clause that moves the hot exception into sys.exc_info().<br>
<br>
This equally applies to __Pyx_ExceptionSave() and __Pyx_ExceptionReset(),<br>
which form something like an exception backup frame around code sections<br>
that may raise exceptions themselves but must otherwise not touch the<br>
current exception. Specifically, as part of the finally clause.<br>
<br>
In order to fix this, is there a way to store away and restore the current<br>
sys.exc_info() in PyPy?</div></blockquote></div><br>I certainly was a bit fast to remove code there, and these<div>exc_value and curexc_value have always been a delicate</div><div>part of the CPython interpreter.<div><br>
</div><div>One thing I don&#39;t understand for example, is why Cython needs to deal with</div><div>sys.exc_info, when no other extension uses it for exception management.<br clear="all"><div><div><br></div><div>The only way to know for sure is to have unit tests with different use cases.</div>
</div><div><br></div>-- <br>Amaury Forgeot d&#39;Arc<br>
</div></div>