2012/2/18 Stefan Behnel <stefan...@behnel.de> > The exception handling code that you deleted in __Pyx_GetException(), that > which accesses exc_type and friends, is actually needed for correct > semantics of Cython code and Python code. Basically, it implements the part > of the except clause that moves the hot exception into sys.exc_info(). > > This equally applies to __Pyx_ExceptionSave() and __Pyx_ExceptionReset(), > which form something like an exception backup frame around code sections > that may raise exceptions themselves but must otherwise not touch the > current exception. Specifically, as part of the finally clause. > > In order to fix this, is there a way to store away and restore the current > sys.exc_info() in PyPy? >
I certainly was a bit fast to remove code there, and these exc_value and curexc_value have always been a delicate part of the CPython interpreter. One thing I don't understand for example, is why Cython needs to deal with sys.exc_info, when no other extension uses it for exception management. The only way to know for sure is to have unit tests with different use cases. -- Amaury Forgeot d'Arc
_______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev