0.25 (2016-10-25)

Features added

  • def/cpdef methods of cdef classes benefit from Cython’s internal functionimplementation, which enables introspection and line profiling for them.Implementation sponsored by Turbostream (www.turbostream-cfd.com).
  • Calls to Python functions are faster, following the recent “FastCall”optimisations that Victor Stinner implemented for CPython 3.6.See https://bugs.python.org/issue27128 and related issues.
  • The new METH_FASTCALL calling convention for PyCFunctions is supportedin CPython 3.6. See https://bugs.python.org/issue27810
  • Initial support for using Cython modules in Pyston.Patch by Boxiang Sun.
  • Dynamic Python attributes are allowed on cdef classes if an attributecdef dict dict is declared in the class. Patch by empyrical.
  • Cython implemented C++ classes can make direct calls to base class methods.Patch by empyrical.
  • C++ classes can now have typedef members. STL containers updated withvalue_type.
  • New directive cython.no_gc to fully disable GC for a cdef class.Patch by Claudio Freire.
  • Buffer variables are no longer excluded from locals().Patch by David Woods.
  • Building f-strings is faster, especially when formatting C integers.
  • for-loop iteration over “std::string”.
  • libc/math.pxd provides e and pi as alias constants to simplifyusage as a drop-in replacement for Python’s math module.
  • Speed up cython.inline().
  • Binary lshift operations with small constant Python integers are faster.
  • Some integer operations on Python long objects are faster in Python 2.7.
  • Support for the C++ typeid operator.
  • Support for bazel using a the pyx_library rule in //Tools:rules.bzl.

Significant Bugs fixed

  • Division of complex numbers avoids overflow by using Smith’s method.
  • Some function signatures in libc.math and numpy.pxd were incorrect.Patch by Michael Seifert.

Other changes

  • The “%%cython” IPython/jupyter magic now defaults to the language level ofthe current jupyter kernel. The language level can be set explicitly with“%%cython -2” or “%%cython -3”.
  • The distutils extension Cython.Distutils.build_ext has now been updatedto use cythonize which properly handles dependencies. The old extension canstill be found in Cython.Distutils.old_build_ext and is now deprecated.
  • directive_defaults is no longer available in Cython.Compiler.Options,use get_directive_defaults() instead.