[issue1185] [cpyext] Missing members in PyThreadState

New submission from Colin Rice <dah4k0r@gmail.com>: It appears that pypy doesn't define certain members namely: exc_type, exc_value, exc_tracebacl, curexc_type, curexc_value, curexc_traceback. See http://hg.python.org/cpython/file/d129982c063d/Include/pystate.h Bug appeared when trying to build gevent. ---------- messages: 4466 nosy: c00w, pypy-issue priority: bug status: unread title: [cpyext] Missing members in PyThreadState ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1185> ________________________________________

Amaury Forgeot d Arc <amauryfa@gmail.com> added the comment: Do the compilation errors happen in code generated by Cython, in functions like __Pyx_GetException? If so, you should update to a newer version of Cython, which is more compatible with PyPy; and regenerate core.c. ---------- nosy: +afa status: unread -> chatting ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1185> ________________________________________

Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> added the comment: gevent uses cython and i think it also uses the greenlet c apis (i.e. its impossible to build on pypy atm) ---------- nosy: +ronny ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1185> ________________________________________

Colin Rice <dah4k0r@gmail.com> added the comment: I upgraded to the latest cython and built gevent from a dev release. The only errors which occured were issues with the pystate.h header libraries PyStateThread structure missing these members. This occured both in cython generated functions and in handwritten c functions. Unless PyStateThread is actually the greenlet API I don't believe gevent uses the cpython greenlet api. ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1185> ________________________________________

Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> added the comment: ah, i remember, this is the workaround code for the exception state bug greenlet had some time ago, i fixed that greenlet bug a while back i think the workaround code in gevent recently was moved to a separate module please try to disable it ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1185> ________________________________________

Amaury Forgeot d Arc <amauryfa@gmail.com> added the comment: Note that it won't be possible for cpyext to support these members. Macros or functions should be used instead. ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1185> ________________________________________

Ian Delaney <della5@iinet.com.au> added the comment: also msgpack; for pypy-1,8; /usr/lib64/pypy1.8/include/pypy_decl.h:131:29: note: expected ‘struct PyThreadState *’ but argument is of type ‘int’ error: command 'cc' failed with exit status 1 for pypy-1.9 cc -march=athlon64 -pipe -fomit-frame-pointer -O2 -fPIC -I/usr/lib64/pypy1.9/include -c msgpack/_msgpack.c -o build/temp.linux-x86_64-2.7/msgpack/_msgpack.o msgpack/_msgpack.c: In function ‘init_msgpack’: msgpack/_msgpack.c:5492:96: error: ‘PyBoolObject’ undeclared (first use in this function) msgpack/_msgpack.c:5492:96: note: each undeclared identifier is reported only once for each function it appears in msgpack/_msgpack.c:5493:105: error: ‘PyComplexObject’ undeclared (first use in this function) msgpack/_msgpack.c: In function ‘__Pyx_ErrRestore’: msgpack/_msgpack.c:5731:22: error: ‘PyThreadState’ has no member named ‘curexc_type’ msgpack/_msgpack.c:5732:23: error: ‘PyThreadState’ has no member named ‘curexc_value’ msgpack/_msgpack.c:5733:20: error: ‘PyThreadState’ has no member named ‘curexc_traceback’ msgpack/_msgpack.c:5734:11: error: ‘PyThreadState’ has no member named ‘curexc_type’ msgpack/_msgpack.c:5735:11: error: ‘PyThreadState’ has no member named ‘curexc_value’ msgpack/_msgpack.c:5736:11: error: ‘PyThreadState’ has no member named ‘curexc_traceback’ msgpack/_msgpack.c: In function ‘__Pyx_ErrFetch’: msgpack/_msgpack.c:5744:19: error: ‘PyThreadState’ has no member named ‘curexc_type’ msgpack/_msgpack.c:5745:20: error: ‘PyThreadState’ has no member named ‘curexc_value’ msgpack/_msgpack.c:5746:17: error: ‘PyThreadState’ has no member named ‘curexc_traceback’ msgpack/_msgpack.c:5748:11: error: ‘PyThreadState’ has no member named ‘curexc_type’ msgpack/_msgpack.c:5749:11: error: ‘PyThreadState’ has no member named ‘curexc_value’ msgpack/_msgpack.c:5750:11: error: ‘PyThreadState’ has no member named ‘curexc_traceback’ error: command 'cc' failed with exit status 1 ---------- nosy: +idella5 ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1185> ________________________________________

Amaury Forgeot d Arc <amauryfa@gmail.com> added the comment: "__Pyx_ErrRestore": Please use a version of Cython that supports PyPy. ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1185> ________________________________________

mattip <matti.picus@gmail.com> added the comment: bug tracker cleanup: is this still relevant or can we close it? ---------- nosy: +mattip ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1185> ________________________________________
participants (5)
-
Amaury Forgeot d Arc
-
Colin Rice
-
Ian Delaney
-
mattip
-
Ronny Pfannschmidt