New issue 2142: cpyext-driven crash when using cython - NotImplementedError when using __sub__ https://bitbucket.org/pypy/pypy/issues/2142/cpyext-driven-crash-when-using-cython
Marco Neumann: ## Environment ## foo.pyx: ``` #!python cdef class C: def __cinit__(self): pass def __sub__(self, o): return 0 ``` test.py: ``` #!python import foo a = foo.C() b = foo.C() a - b ``` cython --version: ``` #! Cython version 0.23.2 ``` pypy --version: ``` #! Python 2.7.10 (f3ad1e1e1d62, Sep 07 2015, 21:46:51) [PyPy 2.6.1 with GCC 5.2.0] ``` gcc --version: ``` #! gcc (GCC) 5.2.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` ## Steps to reproduce ## ``` #! cython foo.pyx gcc -shared -IPATH/TO/YOUR/PYPY/INCLUDE -fPIC foo.c -o foo.pypy-26.so pypy test.py ``` ## Result ## ``` #! RPython traceback: File "pypy_interpreter_gateway.c", line 812, in BuiltinCodePassThroughArguments1_funcrun_obj File "pypy_module_cpyext_slotdefs.c", line 2661, in wrap_binaryfunc_l_11 Fatal RPython error: NotImplementedError fish: “pypy test.py” terminated by signal SIGABRT (Abort) ``` ## References ## This bug mentioned here: https://groups.google.com/forum/#!topic/cython-users/Nm56Ow-toQw _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue