Cython v0.15 Release Notes

Release Date: 2011-08-05 // over 12 years ago
  • ๐Ÿ”‹ Features added

    • ๐Ÿ‘ Generators (yield) - Cython has full support for generators, generator expressions and PEP 342 coroutines.

    • ๐Ÿ‘ The nonlocal keyword is supported.

    • Re-acquiring the gil: with gil - works as expected within a nogil context.

    • ๐Ÿ‘ OpenMP support: prange.

    • โš  Control flow analysis prunes dead code and emits warnings and errors about uninitialised variables.

    • Debugger command cy set to assign values of expressions to Cython variables and cy exec counterpart $cy_eval().

    • ๐Ÿ‘ป Exception chaining PEP 3134.

    • Relative imports PEP 328.

    • ๐Ÿ‘Œ Improved pure syntax including cython.cclass, cython.cfunc, and cython.ccall.

    • The with statement has its own dedicated and faster C implementation.

    • ๐Ÿ‘Œ Support for del.

    • Boundschecking directives implemented for builtin Python sequence types.

    • โšก๏ธ Several updates and additions to the shipped standard library .pxd files.

    • Forward declaration of types is no longer required for circular references.

    ๐Ÿ› Bugs fixed

    Other changes

    • Uninitialized variables are no longer initialized to None and accessing them has the same semantics as standard Python.

    • globals() now returns a read-only dict of the Cython module's globals, rather than the globals of the first non-Cython module in the stack

    • Many C++ exceptions are now special cased to give closer Python counterparts. This means that except+ functions that formerly raised generic RuntimeErrors may raise something else such as ArithmeticError.

    • ๐ŸŽ The inlined generator expressions (introduced in Cython 0.13) were disabled in favour of full generator expression support. This breaks code that previously used them inside of cdef functions (usage in def functions continues to work) and induces a performance regression for cases that continue to work but that were previously inlined. We hope to reinstate this feature in the near future.