Cython 0.16 Release Candidate

40 views
Skip to first unread message

mark florisson

unread,
Mar 31, 2012, 4:59:49 PM3/31/12
to Core developer mailing list of the Cython compiler, cython...@googlegroups.com
We are happy to announce the first release candidate for Cython 0.16,
you can grab it from here: http://wiki.cython.org/ReleaseNotes-0.16

Since the beta last month several issues have been fixed, including
the NumPy array attribute access deprecation, which are now rewritten
to use the NumPy macros. Another serious bug in the reversed(range())
optimization was disabled, a C compiler bug on OS X Lion in OpenMP
code was circumvented, the documentation for fused types has been
improved, some bugs related to fused C++ and buffers types have been
fixed, and nogil was added to the included STL declarations.

I encourage everyone to give it a try, see if your project still
compiles and works, and if it doesn't to take up those torches and
pitchforks from your desks, you know where to find us.

Enjoy!

Olivier Grisel

unread,
Mar 31, 2012, 5:52:32 PM3/31/12
to cython...@googlegroups.com

Here is a pitchfork:

https://gist.github.com/2268824

This is a crash report when trying to cython-ify scikit-learn master
with both master and the 0.16rc0 tag of the cython repo.

Best,

--
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

Vitja Makarov

unread,
Apr 1, 2012, 2:57:17 AM4/1/12
to cython...@googlegroups.com
2012/4/1 Olivier Grisel <olivier...@ensta.org>:

This may be related to this issue:

https://github.com/cython/cython/commit/3dc1d68b6ccf437df0bce0bd18bf1862ff49a440

It's better to cherry-pick this commit.

--
vitja.

Vitja Makarov

unread,
Apr 1, 2012, 3:06:57 AM4/1/12
to cython...@googlegroups.com
2012/4/1 Vitja Makarov <vitja....@gmail.com>:

I'm wrong. Mark already fixed this: 1eabb1c63c72ce6b4b0abc6082468b9c1ab37c41


--
vitja.

Al Danial

unread,
Apr 1, 2012, 1:00:48 PM4/1/12
to cython...@googlegroups.com
We are happy to announce the first release candidate for Cython 0.16,
you can grab it from here: http://wiki.cython.org/ReleaseNotes-0.16
...

I encourage everyone to give it a try, see if your project still
compiles and works, and if it doesn't to take up those torches and
pitchforks from your desks, you know where to find us.

Hello.  I have code that builds with 0.15.1, but fails with "Cannot convert 'PyObject *' to Python object" using 0.16rc0.  My system is x86_64 Fedora 14 if that matters. To reproduce the problem:


 cd pynastran-read-only/cython/

 make
 
 -- Al

Stefan Behnel

unread,
Apr 1, 2012, 1:23:51 PM4/1/12
to cython...@googlegroups.com
Al Danial, 01.04.2012 19:00:

Thanks for the report. I'm getting a 404 on the URL above when I open it in
my browser - didn't try the checkout yet. In any case, could you paste the
exact error message that Cython gives you, including the name and line
number of the source file that you are compiling?

Stefan

Al Danial

unread,
Apr 1, 2012, 3:02:04 PM4/1/12
to cython...@googlegroups.com
> Hello.  I have code that builds with 0.15.1, but fails with "Cannot convert
> 'PyObject *' to Python object" using 0.16rc0.  My system is x86_64 Fedora
> 14 if that matters. To reproduce the problem:
>
>  svn checkout http://pynastran.googlecode.com/svn/trunk/pyNastran/op4pynastran-read-only

Thanks for the report. I'm getting a 404 on the URL above when I open it in
my browser - didn't try the checkout yet. In any case, could you paste the
exact error message that Cython gives you, including the name and line
number of the source file that you are compiling?

The project URL is http://code.google.com/p/pynastran/ -- but only a small
portion of the code is related to the Cython 0.16rc0 issue.  The URL from 
my earlier email only works with "svn co".

No matter; I've attached tar files of the source in question and the output
from make using 0.15.1 and 0.16rc0.  (When you expand the source tar file,
you'll need to "cd pynastran-read-only/cython" otherwise you'll build
in the wrong location.)        -- Al

pynastran_op4.tar.bz2
make_results.tar.bz2

Neal Becker

unread,
Apr 1, 2012, 3:23:51 PM4/1/12
to cython...@googlegroups.com
mark florisson wrote:

So with new memoryview support, is it true that I can write algorithms in
cython, that accept non-contiguous numpy array slices (from python), and can
operate on them with (reasonable) efficiency? IIRC, that was not true with
previous cython numpy support.

Vitja Makarov

unread,
Apr 9, 2012, 4:25:26 AM4/9/12
to cython...@googlegroups.com

Here is small example to trigger the issue:

cimport numpy as np

cdef np.ndarray[np.uint32_t, ndim=1] bar():
pass

def foo(shape):
return bar().size


This bug was introduced by 95b6e693327650607c6f5b1fffc5c9867dce0645,
"Stopgap support for numpy 1.7"

I'm sure we must fix it before the release.

--
vitja.

Stefan Behnel

unread,
Apr 9, 2012, 12:24:21 PM4/9/12
to cython...@googlegroups.com
Vitja Makarov, 09.04.2012 10:25:

> This bug was introduced by 95b6e693327650607c6f5b1fffc5c9867dce0645,
> "Stopgap support for numpy 1.7"

Sorry to say that, but seeing how many bugs they introduced, those changes
have seriously degraded the stability of the release branch.

Stefan

Vitja Makarov

unread,
Apr 9, 2012, 12:59:14 PM4/9/12
to cython...@googlegroups.com
2012/4/9 Stefan Behnel <stef...@behnel.de>:

Yeah.


Little note: after merging release branch back to master my and Mark's
fixes are now both there:

https://github.com/cython/cython/blob/master/Cython/Compiler/ParseTreeTransforms.py#L1791

I think we must remove one of the self.visitchilden(node) lines.

--
vitja.

mark florisson

unread,
Apr 9, 2012, 1:06:04 PM4/9/12
to cython...@googlegroups.com

Fortunately the fixes are also rather trivial.

mark florisson

unread,
Apr 9, 2012, 1:06:47 PM4/9/12
to cython...@googlegroups.com

Yeah, I hadn't noticed the fix in your branch when fixing that commit.
I finally got some free time, so I'll be fixing some remaining issue
and try to push out a new release candidate somewhere tomorrow or the
day after.

> --
> vitja.

Reply all
Reply to author
Forward
0 new messages