[pypy-commit] pypy default: fix numpy test suite fail, test needed

mattip pypy.commits at gmail.com
Wed Sep 6 14:27:33 EDT 2017


Author: Matti Picus <matti.picus at gmail.com>
Branch: 
Changeset: r92341:aa8394da03c4
Date: 2017-09-06 21:24 +0300
http://bitbucket.org/pypy/pypy/changeset/aa8394da03c4/

Log:	fix numpy test suite fail, test needed

diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py
--- a/pypy/module/cpyext/api.py
+++ b/pypy/module/cpyext/api.py
@@ -40,6 +40,7 @@
 from rpython.rlib import rawrefcount
 from rpython.rlib import rthread
 from rpython.rlib.debug import fatalerror_notb
+from rpython.rlib import rstackovf
 from pypy.objspace.std.typeobject import W_TypeObject, find_best_base
 from pypy.module.cpyext.cparser import CTypeSpace
 
@@ -940,6 +941,11 @@
                     message = str(e)
                 state.set_exception(OperationError(space.w_SystemError,
                                                    space.newtext(message)))
+            except rstackovf.StackOverflow as e:
+                rstackovf.check_stack_overflow()
+                failed = True
+                state.set_exception(OperationError(space.w_RuntimeError,
+                         space.newtext("maximum recursion depth exceeded")))
             else:
                 failed = False
 


More information about the pypy-commit mailing list