From stefan_ml at behnel.de Mon Dec 1 08:28:58 2014 From: stefan_ml at behnel.de (Stefan Behnel) Date: Mon, 01 Dec 2014 08:28:58 +0100 Subject: [Cython] cython --cplus --embed generates invalid code In-Reply-To: <547B3440.9040903@ensslin.cc> References: <547B3440.9040903@ensslin.cc> Message-ID: <547C18BA.5050603@behnel.de> Michael En?lin schrieb am 30.11.2014 um 16:14: > on my system, --embed does not work with --cplus. > > How to reproduce: Any valid pyx file works: > > $ rm -f test.pyx; touch test.pyx > $ cython --embed --cplus test.pyx > $ g++ -c test.cpp -I/usr/include/python3.4m > test.cpp: In function ?wchar_t* __Pyx_char2wchar(char*)?: > test.cpp:945:41: error: invalid conversion from ?void*? to ?wchar_t*? > [-fpermissive] > res = malloc(argsize*sizeof(wchar_t)); > $ clang++ -c test.cpp -I/usr/include/python3.4m > test.cpp:945:9: error: assigning to 'wchar_t *' from incompatible type > 'void *' > res = malloc(argsize*sizeof(wchar_t)); > > > The issue can easily be fixed by manually casting the malloc result to > (wchar_t *). Thanks. IIRC, that's actually code copied from CPython (where it is never compiled as C++). https://github.com/cython/cython/commit/d65a7c176003a84aa5640fdb7c4134dd915454c7 Stefan From Samuele.Kaplun at cern.ch Tue Dec 2 14:13:42 2014 From: Samuele.Kaplun at cern.ch (Samuele Kaplun) Date: Tue, 2 Dec 2014 14:13:42 +0100 Subject: [Cython] Possible bug (or wrong documentation) WRT "not None" Message-ID: <1523984.QOhLuZvBLs@pcsk4> Hi! I would like to report what I think is a possible bug (in cython or corresponding documentation). According to: [...] The self parameter of a method of an extension type is guaranteed never to be None. [...] However given this snippet: [...] cdef class test: def __sub__(self, test rhs not None): print "self is %s" % repr(self), "rhs is %s" % repr(rhs) [...] If I then load it python: In [1]: import test In [2]: x = test.test() In [3]: None - x self is None rhs is Thus showing that in this case "self" was actually initialized with None. If I explictly add "not None" as in: [...] cdef class test: def __sub__(self not None, test rhs not None): print "self is %s" % repr(self), "rhs is %s" % repr(rhs) [...] In [3]: None - x TypeError: Argument 'self' must not be None [...] Which is good. If I instead add "test self" as in: [...] cdef class test: def __sub__(test self not None, test rhs not None): print "self is %s" % repr(self), "rhs is %s" % repr(rhs) [...] In [3]: None - x TypeError: Argument 'self' has incorrect type (expected test.test, got NoneType) [...] What's worse is that if I use "test self" (without not None), the same TypeError is not raised: [...] cdef class test: def __sub__(test self, test rhs not None): print "self is %s" % repr(self), "rhs is %s" % repr(rhs) [...] In [3]: None - x self is None rhs is Thus we have: self -> not respecting None-checking (in disagreement with Documentation) self not None -> OK test self -> not respecting type-checking! test self non None -> OK (respecting type-checking, hence None-checking). Hope that helps. Cheers, Samuele -- Samuele Kaplun Invenio Developer ** From stefan_ml at behnel.de Wed Dec 3 16:44:13 2014 From: stefan_ml at behnel.de (Stefan Behnel) Date: Wed, 03 Dec 2014 16:44:13 +0100 Subject: [Cython] Possible bug (or wrong documentation) WRT "not None" In-Reply-To: <1523984.QOhLuZvBLs@pcsk4> References: <1523984.QOhLuZvBLs@pcsk4> Message-ID: <547F2FCD.4050301@behnel.de> Samuele Kaplun schrieb am 02.12.2014 um 14:13: > I would like to report what I think is a possible bug (in cython or > corresponding documentation). > > According to: > > > [...] > The self parameter of a method of an extension type is guaranteed never to be > None. > [...] > > However given this snippet: > [...] > cdef class test: > def __sub__(self, test rhs not None): > print "self is %s" % repr(self), "rhs is %s" % repr(rhs) > [...] http://docs.cython.org/src/userguide/special_methods.html#arithmetic-methods Stefan From Samuele.Kaplun at cern.ch Thu Dec 4 09:30:55 2014 From: Samuele.Kaplun at cern.ch (Samuele Kaplun) Date: Thu, 4 Dec 2014 09:30:55 +0100 Subject: [Cython] Possible bug (or wrong documentation) WRT "not None" In-Reply-To: <547F2FCD.4050301@behnel.de> References: <1523984.QOhLuZvBLs@pcsk4> <547F2FCD.4050301@behnel.de> Message-ID: <3659253.FomMQWzH4I@pcsk4> Dear Stefan, In data mercoled? 3 dicembre 2014 16:44:13, Stefan Behnel ha scritto: > Samuele Kaplun schrieb am 02.12.2014 um 14:13: > > I would like to report what I think is a possible bug (in cython or > > corresponding documentation). > > > > According to: > > > -and-none> > > > > [...] > > The self parameter of a method of an extension type is guaranteed never to > > be None. > > [...] > > > > However given this snippet: > > [...] > > > > cdef class test: > > def __sub__(self, test rhs not None): > > print "self is %s" % repr(self), "rhs is %s" % repr(rhs) > > > > [...] > > http://docs.cython.org/src/userguide/special_methods.html#arithmetic-methods thanks for the pointer. Then I guess the documentation could be improved by e.g. saying something similar to: [...] The self parameter of a method of an extension type is guaranteed never to be None. (Note: arithmetic methods might be an exception to this rule. [http://docs.cython.org/src/userguide/special_methods.html#arithmetic-methods]). [...] Cheers, Samuele -- Samuele Kaplun Invenio Developer ** From greg.ewing at canterbury.ac.nz Thu Dec 4 22:40:36 2014 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Fri, 05 Dec 2014 10:40:36 +1300 Subject: [Cython] Possible bug (or wrong documentation) WRT "not None" In-Reply-To: <3659253.FomMQWzH4I@pcsk4> References: <1523984.QOhLuZvBLs@pcsk4> <547F2FCD.4050301@behnel.de> <3659253.FomMQWzH4I@pcsk4> Message-ID: <5480D4D4.7050209@canterbury.ac.nz> Samuele Kaplun wrote: > The self parameter of a method of an extension type is guaranteed never to be > None. (Note: arithmetic methods might be an exception to this rule. The arithmetic methods don't *have* a "self" parameter (or at least it's not always the first parameter), so technically what the docs currently say is correct. It's probably still worth clarifying this somehow, though. Maybe something like The self parameter of a method of an extension type is guaranteed never to be None. (However, note that some operator methods do not always receive "self" as the first parameter; see ). -- Greg From dave.hirschfeld at gmail.com Mon Dec 8 13:22:32 2014 From: dave.hirschfeld at gmail.com (Dave Hirschfeld) Date: Mon, 8 Dec 2014 12:22:32 +0000 (UTC) Subject: [Cython] Can't assign numpy array to memoryview Message-ID: It appears that you can't assign an ndarray to a memoryview slice? Is this correct/expected behaviour? Whilst there are a couple of possible workarounds it would be nice if this just worked as it's a slightly surprising deviation from the ndarray behaviour. Broken example: ``` In [3]: %%cython ...: cimport cython ...: import numpy as np ...: cimport numpy as np ...: ...: cpdef np.ndarray[np.float64_t, ndim=2] f(): ...: cdef np.ndarray[np.float64_t, ndim=2] x = np.ones([3, 4], dtype=np.float64) ...: cdef double[:,:] y = np.zeros([3, 4], dtype=np.float64) ...: cdef np.ndarray[np.float64_t, ndim=1] row ...: cdef int idx ...: for idx, row in enumerate(x): ...: y[idx] = row ...: return np.asarray(y) In [4]: f() Traceback (most recent call last): File "", line 1, in f() File "_cython_magic_5f2586693ddbf044815dae01d800bc0c.pyx", line 5, in _cython_magic_5f2586693ddbf044815dae01d800bc0c.f (C:\Users\dhirschfeld\.ipython\cython\_cython_magic_5f2586693ddbf044815d ae01d800bc0c.c:2086) File "_cython_magic_5f2586693ddbf044815dae01d800bc0c.pyx", line 11, in _cython_magic_5f2586693ddbf044815dae01d800bc0c.f (C:\Users\dhirschfeld\.ipython\cython\_cython_magic_5f2586693ddbf044815d ae01d800bc0c.c:1935) ``` Workarounds - either: 1. Type both lhs and rhs as ndarray 2. Create a 1D memoryview to use as a temporary container and assign that to the memoryview slice ``` In [5]: %%cython ...: cimport cython ...: import numpy as np ...: cimport numpy as np ...: ...: cpdef np.ndarray[np.float64_t, ndim=2] f(): ...: cdef np.ndarray[np.float64_t, ndim=2] x = np.ones([3, 4], dtype=np.float64) ...: cdef np.ndarray[np.float64_t, ndim=2] y = np.zeros([3, 4], dtype=np.float64) ...: cdef np.ndarray[np.float64_t, ndim=1] row ...: cdef int idx ...: for idx, row in enumerate(x): ...: y[idx] = row ...: return np.asarray(y) In [6]: f() Out[6]: array([[ 1., 1., 1., 1.], [ 1., 1., 1., 1.], [ 1., 1., 1., 1.]]) In [7]: %%cython ...: cimport cython ...: import numpy as np ...: cimport numpy as np ...: ...: cpdef np.ndarray[np.float64_t, ndim=2] f(): ...: cdef np.ndarray[np.float64_t, ndim=2] x = np.ones([3, 4], dtype=np.float64) ...: cdef double[:,:] y = np.zeros([3, 4], dtype=np.float64) ...: cdef np.ndarray[np.float64_t, ndim=1] row ...: cdef double[:] tmp ...: cdef int idx ...: for idx, row in enumerate(x): ...: tmp = row ...: y[idx] = tmp ...: return np.asarray(y) In [8]: f() Out[8]: array([[ 1., 1., 1., 1.], [ 1., 1., 1., 1.], [ 1., 1., 1., 1.]]) ``` From dave.hirschfeld at gmail.com Mon Dec 8 13:27:25 2014 From: dave.hirschfeld at gmail.com (Dave Hirschfeld) Date: Mon, 8 Dec 2014 12:27:25 +0000 (UTC) Subject: [Cython] Can't assign numpy array to memoryview References: Message-ID: Dave Hirschfeld writes: > > It appears that you can't assign an ndarray to a memoryview slice? Is > this correct/expected behaviour? > > Whilst there are a couple of possible workarounds it would be nice if > this just worked as it's a slightly surprising deviation from the > ndarray behaviour. > > Broken example: > ``` > In [3]: %%cython > ...: cimport cython > ...: import numpy as np > ...: cimport numpy as np > ...: > ...: cpdef np.ndarray[np.float64_t, ndim=2] f(): > ...: cdef np.ndarray[np.float64_t, ndim=2] x = np.ones([3, 4], > dtype=np.float64) > ...: cdef double[:,:] y = np.zeros([3, 4], dtype=np.float64) > ...: cdef np.ndarray[np.float64_t, ndim=1] row > ...: cdef int idx > ...: for idx, row in enumerate(x): > ...: y[idx] = row > ...: return np.asarray(y) > > In [4]: f() > Traceback (most recent call last): > > File "", line 1, in > f() > > File "_cython_magic_5f2586693ddbf044815dae01d800bc0c.pyx", line 5, in > _cython_magic_5f2586693ddbf044815dae01d800bc0c.f > (C:\Users\dhirschfeld\.ipython\cython\_cython_magic_5f2586693ddbf044815d > ae01d800bc0c.c:2086) > > File "_cython_magic_5f2586693ddbf044815dae01d800bc0c.pyx", line 11, in > _cython_magic_5f2586693ddbf044815dae01d800bc0c.f > (C:\Users\dhirschfeld\.ipython\cython\_cython_magic_5f2586693ddbf044815d > ae01d800bc0c.c:1935) > ``` The error which I cutoff above is: Traceback (most recent call last): File "", line 1, in f() File "_cython_magic_5f2586693ddbf044815dae01d800bc0c.pyx", line 5, in _cython_magic_5f2586693ddbf044815dae01d800bc0c.f (C:\Users\dhirschfeld\.ipython\cython\_cython_magic_5f2586693ddbf044815d ae01d800bc0c.c:2086) File "_cython_magic_5f2586693ddbf044815dae01d800bc0c.pyx", line 11, in _cython_magic_5f2586693ddbf044815dae01d800bc0c.f (C:\Users\dhirschfeld\.ipython\cython\_cython_magic_5f2586693ddbf044815d ae01d800bc0c.c:1935) TypeError: only length-1 arrays can be converted to Python scalars From serge.guelton at enst-bretagne.fr Mon Dec 8 20:52:46 2014 From: serge.guelton at enst-bretagne.fr (serge Guelton) Date: Mon, 8 Dec 2014 20:52:46 +0100 Subject: [Cython] Cython <> pythran collaboration Message-ID: <20141208195246.GA25376@lakota> Hi Cython dev, I am one of the two core developers of the Pythran[0] compiler. We are planning to start a project where Cython would delegate the generation of optimized (i.e. parallel / vectorized / without temporary arrays) numpy expression when it finds one, instead of calling the native API. Something like the following meaningless example: import numpy as np cimport numpy as np def play_with_arrays(np.ndarray arr): cdef int N = arr.shape[0] cdef np.ndarray other_arr = np.empty([N], dtype=np.int) other_arr = arr ** 2 + 1 # pythran would handle this for i in range(N): other_arr[i] /= 2 # cython would handle this return other_arr Everything would live in a pyx file and it should be transparent to a cython user. Cython would drive the compilation process, using pythran as a numpy expression optimizer. Does that look feasible / appealing to you? [0] http://pythonhosted.org/pythran/ From robertwb at gmail.com Tue Dec 9 18:02:19 2014 From: robertwb at gmail.com (Robert Bradshaw) Date: Tue, 9 Dec 2014 09:02:19 -0800 Subject: [Cython] Cython <> pythran collaboration In-Reply-To: <20141208195246.GA25376@lakota> References: <20141208195246.GA25376@lakota> Message-ID: On Mon, Dec 8, 2014 at 11:52 AM, serge Guelton wrote: > Hi Cython dev, > > I am one of the two core developers of the Pythran[0] compiler. > We are planning to start a project where Cython would delegate the > generation of optimized (i.e. parallel / vectorized / without temporary > arrays) numpy expression when it finds one, instead of calling the > native API. Something like the following meaningless example: > > import numpy as np > cimport numpy as np > > def play_with_arrays(np.ndarray arr): > cdef int N = arr.shape[0] > cdef np.ndarray other_arr = np.empty([N], dtype=np.int) > > other_arr = arr ** 2 + 1 # pythran would handle this > > for i in range(N): > other_arr[i] /= 2 # cython would handle this > > return other_arr > > Everything would live in a pyx file and it should be transparent to a > cython user. Cython would drive the compilation process, using pythran > as a numpy expression optimizer. > > Does that look feasible / appealing to you? > > [0] http://pythonhosted.org/pythran/ Yes, that would be very cool; efficient array operations (including broadcasting) without intermediates is something we've long wanted to have. - Robert From stefan_ml at behnel.de Fri Dec 12 10:05:14 2014 From: stefan_ml at behnel.de (Stefan Behnel) Date: Fri, 12 Dec 2014 10:05:14 +0100 Subject: [Cython] Cython <> pythran collaboration In-Reply-To: References: <20141208195246.GA25376@lakota> Message-ID: <548AAFCA.4030804@behnel.de> Robert Bradshaw schrieb am 09.12.2014 um 18:02: > On Mon, Dec 8, 2014 at 11:52 AM, serge Guelton wrote: >> I am one of the two core developers of the Pythran[0] compiler. >> We are planning to start a project where Cython would delegate the >> generation of optimized (i.e. parallel / vectorized / without temporary >> arrays) numpy expression when it finds one, instead of calling the >> native API. Something like the following meaningless example: >> >> import numpy as np >> cimport numpy as np >> >> def play_with_arrays(np.ndarray arr): >> cdef int N = arr.shape[0] >> cdef np.ndarray other_arr = np.empty([N], dtype=np.int) >> >> other_arr = arr ** 2 + 1 # pythran would handle this >> >> for i in range(N): >> other_arr[i] /= 2 # cython would handle this >> >> return other_arr >> >> Everything would live in a pyx file and it should be transparent to a >> cython user. Cython would drive the compilation process, using pythran >> as a numpy expression optimizer. >> >> Does that look feasible / appealing to you? >> >> [0] http://pythonhosted.org/pythran/ > > Yes, that would be very cool; efficient array operations (including > broadcasting) without intermediates is something we've long wanted to > have. +1 There were previous discussions about this on both Cython mailings lists (dev/users), e.g. http://thread.gmane.org/gmane.comp.python.cython.devel/15357 http://thread.gmane.org/gmane.comp.python.cython.user/8275 http://article.gmane.org/gmane.comp.python.cython.devel/14296 One of the outcomes was that we'd like to have an external tool doing the expression optimisation work, so pythran would fit here. The main idea is to write some special syntax tree nodes that process array expressions with pythran, and to replace the existing generic tree nodes (see AddNode, MulNode & friends in ExprNodes.py) with the pythran specific nodes during expression analysis (see Pipeline.py) whenever we notice that we are working on memory views. Nodes do their own code generation, which would be handed to pythran in your case. The specific external tool to use (i.e. which set of tree nodes to inject) would depend on a compiler directive, so the pythran integration code should go into a separate module. All type information regarding the memory views is available to the tree nodes at expression analysis time, so integrating an external tool should not be difficult. Node replacement is done by simply returning a different node instance from its analyse_types() method. There's a helper classmethod "from_node()" for instantiating an ExprNode subtype from another tree node (and properly copy over its external tree state). Further obstacles can be discussed on this list. Stefan From benwbooth at gmail.com Fri Dec 12 23:14:12 2014 From: benwbooth at gmail.com (Ben Booth) Date: Fri, 12 Dec 2014 14:14:12 -0800 Subject: [Cython] cygdb bugs when debugging python 3 extensions Message-ID: I'm trying to figure out how to use cygdb to debug extensions built with python 3. I've tested all the debugger commands listed in http://docs.cython.org/src/userguide/debugging.html when debugging python 2 extensions and everything works great. But some of the commands seem to be broken when debugging python 3 extensions. Here are the debugger commands that I've confirmed as working with python 3 extensions: cy break cy step cy next cy run cy cont cy down cy finish .. works but prints error message cy exec cy list cy_lineno() cy_eval() cy_cname() Here are the commands which fail under python 3, and the error message that is given for each: cy up Python Exception There is no member named length.: Error occurred in Python command: There is no member named length. cy finish .. works but gives error Python Exception There is no member named length.: Error occurred in Python command: There is no member named length. cy bt Python Exception There is no member named length.: Error occurred in Python command: There is no member named length. cy print Python Exception There is no member named ma_mask.: Python Exception Error occurred in Python command: There is no member named ma_mask.: Error occurred in Python command: Error occurred in Python command: There is no member named ma_mask. cy set x = 2 Python Exception No symbol "__pyx_v_10helloworld_x" in current context.: Error occurred in Python command: No symbol "__pyx_v_10helloworld_x" in current context. cy locals Python Exception There is no member named ma_mask.: Error occurred in Python command: There is no member named ma_mask. cy globals Python Exception There is no member named ma_mask.: Error occurred in Python command: There is no member named ma_mask. cy_cvalue() Python Exception There is no member named ma_mask.: Error occurred in Python convenience function: There is no member named ma_mask. In summary: - The "cy set" and "cy_cname()" commands seem to be giving incorrect C names for cython variables. I did a grep of the generated .c source file for "__pyx_v_10helloworld_x", and didn't get any hits. Luckily, the "cy exec" command works, so I can use that to get the value of variables as a workaround. - Any commands related to viewing or traversing the call stack seem to give an error related to a missing "length" member. - Commands related to printing the value of a variable complain about a missing "ma_mask" member. Here are the source files I used for the test: helloworld.py: import helloworld helloworld.pyx: x = 1 y = "a" print("Hello World 1") print("Hello World 2") print("Hello World 3") print("Hello World 4") print("Hello World 5") print("Hello World 6") print("Hello World 8") print("Hello World 9") print("Hello World 10") setup.py: from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension extensions = [Extension("helloworld", ["helloworld.pyx"])] setup(ext_modules=cythonize(extensions, gdb_debug=True, output_dir=".")) To compile I ran: python setup.py build_ext --inplace To debug, I ran: cygdb -vv . -- --args python helloworld.py Here is my python version: Python 3.4.2 I used pyenv (https://github.com/yyuu/pyenv ) to build and install the latest Python 3 version with debugging symbols enabled. Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: From nykevin.norris at gmail.com Sat Dec 20 01:47:05 2014 From: nykevin.norris at gmail.com (Kevin Norris) Date: Fri, 19 Dec 2014 19:47:05 -0500 Subject: [Cython] Cythonize silently ignores nonexistent files Message-ID: Is this behavior intentional? >>> from Cython.Build import cythonize >>> cythonize('/this/file/doesnt/exist.pyx') [] It would be *really* nice if Cython would raise an exception (or something) in this case. I just spent 20 minutes trying to puzzle out Cython/Setuptools compatibility when the actual problem was staring me in the face. -- Kevin Norris From stefan_ml at behnel.de Sat Dec 20 10:01:58 2014 From: stefan_ml at behnel.de (Stefan Behnel) Date: Sat, 20 Dec 2014 10:01:58 +0100 Subject: [Cython] Cythonize silently ignores nonexistent files In-Reply-To: References: Message-ID: <54953B06.9040700@behnel.de> Kevin Norris schrieb am 20.12.2014 um 01:47: > Is this behavior intentional? > > >>> from Cython.Build import cythonize > >>> cythonize('/this/file/doesnt/exist.pyx') > [] Yes, it's intentional. The path you pass is actually a glob expression, so it may match any number of files. > It would be *really* nice if Cython would raise an exception (or > something) in this case. I just spent 20 minutes trying to puzzle out > Cython/Setuptools compatibility when the actual problem was staring me > in the face. I think we should issue a warning if the expression matches nothing at all as that's most likely not intended by the user. Stefan From stefan_ml at behnel.de Sat Dec 20 10:21:50 2014 From: stefan_ml at behnel.de (Stefan Behnel) Date: Sat, 20 Dec 2014 10:21:50 +0100 Subject: [Cython] [cython-users] is there a schedule for next cython update (0.21.2) ? In-Reply-To: <0913d0aa-2dda-401f-8037-1633396d1560@googlegroups.com> References: <0913d0aa-2dda-401f-8037-1633396d1560@googlegroups.com> Message-ID: <54953FAE.90801@behnel.de> stonebig34 at gmail.com schrieb am 20.12.2014 um 10:14: > I see a lot of commits since 0.21.1. Well, there are about five commits in the 0.21.x branch. > Wouldn't it be time to do an incremental release ? Yes, getting these fixes out would be good. Also, the master branch looks pretty ok, it might be ready for a beta release as well. Stefan From stefan_ml at behnel.de Sat Dec 20 10:14:36 2014 From: stefan_ml at behnel.de (Stefan Behnel) Date: Sat, 20 Dec 2014 10:14:36 +0100 Subject: [Cython] GvR on type hinting in Python Message-ID: <54953DFC.7090907@behnel.de> Looks like type annotations in Python are about to leave the "maybe one day" status: http://thread.gmane.org/gmane.comp.python.ideas/30432 Stefan From stefan_ml at behnel.de Sat Dec 27 17:50:07 2014 From: stefan_ml at behnel.de (Stefan Behnel) Date: Sat, 27 Dec 2014 17:50:07 +0100 Subject: [Cython] Cython 0.21.2 released Message-ID: <549EE33F.6040407@behnel.de> Hi everyone, I uploaded Cython 0.21.2. It adds some bug fixes and corrections for the 0.21.x release series. Downloads: https://pypi.python.org/pypi/Cython/0.21.2 http://cython.org/release/Cython-0.21.2.tar.gz http://cython.org/release/Cython-0.21.2.zip Changelog: https://github.com/cython/cython/blob/efdbeef340dfe8ad748ff0c305e1e424932e23b6/CHANGES.rst Documentation: http://docs.cython.org/ Stefan Bugs fixed ---------- * Crash when assigning a C value to both a Python and C target at the same time. * Automatic coercion from C++ strings to ``str`` generated incomplete code that failed to compile. * Declaring a constructor in a C++ child class erroneously required a default constructor declaration in the super class. * ``resize_smart()`` in ``cpython.array`` was broken. * Functions in ``libcpp.cast`` are now declared as ``nogil``. * Some missing C-API declarations were added. * Py3 main code in embedding program code was lacking casts. * Exception related to distutils "Distribution" class type in pyximport under latest CPython 2.7 and 3.4 releases when setuptools is being imported later.