Re: [Cython] build failure on windows with 0.21b2 windows py27 x64
Dirk Rothe schrieb am 01.09.2014 um 12:25: >>> I've also tested with windows+py27+x64 and I get the same errors; >>> >>> configobj.c(42437) : error C2121: '#' : invalid character : possibly the >>> result of a macro expansion >>> configobj.c(42437) : error C2146: syntax error : missing ')' before >>> identifier 'ifdef' >>> configobj.c(42437) : error C2121: '#' : invalid character : possibly the >>> result of a macro expansion >>> configobj.c(42439) : error C2059: syntax error : 'else' >>> configobj.c(42449) : error C2059: syntax error : '}' >>> configobj.c(42463) : error C2121: '#' : invalid character : possibly the >>> result of a macro expansion >>> configobj.c(42463) : error C2121: '#' : invalid character : possibly the >>> result of a macro expansion >>> error: command '"C:\Program Files (x86)\Microsoft Visual Studio >>> 9.0\VC\BIN\amd64\cl.exe"' failed with exit status 2 > > Here we go, I have annotated the start/end with line numbers: > > #if CYTHON_COMPILING_IN_CPYTHON ## Line 42431 > static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, > PyObject *arg) { > if (likely(PyCFunction_Check(func) > #ifdef __Pyx_CyFunction_USED > || PyObject_TypeCheck(func, __pyx_CyFunctionType) > #endif > ) && likely(PyCFunction_GET_FLAGS(func) & METH_O)) { > return __Pyx_PyObject_CallMethO(func, arg); > } else { > PyObject *result; > PyObject *args = PyTuple_New(1); > if (unlikely(!args)) return NULL; > [...] Thanks. My guess is that the macro nesting is a bit too heavy for MSVC here. I pushed a change to the master branch that simplifies it. Could you give it another try? https://github.com/cython/cython/commit/2a1f74aac867fee81e2ddf073f16519f3f454bac Stefan ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
[Cython] preparing a release candidate, pending issues
Hi, current master looks good enough to plan for a release candidate next week. There are only a couple of pending issues that I'm aware of that may or may not get looked into for the release. One thing is cygdb and its tests - are they working again? They seem to work for me, but I don't know what the last status was there. Given how long they must have been broken, it doesn't look all too critical, though. This one should be resolved now: "build failure on windows with 0.21b2 windows py27 x64" http://thread.gmane.org/gmane.comp.python.cython.devel/15424 This isn't, but the solution isn't currently obvious (and I think it can wait until the first bugfix release if we can't find a fix in time): "Buffer dtype mismatch error" http://thread.gmane.org/gmane.comp.python.cython.user/11603 These are open, but don't feel like they should block the release: "error LNK2001: unresolved external symbol PyInit_init" http://thread.gmane.org/gmane.comp.python.cython.devel/15392/focus=15415 "Memory leak with vector of memoryviews" http://thread.gmane.org/gmane.comp.python.cython.user/11704/focus=11705 "how to have hashable extension types in pure python mode ? (__eq__ error)" http://thread.gmane.org/gmane.comp.python.cython.user/11731/focus=11732 This isn't finished but is a new feature which can wait: "Automatic conversion with fixed-size C arrays" https://github.com/cython/cython/pull/308 This hasn't lead anywhere, apparently, but can wait as well: "OpenMP thread private variable not recognized (bug report + discussion)" http://thread.gmane.org/gmane.comp.python.cython.devel/15382 So, nothing critical, but I might have forgotten something. If nothing else comes up, I'll just wait a couple of more days and then start preparing RC and final release. Stefan ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Bug: operator[] does not respect except +
I looked into at least adding a unit test to verify "except +" behavior for all operators and I found that aside from operator(), it seems that all operators ignore "except +". I have C++ code that can throw exceptions inside operator[] and sadly this ends up causing the python interpreter to abort. On Fri, Aug 8, 2014 at 7:04 PM, J Robert Ray wrote: > I apologize for not having a working demonstration, but I have found this > bug and verified it is still an issue in Cython 0.20.2. No try/catch block > is generated for operator[]. In contrast, a try/catch block does get > generated for operator(). > > If it is any use, here is a paraphrasing of the pyx code and the generated > cpp code. > > cdef extern from "blah.h" namespace "blah": > cdef cppclass Blah: > int operator[](int) except + > > ... > > cdef class PyBlah: > ... > def demo(self, int index): > return deref(self.thisptr)[index] > > ... > > /* "Blah.pyx":107 > * def demo(self, int index): > * return deref(self.thisptr)[index] # << > */ > __Pyx_XDECREF(__pyx_r); > __pyx_t_1 = > __Pyx_PyInt_From_int(((*__pyx_v_self->thisptr)[__pyx_v_index])); if > (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; > __pyx_clineno = __LINE__; goto __pyx_L1_error;} > __Pyx_GOTREF(__pyx_t_1); > __pyx_r = __pyx_t_1; > __pyx_t_1 = 0; > goto __pyx_L0; > > > Please let me know if I'm doing anything wrong. Thanks! > ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Bug: operator[] does not respect except +
Yes, this is a bug. On Fri, Sep 5, 2014 at 4:05 PM, J Robert Ray wrote: > I looked into at least adding a unit test to verify "except +" behavior for > all operators and I found that aside from operator(), it seems that all > operators ignore "except +". > > I have C++ code that can throw exceptions inside operator[] and sadly this > ends up causing the python interpreter to abort. > > > On Fri, Aug 8, 2014 at 7:04 PM, J Robert Ray wrote: >> >> I apologize for not having a working demonstration, but I have found this >> bug and verified it is still an issue in Cython 0.20.2. No try/catch block >> is generated for operator[]. In contrast, a try/catch block does get >> generated for operator(). >> >> If it is any use, here is a paraphrasing of the pyx code and the generated >> cpp code. >> >> cdef extern from "blah.h" namespace "blah": >> cdef cppclass Blah: >> int operator[](int) except + >> >> ... >> >> cdef class PyBlah: >> ... >> def demo(self, int index): >> return deref(self.thisptr)[index] >> >> ... >> >> /* "Blah.pyx":107 >> * def demo(self, int index): >> * return deref(self.thisptr)[index] # << >> */ >> __Pyx_XDECREF(__pyx_r); >> __pyx_t_1 = >> __Pyx_PyInt_From_int(((*__pyx_v_self->thisptr)[__pyx_v_index])); if >> (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; >> __pyx_clineno = __LINE__; goto __pyx_L1_error;} >> __Pyx_GOTREF(__pyx_t_1); >> __pyx_r = __pyx_t_1; >> __pyx_t_1 = 0; >> goto __pyx_L0; >> >> >> Please let me know if I'm doing anything wrong. Thanks! > > > > ___ > cython-devel mailing list > cython-devel@python.org > https://mail.python.org/mailman/listinfo/cython-devel > ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] preparing a release candidate, pending issues
Stefan, Any update to the following? "Compiler crash in RemoveUnreachableCode" http://thread.gmane.org/gmane.comp.python.cython.devel/15184 Thanks. Andriy Kornatskyy On Sep 5, 2014, at 10:39 PM, Stefan Behnel wrote: > Hi, > > current master looks good enough to plan for a release candidate next week. > There are only a couple of pending issues that I'm aware of that may or may > not get looked into for the release. > > One thing is cygdb and its tests - are they working again? They seem to > work for me, but I don't know what the last status was there. Given how > long they must have been broken, it doesn't look all too critical, though. > > > This one should be resolved now: > > "build failure on windows with 0.21b2 windows py27 x64" > http://thread.gmane.org/gmane.comp.python.cython.devel/15424 > > > This isn't, but the solution isn't currently obvious (and I think it can > wait until the first bugfix release if we can't find a fix in time): > > "Buffer dtype mismatch error" > http://thread.gmane.org/gmane.comp.python.cython.user/11603 > > > These are open, but don't feel like they should block the release: > > "error LNK2001: unresolved external symbol PyInit_init" > http://thread.gmane.org/gmane.comp.python.cython.devel/15392/focus=15415 > > "Memory leak with vector of memoryviews" > http://thread.gmane.org/gmane.comp.python.cython.user/11704/focus=11705 > > "how to have hashable extension types in pure python mode ? (__eq__ error)" > http://thread.gmane.org/gmane.comp.python.cython.user/11731/focus=11732 > > > This isn't finished but is a new feature which can wait: > > "Automatic conversion with fixed-size C arrays" > https://github.com/cython/cython/pull/308 > > > This hasn't lead anywhere, apparently, but can wait as well: > > "OpenMP thread private variable not recognized (bug report + discussion)" > http://thread.gmane.org/gmane.comp.python.cython.devel/15382 > > > So, nothing critical, but I might have forgotten something. If nothing else > comes up, I'll just wait a couple of more days and then start preparing RC > and final release. > > Stefan > ___ > cython-devel mailing list > cython-devel@python.org > https://mail.python.org/mailman/listinfo/cython-devel ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] preparing a release candidate, pending issues
Andriy Kornatskyy schrieb am 06.09.2014 um 06:43: > Any update to the following? > > "Compiler crash in RemoveUnreachableCode" > http://thread.gmane.org/gmane.comp.python.cython.devel/15184 Is that still as issue with the beta releases (or latest master)? If so, then no, there's no update. I still have no idea what easy_install does here and why the modules would get reinitialised. That part needs debugging first. Stefan ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] preparing a release candidate, pending issues
On Sep 6, 2014, at 8:35 AM, Stefan Behnel wrote: > Is that still as issue with the beta releases (or latest master)? Yes, with the latest master. Andriy ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel