Re: [Cython] Cython code producing different, incorrect results under Python 2.7 (not 3.x) under Cython 0.19

2013-04-23 Thread Josh Warner
Hi Stefan, Every quantitative test is failing for _mcp.pyx (in skimage.graph.tests.test_mcp.py), suggesting the problem is fairly global to the MCP class. The three errors in skimage.graph.tests.test_spath.py are due to incorrect MCP results which have no valid traceback path. No need to investiga

Re: [Cython] Cython code producing different, incorrect results under Python 2.7 (not 3.x) under Cython 0.19

2013-04-23 Thread Stefan Behnel
Hi, Josh Warner, 24.04.2013 08:06: > Over in scikit-image we have traced an odd problem with a particular Cython > file to the 0.19 update of Cython. From at least Cython 0.15.1 (probably > earlier) through 0.18, `_mcp.pyx` in `skimage.graph` compiled and executed > correctly, passing all package

[Cython] Cython code producing different, incorrect results under Python 2.7 (not 3.x) under Cython 0.19

2013-04-23 Thread Josh Warner
Hi Cython devs, Over in scikit-image we have traced an odd problem with a particular Cython file to the 0.19 update of Cython. From at least Cython 0.15.1 (probably earlier) through 0.18, `_mcp.pyx` in `skimage.graph` compiled and executed correctly, passing all package tests on both Python 2.7 an

Re: [Cython] Unit testing Cython extensions

2013-04-23 Thread Robert Bradshaw
There is nothing special about Cython here, if you have "foo.py" instead of "foo.so" you would be seeing exactly the same results. You need to either set PYTHONPATH or have foo be in the same package layout as your tests. On Tue, Apr 23, 2013 at 1:51 PM, Torsten Landschoff wrote: > Hi again, > >

[Cython] Unit testing Cython extensions

2013-04-23 Thread Torsten Landschoff
Hi again, I am just wondering how to do unit testing on extensions built using Cython with py.test. My problem: The extension module I am working on is installed in our global python environment (inside the build slaves as well as on local machines) already. Before installing a new version of the

Re: [Cython] libc.string msvc incompatibility

2013-04-23 Thread Robert Bradshaw
It would at the very least be worth putting a note on these functions, but I'm not sure how far we should go with aliasing the platform-specific alternatives. Certainly a .h file that you "cdef extern from" include with these defines would be the shortest path to getting things working on your side

[Cython] libc.string msvc incompatibility

2013-04-23 Thread Dave Hirschfeld
When trying to use strcasecmp from libc.string I get an error compiling with msvc: error C3861: 'strcasecmp': identifier not found It seems MS have decided to call it by another name - _stricmp ...amongst others: http://botsikas.blogspot.co.uk/2011/12/strcasecmp-identifier-not-found- when.htm

Re: [Cython] Surprising behaviour wrt. generated tp_clear and tp_dealloc functions

2013-04-23 Thread Stefan Behnel
Torsten Landschoff, 23.04.2013 10:06: > On 04/23/2013 08:01 AM, Stefan Behnel wrote: >> Greg Ewing, 23.04.2013 01:16: >>> Only if subclassing of Slot and Context are forbidden. >> Right. Subtypes of a non-GC type can happily add attributes and start >> supporting cyclic garbage collection, includin

Re: [Cython] Surprising behaviour wrt. generated tp_clear and tp_dealloc functions

2013-04-23 Thread Torsten Landschoff
On 04/23/2013 08:01 AM, Stefan Behnel wrote: > Greg Ewing, 23.04.2013 01:16: >> Only if subclassing of Slot and Context are forbidden. > Right. Subtypes of a non-GC type can happily add attributes and start > supporting cyclic garbage collection, including Python subclasses. So this > only applies