Skip to content


Subversion checkout URL

You can clone with
Download ZIP
100644 1543 lines (966 sloc) 57.2 KB
977c15c @scoder added changelog file
scoder authored
1 ================
2 Cython Changelog
3 ================
be7033c @scoder changelog
scoder authored
5 Latest development
70c4404 @scoder prepare release of 0.23.1
scoder authored
6 ===================
871377b @scoder Fix crash when an exception occurs during module init and the stale m…
scoder authored
06b21b1 @scoder changelog
scoder authored
8 Features added
9 --------------
16a3d38 @scoder adapt grammar to CPython (3.6-pre)
scoder authored
11 * Parser was adapted to some minor syntax changes in Py3.6, e.g.
ce0ffa1 @scoder changelog
scoder authored
14 * The embedded C code comments that show the original source code
f6e74c2 @scoder changelog
scoder authored
15 can be discarded with the new directive ``emit_code_comments=False``.
ce0ffa1 @scoder changelog
scoder authored
96eea73 @robertwb Make cpdef enums into first-class types.
robertwb authored
17 * Cpdef enums are now first-class iterable, callable types in Python.
f7efb99 @scoder make ctuples available in pure python code
scoder authored
19 * Ctuples can now be declared in pure Python code.
edc39d9 @scoder changelog
scoder authored
21 * Posix declarations for DLL loading and stdio extensions were added.
22 Patch by Lars Buitinck.
b476c36 @scoder changelog
scoder authored
24 * The Py2-only builtins ``unicode()``, ``xrange()``, ``reduce()`` and
25 ``long`` are now also available in compile time ``DEF`` expressions
26 when compiling with Py3.
e746619 @scoder changelog
scoder authored
28 * Exception type tests have slightly lower overhead.
6fd4c51 @scoder changelog
scoder authored
29 This fixes ticket 868.
e746619 @scoder changelog
scoder authored
06b21b1 @scoder changelog
scoder authored
31 Bugs fixed
32 ----------
77009a7 @scoder changelog
scoder authored
34 * C++ exceptions raised by overloaded C++ operators were not always
35 handled. Patch by Ian Henriksen.
ce0ffa1 @scoder changelog
scoder authored
37 * C string literals were previously always stored as non-const global
38 variables in the module. They are now stored as global constants
39 when possible, and otherwise as non-const C string literals in the
40 generated code that uses them. This improves compatibility with
41 strict C compiler options and prevents non-const strings literals
42 with the same content from being incorrectly merged.
ba35091 @scoder make str values in compile time DEF env turn into actually usable Uni…
scoder authored
44 * Compile time evaluated ``str`` expressions (``DEF``) now behave in a
45 more useful way by turning into Unicode strings when compiling under
46 Python 3. This allows using them as intermediate values in expressions.
47 Previously, they always evaluated to bytes objects.
06b21b1 @scoder changelog
scoder authored
49 * ``isinf()`` declarations in ``libc/math.pxd`` and ``numpy/math.pxd`` now
50 reflect the actual tristate ``int`` return value instead of using ``bint``.
e746619 @scoder changelog
scoder authored
52 * Literal assignments to ctuples avoid Python tuple round-trips in some
53 more corner cases.
591199d @scoder optimise iteration over dict(...kwargs...).items() etc. and not only …
scoder authored
55 * Iteration over ``dict(...).items()`` failed to get optimised when dict
56 arguments included keyword arguments.
06b21b1 @scoder changelog
scoder authored
58 Other changes
59 -------------
d13bbd0 @robertwb Note change to enum conversions.
robertwb authored
412b522 @robertwb Fix prange() end condition for (stop - start) % step != 0.
robertwb authored
62 0.23.5 (2015-xx-yy)
63 ===================
65 Bugs fixed
66 ----------
68 * Fix prange() to behave identically to range(). The end condition was
69 miscalculated when the range was not exactly divisible by the step.
dc00a17 @scoder prepare release of 0.23.4
scoder authored
72 0.23.4 (2015-10-10)
f46e82c @scoder changelog
scoder authored
73 ===================
75 Bugs fixed
76 ----------
75fccd4 @scoder changelog
scoder authored
78 * Memory leak when calling Python functions in PyPy.
f46e82c @scoder changelog
scoder authored
80 * Compilation problem with MSVC in C99-ish mode.
82 * Warning about unused values in a helper macro.
e819924 @scoder prepare release of 0.23.3
scoder authored
85 0.23.3 (2015-09-29)
3e4a436 @scoder changelog
scoder authored
86 ===================
88 Bugs fixed
89 ----------
2c9d175 @scoder changelog
scoder authored
91 * Invalid C code for some builtin methods. This fixes ticket 856 again.
3e4a436 @scoder changelog
scoder authored
93 * Incorrect C code in helper functions for PyLong conversion and string
5d11b54 @scoder changelog
scoder authored
94 decoding. This fixes ticket 863, ticket 864 and ticket 865.
95 Original patch by Nikolaus Rath.
3e4a436 @scoder changelog
scoder authored
93db584 @scoder changelog
scoder authored
97 * Large folded or inserted integer constants could use too small C
98 integer types and thus trigger a value wrap-around.
f0eaa48 @scoder automatically register with "backports_abc" module if available
scoder authored
100 Other changes
101 -------------
103 * The coroutine and generator types of Cython now also register directly
104 with the ``Coroutine`` and ``Generator`` ABCs in the ``backports_abc``
7045b0b @scoder changelog
scoder authored
105 module if it can be imported. This fixes ticket 870.
f0eaa48 @scoder automatically register with "backports_abc" module if available
scoder authored
3e4a436 @scoder changelog
scoder authored
59f06e3 @scoder prepare release of 0.23.2
scoder authored
108 0.23.2 (2015-09-11)
f4ae257 @scoder docs: clarify a bit more what it means to acquire/release the GIL
scoder authored
109 ===================
111 Bugs fixed
112 ----------
6af38f9 @scoder changelog
scoder authored
114 * Compiler crash when analysing some optimised expressions.
067c6cc @scoder adapt Coverage plugin to coverage 4.0b2
scoder authored
116 * Coverage plugin was adapted to 4.0 beta 2.
15354f1 @scoder changelog
scoder authored
118 * C++ destructor calls could fail when '&' operator is overwritten.
7d72ea6 @scoder changelog
scoder authored
120 * Incorrect C literal generation for large integers in compile-time
121 evaluated DEF expressions and constant folded expressions.
ea6414c @scoder correct processing of large integers (PyLong values) in compile time …
scoder authored
061b132 @scoder fix bytes literal creation from compile-time DEF expressions (used to…
scoder authored
123 * Byte string constants could end up as Unicode strings when originating
124 from compile-time evaluated DEF expressions.
f4ae257 @scoder docs: clarify a bit more what it means to acquire/release the GIL
scoder authored
126 * Invalid C code when caching known builtin methods.
127 This fixes ticket 860.
15354f1 @scoder changelog
scoder authored
129 * ``ino_t`` in ``posix.types`` was not declared as ``unsigned``.
c79b775 @scoder changelog
scoder authored
131 * Declarations in ``libcpp/memory.pxd`` were missing ``operator!()``.
132 Patch by Leo Razoumov.
9493858 @robertwb Fix static methods declared in pxd files.
robertwb authored
134 * Static cdef methods can now be declared in .pxd files.
f4ae257 @scoder docs: clarify a bit more what it means to acquire/release the GIL
scoder authored
be7033c @scoder changelog
scoder authored
137 0.23.1 (2015-08-22)
c02a14e @scoder Merge branch '0.23.x'
scoder authored
138 ===================
a8d8a5d @scoder fix coroutine property name "cr_yieldfrom" -> "cr_await"
scoder authored
140 Bugs fixed
141 ----------
49e8015 @scoder changelog
scoder authored
143 * Invalid C code for generators. This fixes ticket 858.
145 * Invalid C code for some builtin methods. This fixes ticket 856.
d2c1b77 @scoder fix ticket 154: C compilation error for unused local buffer variables
scoder authored
147 * Invalid C code for unused local buffer variables.
148 This fixes ticket 154.
49e8015 @scoder changelog
scoder authored
150 * Test failures on 32bit systems. This fixes ticket 857.
07101f9 @scoder changelog
scoder authored
152 * Code that uses ``from xyz import *`` and global C struct/union/array
27f8ddb @scoder fix #855: make "import *" include all necessary "from_py" coercion he…
scoder authored
153 variables could fail to compile due to missing helper functions.
154 This fixes ticket 851.
77bb90d @scoder changelog
scoder authored
156 * Misnamed PEP 492 coroutine property ``cr_yieldfrom`` renamed to
157 ``cr_await`` to match CPython.
d13bbd0 @robertwb Note change to enum conversions.
robertwb authored
70c4404 @scoder prepare release of 0.23.1
scoder authored
159 * Missing deallocation code for C++ object attributes in certain
160 extension class hierarchies.
554b2a4 @scoder fix crash where Coroutine deallocation could execute Python code to p…
scoder authored
162 * Crash when async coroutine was not awaited.
286b58d @scoder changelog
scoder authored
164 * Compiler crash on ``yield`` in signature annotations and default
165 argument values. Both are forbidden now.
70c4404 @scoder prepare release of 0.23.1
scoder authored
167 * Compiler crash on certain constructs in ``finally`` clauses.
169 * Cython failed to build when CPython's pgen is installed.
d13bbd0 @robertwb Note change to enum conversions.
robertwb authored
ef5f4ad @scoder prepare release of 0.23
scoder authored
172 0.23 (2015-08-08)
d13bbd0 @robertwb Note change to enum conversions.
robertwb authored
173 =================
29eb023 @scoder implement coverage analysis support as a plugin for the tool
scoder authored
175 Features added
176 --------------
346acf0 @scoder changelog
scoder authored
178 * PEP 492 (async/await) was implemented.
179 See
181 * PEP 448 (Additional Unpacking Generalizations) was implemented.
182 See
29eb023 @scoder implement coverage analysis support as a plugin for the tool
scoder authored
184 * Support for 4.0+ can be enabled by adding the plugin
185 "Cython.Coverage" to the ".coveragerc" config file.
476565c @scoder changelog
scoder authored
187 * Annotated HTML source pages can integrate (XML) coverage reports.
a871a39 @scoder changelog
scoder authored
189 * Tracing is supported in ``nogil`` functions/sections and module init code.
3b6ec99 @scoder enable tracing for nogil functions/sections
scoder authored
e5fc523 @scoder patch "asyncio" and "inspect" stdlib modules to make them recognise C…
scoder authored
191 * When generators are used in a Cython module and the module imports the
192 modules "inspect" and/or "asyncio", Cython enables interoperability by
8e41d0c @scoder clarify in changelog what "patching stdlib modules" means
scoder authored
193 patching these modules during the import to recognise Cython's internal
7cad643 @scoder remove ABC implementations from imports patching code and instead onl…
scoder authored
194 generator and coroutine types. This can be disabled by C compiling the
197 * When generators or coroutines are used in a Cython module, their types
198 are registered with the ``Generator`` and ``Coroutine`` ABCs in the
199 ``collections`` or ```` stdlib module at import time to
200 enable interoperability with code that needs to detect and process Python
201 generators/coroutines. These ABCs were added in CPython 3.5 and are
202 available for older Python versions through the ``backports_abc`` module
203 on PyPI. See
baef96d @scoder changelog
scoder authored
df153f7 @scoder changelog
scoder authored
205 * Adding/subtracting/dividing/modulus and equality comparisons with
206 constant Python floats and small integers are faster.
118a023 @scoder speed up adding/subtracting small integer constants
scoder authored
df153f7 @scoder changelog
scoder authored
208 * Binary and/or/xor/rshift operations with small constant Python integers
209 are faster.
1e9b546 @scoder speed up binary and/or/xor operations with constant Python integers
scoder authored
c1d71d7 @scoder use inlined generator expression for unicode.join(genexpr)
scoder authored
211 * When called on generator expressions, the builtins ``all()``, ``any()``,
212 ``dict()``, ``list()``, ``set()``, ``sorted()`` and ``unicode.join()``
213 avoid the generator iteration overhead by inlining a part of their
214 functionality into the for-loop.
995597c @scoder use inlined generator expression for sorted(genexpr)
scoder authored
9d2ba22 @scoder changelog
scoder authored
216 * Keyword argument dicts are no longer copied on function entry when they
217 are not being used or only passed through to other function calls (e.g.
218 in wrapper functions).
bdb11ae @scoder changelog
scoder authored
220 * The ``PyTypeObject`` declaration in ``cpython.object`` was extended.
5381d78 @scoder changelog
scoder authored
222 * The builtin ``type`` type is now declared as PyTypeObject in source,
223 allowing for extern functions taking type parameters to have the correct
224 C signatures. Note that this might break code that uses ``type`` just
225 for passing around Python types in typed variables. Removing the type
226 declaration provides a backwards compatible fix.
19fa1c9 @robertwb Note PyTypeObject change.
robertwb authored
6908810 @scoder make wraparound() and boundscheck() available in pure mode
scoder authored
228 * ``wraparound()`` and ``boundscheck()`` are available as no-ops in pure
229 Python mode.
af8520f @scoder changelog
scoder authored
231 * Const iterators were added to the provided C++ STL declarations.
ef5f4ad @scoder prepare release of 0.23
scoder authored
233 * Smart pointers were added to the provided C++ STL declarations.
234 Patch by Daniel Filonik.
bf66d45 @scoder changelog
scoder authored
236 * ``NULL`` is allowed as default argument when embedding signatures.
237 This fixes ticket 843.
b16a553 @scoder changelog
scoder authored
239 * When compiling with ``--embed``, the internal module name is changed to
240 ``__main__`` to allow arbitrary program names, including those that would
241 be invalid for modules. Note that this prevents reuse of the generated
242 C code as an importable module.
7de2779 @scoder changelog
scoder authored
244 * External C++ classes that overload the assignment operator can be used.
82aed5c @scoder changelog
scoder authored
245 Patch by Ian Henriksen.
7de2779 @scoder changelog
scoder authored
9f850fb @robertwb Support operator bool() for C++ classes.
robertwb authored
247 * Support operator bool() for C++ classes so they can be used in if statements.
29eb023 @scoder implement coverage analysis support as a plugin for the tool
scoder authored
249 Bugs fixed
250 ----------
6254fcc @scoder changelog
scoder authored
252 * Calling "yield from" from Python on a Cython generator that returned a
253 value triggered a crash in CPython. This is now being worked around.
f571608 @scoder changelog
scoder authored
254 See
4af4244 @scoder work around crash in CPython's yield-from implementation for generato…
scoder authored
6254fcc @scoder changelog
scoder authored
256 * Language level 3 did not enable true division (a.k.a. float division)
257 for integer operands.
6e0e4e1 @scoder enable true division for language_level=3
scoder authored
f599da7 @scoder make 'object' predictably the last fallback option for fused typed ar…
scoder authored
259 * Functions with fused argument types that included a generic 'object'
260 fallback could end up using that fallback also for other explicitly
261 listed object types.
6254fcc @scoder changelog
scoder authored
263 * Relative cimports could accidentally fall back to trying an absolute
264 cimport on failure.
460177f @scoder changelog
scoder authored
6254fcc @scoder changelog
scoder authored
266 * The result of calling a C struct constructor no longer requires an
267 intermediate assignment when coercing to a Python dict.
c25a616 @scoder allow struct constructors to coerce directly to Python dicts without …
scoder authored
6254fcc @scoder changelog
scoder authored
269 * C++ exception declarations with mapping functions could fail to compile
270 when pre-declared in .pxd files.
93d7a61 @scoder Merge branch '0.22.x'
scoder authored
7df9d65 @robertwb Support cpdef void methods.
robertwb authored
272 * ``cpdef void`` methods are now permitted.
372efbe @scoder changelog
scoder authored
274 * ``abs(cint)`` could fail to compile in MSVC and used sub-optimal code
275 in C++. Patch by David Vierra, original patch by Michael Enßlin.
6254fcc @scoder changelog
scoder authored
277 * Buffer index calculations using index variables with small C integer
82aed5c @scoder changelog
scoder authored
278 types could overflow for large buffer sizes.
279 Original patch by David Vierra.
6254fcc @scoder changelog
scoder authored
09a61d2 @scoder make the coercion between C unions and Python dicts usable
scoder authored
281 * C unions use a saner way to coerce from and to Python dicts.
2796ac2 @jdemeyer Do not search sys.path for .pxd file if no explicit "cimport" is given
jdemeyer authored
283 * When compiling a module ``foo.pyx``, the directories in ``sys.path``
284 are no longer searched when looking for ``foo.pxd``.
82aed5c @scoder changelog
scoder authored
285 Patch by Jeroen Demeyer.
287 * Memory leaks in the embedding main function were fixed.
288 Original patch by Michael Enßlin.
290 * Some complex Python expressions could fail to compile inside of finally
291 clauses.
2796ac2 @jdemeyer Do not search sys.path for .pxd file if no explicit "cimport" is given
jdemeyer authored
7f89a1d @scoder allow unprefixed 'str' literals in C varargs lists
scoder authored
293 * Unprefixed 'str' literals were not supported as C varargs arguments.
d13bbd0 @robertwb Note change to enum conversions.
robertwb authored
295 * Fixed type errors in conversion enum types to/from Python. Note that
296 this imposes stricter correctness requirements on enum declarations.
f72110b @jdemeyer Update release notes
jdemeyer authored
299 Other changes
300 -------------
302 * Changed mangling scheme in header files generated by ``cdef api``
303 declarations.
93d7a61 @scoder Merge branch '0.22.x'
scoder authored
cbea77b @scoder changelog
scoder authored
305 * Installation under CPython 3.3+ no longer requires a pass of the
306 2to3 tool. This also makes it possible to run Cython in Python
307 3.3+ from a source checkout without installing it first.
308 Patch by Petr Viktorin.
3b8f1fd @scoder changelog
scoder authored
310 * ```` (in ``Tools/``) was extended and renamed to
311 ```` (to make it importable) and now works with and
312 requires Jedi 0.9. Patch by Tzer-jen Wei.
5fe857d @scoder changelog
scoder authored
6ed5806 @scoder Merge branch '0.22.x'
scoder authored
146fd20 @scoder prepare release of 0.22.1
scoder authored
315 0.22.1 (2015-06-20)
f29bfc9 @scoder fix changelog
scoder authored
316 ===================
93d7a61 @scoder Merge branch '0.22.x'
scoder authored
a74bdd5 @scoder make filename table relative to project root to actually allow findin…
scoder authored
318 Bugs fixed
319 ----------
6a56c76 @scoder changelog
scoder authored
321 * Crash when returning values on generator termination.
bf93c49 @scoder fix some cases where errors in IsInstance()/IsSubtype() calls were no…
scoder authored
323 * In some cases, exceptions raised during internal isinstance() checks were
324 not propagated.
a74bdd5 @scoder make filename table relative to project root to actually allow findin…
scoder authored
326 * Runtime reported file paths of source files (e.g for profiling and tracing)
327 are now relative to the build root directory instead of the main source file.
65840df @scoder changelog
scoder authored
329 * Tracing exception handling code could enter the trace function with an active
330 exception set.
ff15b2f @scoder fix sharing of Generator type across modules
scoder authored
332 * The internal generator function type was not shared across modules.
65840df @scoder changelog
scoder authored
334 * Comparisons of (inferred) ctuples failed to compile.
9d320da @scoder changelog
scoder authored
62066a0 @scoder changelog
scoder authored
336 * Closures inside of cdef functions returning ``void`` failed to compile.
9d320da @scoder changelog
scoder authored
338 * Using ``const`` C++ references in intermediate parts of longer expressions
339 could fail to compile.
65840df @scoder changelog
scoder authored
57e838f @scoder fix changelog
scoder authored
341 * C++ exception declarations with mapping functions could fail to compile when
342 pre-declared in .pxd files.
f198427 @scoder fix function ambiguity error in recent Xcode versions
scoder authored
7f5ef60 @scoder fix function ambiguity error in recent Xcode versions
scoder authored
344 * C++ compilation could fail with an ambiguity error in recent MacOS-X Xcode
345 versions.
6c35aa7 @scoder changelog
scoder authored
347 * C compilation could fail in pypy3.
91f8935 @scoder changelog
scoder authored
349 * Fixed a memory leak in the compiler when compiling multiple modules.
5da369b @scoder changelog
scoder authored
351 * When compiling multiple modules, external library dependencies could leak
352 into later compiler runs. Fix by Jeroen Demeyer. This fixes ticket 845.
a2a46a9 @robertwb Change notes.
robertwb authored
1fb644d @robertwb 0.22 release candidate
robertwb authored
355 0.22 (2015-02-11)
356 =================
a2a46a9 @robertwb Change notes.
robertwb authored
ee86071 @scoder changelog
scoder authored
358 Features added
359 --------------
63a5d78 @scoder changelog
scoder authored
361 * C functions can coerce to Python functions, which allows passing them
362 around as callable objects.
a0e2b42 @scoder changelog
scoder authored
364 * C arrays can be assigned by value and auto-coerce from Python iterables
365 and to Python lists (and tuples).
3676e7a @scoder changelog
scoder authored
d6f77d7 @robertwb Auto-wrap cpdef extern functions.
robertwb authored
367 * Extern C functions can now be declared as cpdef to export them to
368 the module's Python namespace. Extern C functions in pxd files export
369 their values to their own module, iff it exists.
26eed56 @scoder fix changelog
scoder authored
371 * Anonymous C tuple types can be declared as (ctype1, ctype2, ...).
b4383a5 @scoder implement PEP 479: replace accidental StopIteration exceptions that e…
scoder authored
373 * PEP 479: turn accidental StopIteration exceptions that exit generators
374 into a RuntimeError, activated with future import "generator_stop".
2fc964b @scoder changelog
scoder authored
375 See
b4383a5 @scoder implement PEP 479: replace accidental StopIteration exceptions that e…
scoder authored
7e89fa7 @scoder changelog
scoder authored
377 * Looping over ``reversed(range())`` is optimised in the same way as
378 ``range()``. Patch by Favian Contreras.
4c865f3 @scoder changelog
scoder authored
380 Bugs fixed
381 ----------
383 * Mismatching 'except' declarations on signatures in .pxd and .pyx files failed
384 to produce a compile error.
7e89fa7 @scoder changelog
scoder authored
386 * Failure to find any files for the path pattern(s) passed into ``cythonize()``
387 is now an error to more easily detect accidental typos.
10bd329 @larsmans fix erroneous prototypes for npy_logaddexp*
larsmans authored
389 * The ``logaddexp`` family of functions in ``numpy.math`` now has correct
390 declarations.
2b76ed2 @scoder changelog
scoder authored
392 * In Py2.6/7 and Py3.2, simple Cython memory views could accidentally be
393 interpreted as non-contiguous by CPython, which could trigger a CPython
394 bug when copying data from them, thus leading to data corruption.
395 See CPython issues 12834 and 23349.
4c865f3 @scoder changelog
scoder authored
397 Other changes
398 -------------
a2a46a9 @robertwb Change notes.
robertwb authored
400 * Preliminary support for defining the Cython language with a formal grammar.
401 To try parsing your files against this grammar, use the --formal_grammar directive.
402 Experimental.
c66d14f @scoder changelog
scoder authored
404 * ``_`` is no longer considered a cacheable builtin as it could interfere with
405 gettext.
b2538cd @scoder typo
scoder authored
407 * Cythonize-computed metadata now cached in the generated C files.
8d62db6 @robertwb changelog
robertwb authored
409 * Several corrections and extensions in numpy, cpython, and libcpp pxd files.
75079c9 @scoder exclude "_" from list of cacheable 'builtins' to improve compatibilit…
scoder authored
4c865f3 @scoder changelog
scoder authored
efdbeef @scoder prepare release of 0.21.2
scoder authored
412 0.21.2 (2014-12-27)
b77fee3 @scoder changelog
scoder authored
413 ===================
415 Bugs fixed
416 ----------
418 * Crash when assigning a C value to both a Python and C target at the same time.
420 * Automatic coercion from C++ strings to ``str`` generated incomplete code that
421 failed to compile.
423 * Declaring a constructor in a C++ child class erroneously required a default
424 constructor declaration in the super class.
426 * ``resize_smart()`` in ``cpython.array`` was broken.
428 * Functions in ``libcpp.cast`` are now declared as ``nogil``.
430 * Some missing C-API declarations were added.
432 * Py3 main code in embedding program code was lacking casts.
6870ce0 @scoder changelog
scoder authored
434 * Exception related to distutils "Distribution" class type in pyximport under
435 latest CPython 2.7 and 3.4 releases when setuptools is being imported later.
b77fee3 @scoder changelog
scoder authored
4c865f3 @scoder changelog
scoder authored
438 0.21.1 (2014-10-18)
439 ===================
441 Features added
442 --------------
444 * New ``cythonize`` option ``-a`` to generate the annotated HTML source view.
22a54c7 @scoder extend PyUnicode C-API declarations
scoder authored
446 * Missing C-API declarations in ``cpython.unicode`` were added.
88df97f @scoder implement'language='c++' option for cythonize()
scoder authored
448 * Passing ``language='c++'`` into cythonize() globally enables C++ mode for
449 all modules that were not passed as Extension objects (i.e. only source
450 files and file patterns).
3154bef @scoder make Py_hash_t a known type
scoder authored
452 * ``Py_hash_t`` is a known type (used in CPython for hash values).
ee86071 @scoder changelog
scoder authored
454 * ``PySlice_*()`` C-API functions are available from the ``cpython.slice``
455 module.
9b1d6e2 @scoder changelog
scoder authored
457 * Allow arrays of C++ classes.
871377b @scoder Fix crash when an exception occurs during module init and the stale m…
scoder authored
459 Bugs fixed
460 ----------
68a5d5d @scoder fix a reference leak for non-simple conditions in boolean and/or expr…
scoder authored
462 * Reference leak for non-simple Python expressions in boolean and/or expressions.
77b4c4b Change CHANGES.rst to reflect the actual difference from 0.21 release.
Charles Blake authored
464 * To fix a name collision and to reflect availability on host platforms,
465 standard C declarations [ clock(), time(), struct tm and tm* functions ]
8a1c831 @scoder changelog
scoder authored
466 were moved from posix/time.pxd to a new libc/time.pxd. Patch by Charles
467 Blake.
4562c6b @scoder extract sys_time.pxd from time.pxd to fix naming collision of "struct…
scoder authored
ee86071 @scoder changelog
scoder authored
469 * Rerunning unmodified modules in IPython's cython support failed.
470 Patch by Matthias Bussonier.
472 * Casting C++ ``std::string`` to Python byte strings failed when
473 auto-decoding was enabled.
113bdaa @scoder fix explicit <bytes> etc. casts for C++ std::string when auto-decodin…
scoder authored
871377b @scoder Fix crash when an exception occurs during module init and the stale m…
scoder authored
475 * Fatal exceptions in global module init code could lead to crashes
476 if the already created module was used later on (e.g. through a
477 stale reference in sys.modules or elsewhere).
862b786 @scoder changelog
scoder authored
479 * ```` script was not installed on MS-Windows.
f03bb32 @scoder turn cythonize() error on unknown compilation options into a warning
scoder authored
481 Other changes
482 -------------
9262e55 @scoder changelog
scoder authored
484 * Compilation no longer fails hard when unknown compilation options are
485 passed. Instead, it raises a warning and ignores them (as it did silently
486 before 0.21). This will be changed back to an error in a future release.
01529c0 @robertwb Allow arrays of C++ classes.
robertwb authored
871377b @scoder Fix crash when an exception occurs during module init and the stale m…
scoder authored
c67e895 @scoder prepare release of 0.21
scoder authored
489 0.21 (2014-09-10)
490 =================
5e08f83 @scoder fix repeated list multiplication
scoder authored
bda9013 @robertwb Support for C++ unordered sets and maps.
robertwb authored
492 Features added
493 --------------
b8ce0ee @scoder changelog
scoder authored
495 * C (cdef) functions allow inner Python functions.
50133b5 @robertwb Allow extern cpdef enum to export values into Python-level namespace.
robertwb authored
497 * Enums can now be declared as cpdef to export their values to
498 the module's Python namespace. Cpdef enums in pxd files export
499 their values to their own module, iff it exists.
ee80d4b @robertwb Static cdef methods.
robertwb authored
501 * Allow @staticmethod decorator to declare static cdef methods.
502 This is especially useful for declaring "constructors" for
503 cdef classes that can take non-Python arguments.
37e4a20 @scoder generally postpone the cleanup for char* temps to improve safety and …
scoder authored
505 * Taking a ``char*`` from a temporary Python string object is safer
506 in more cases and can be done inside of non-trivial expressions,
507 including arguments of a function call. A compile time error
508 is raised only when such a pointer is assigned to a variable and
509 would thus exceed the lifetime of the string itself.
0c19e21 @scoder add __name__ and __qualname__ properties to generators
scoder authored
511 * Generators have new properties ``__name__`` and ``__qualname__``
512 that provide the plain/qualified name of the generator function
25d180e @scoder changelog
scoder authored
513 (following CPython 3.5). See
0c19e21 @scoder add __name__ and __qualname__ properties to generators
scoder authored
fea7ad6 @scoder implement "@cython.inline" decorator for functions
scoder authored
515 * The ``inline`` function modifier is available as a decorator
516 ``@cython.inline`` in pure mode.
9147301 @scoder activate virtualenv inside of cygdb if it was enabled outside
scoder authored
518 * When cygdb is run in a virtualenv, it enables the same virtualenv
519 inside of the debugger. Patch by Marc Abramowitz.
369b75e @scoder changelog
scoder authored
521 * PEP 465: dedicated infix operator for matrix multiplication (A @ B).
0df1efa @scoder changelog
scoder authored
523 * HTML output of annotated code uses Pygments for code highlighting
524 and generally received a major overhaul by Matthias Bussonier.
a1765d5 @scoder changelog
scoder authored
526 * IPython magic support is now available directly from Cython with
527 the command "%load_ext cython". Cython code can directly be
528 executed in a cell when marked with "%%cython". Code analysis
529 is available with "%%cython -a". Patch by Martín Gaitán.
c036607 @scoder implement support for extracting type declarations from signature ann…
scoder authored
531 * Simple support for declaring Python object types in Python signature
c31b0fa @scoder changelog
scoder authored
532 annotations. Currently requires setting the compiler directive
533 ``annotation_typing=True``.
c036607 @scoder implement support for extracting type declarations from signature ann…
scoder authored
25d180e @scoder changelog
scoder authored
535 * New directive ``use_switch`` (defaults to True) to optionally disable
536 the optimization of chained if statement to C switch statements.
a72e23e @robertwb Document use_switch directive.
robertwb authored
42beae3 @scoder changelog
scoder authored
538 * Defines dynamic_cast et al. in ``libcpp.cast`` and C++ heap data
539 structure operations in ``libcpp.algorithm``.
b4d4eda @larsmans add support for C++ stdlib heap operations
larsmans authored
05466cb @scoder changelog
scoder authored
541 * Shipped header declarations in ``posix.*`` were extended to cover
542 more of the POSIX API. Patches by Lars Buitinck and Mark Peek.
394aa9a @robertwb Merge branch 'master' into static
robertwb authored
544 Optimizations
545 -------------
677efaa @scoder optimise 1-arg/no-args calls to PyCFunction by avoiding tuple packing…
scoder authored
547 * Simple calls to C implemented Python functions/methods are faster.
cbd7b2c @scoder changelog
scoder authored
548 This also speeds up many operations on builtins that Cython cannot
549 otherwise optimise.
677efaa @scoder optimise 1-arg/no-args calls to PyCFunction by avoiding tuple packing…
scoder authored
dd85410 @robertwb Merge branch 'master' into static
robertwb authored
551 * The "and"/"or" operators try to avoid unnecessary coercions of their
552 arguments. They now evaluate the truth value of each argument
553 independently and only coerce the final result of the whole expression
554 to the target type (e.g. the type on the left side of an assignment).
555 This also avoids reference counting overhead for Python values during
556 evaluation and generally improves the code flow in the generated C code.
394aa9a @robertwb Merge branch 'master' into static
robertwb authored
558 * The Python expression "2 ** N" is optimised into bit shifting.
559 See
561 * Cascaded assignments (a = b = ...) try to minimise the number of
562 type coercions.
564 * Calls to ``slice()`` are translated to a straight C-API call.
a3bc5f5 @scoder increase version of master branch to 0.21dev
scoder authored
566 Bugs fixed
567 ----------
7a47dfd @scoder fix crash when assigning memoryviews through ternary conditional expr…
scoder authored
569 * Crash when assigning memory views from ternary conditional expressions.
43d1490 @scoder changelog
scoder authored
571 * Nested C++ templates could lead to unseparated ">>" characters being
572 generated into the C++ declarations, which older C++ compilers could
573 not parse.
9e55dee @scoder changelog
scoder authored
575 * Sending SIGINT (Ctrl-C) during parallel cythonize() builds could
576 hang the child processes.
259d392 @scoder changelog
scoder authored
578 * No longer ignore local setup.cfg files for distutils in pyximport.
579 Patch by Martin Teichmann.
37e4a20 @scoder generally postpone the cleanup for char* temps to improve safety and …
scoder authored
581 * Taking a ``char*`` from an indexed Python string generated unsafe
582 reference counting code.
3726462 @scoder changelog
scoder authored
584 * Set literals now create all of their items before trying to add them
585 to the set, following the behaviour in CPython. This makes a
586 difference in the rare case that the item creation has side effects
587 and some items are not hashable (or if hashing them has side effects,
588 too).
90cf645 @scoder changelog
scoder authored
590 * Cython no longer generates the cross product of C functions for code
591 that uses memory views of fused types in function signatures (e.g.
592 ``cdef func(floating[:] a, floating[:] b)``). This is considered the
593 expected behaviour by most users and was previously inconsistent with
594 other structured types like C arrays. Code that really wants all type
595 combinations can create the same fused memoryview type under different
596 names and use those in the signature to make it clear which types are
597 independent.
781439e @scoder changelog
scoder authored
599 * Names that were unknown at compile time were looked up as builtins at
228f30a @scoder changelog
scoder authored
600 runtime but not as global module names. Trying both lookups helps with
601 globals() manipulation.
781439e @scoder changelog
scoder authored
770acb7 @robertwb Fixed stl container conversion with typedef element types.
robertwb authored
603 * Fixed stl container conversion for typedef element types.
f7ee3cb @scoder changelog
scoder authored
605 * ``obj.pop(x)`` truncated large C integer values of x to ``Py_ssize_t``.
0df1efa @scoder changelog
scoder authored
607 * ``__init__.pyc`` is recognised as marking a package directory
608 (in addition to .py, .pyx and .pxd).
bf4d9dc @scoder changelog
scoder authored
610 * Syntax highlighting in ``cython-mode.el`` for Emacs no longer
611 incorrectly highlights keywords found as part of longer names.
279b7b9 @scoder changelog
scoder authored
613 * Correctly handle ``from cython.submodule cimport name``.
ff0b1b1 @robertwb Correctly handle `from cython.submodule comport name``.
robertwb authored
191b923 @robertwb Fix infinite recurison when using super with cpdef methods.
robertwb authored
615 * Fix infinite recursion when using super with cpdef methods.
e87b617 @scoder changelog
scoder authored
617 * No-args ``dir()`` was not guaranteed to return a sorted list.
a3bc5f5 @scoder increase version of master branch to 0.21dev
scoder authored
619 Other changes
620 -------------
17ec3f8 @scoder changelog
scoder authored
622 * The header line in the generated C files no longer contains the
623 timestamp but only the Cython version that wrote it. This was
624 changed to make builds more reproducible.
bf4d9dc @scoder changelog
scoder authored
626 * Removed support for CPython 2.4, 2.5 and 3.1.
a1765d5 @scoder changelog
scoder authored
628 * The licensing implications on the generated code were clarified
629 to avoid legal constraints for users.
a3bc5f5 @scoder increase version of master branch to 0.21dev
scoder authored
192a4c1 @robertwb Bump version.
robertwb authored
632 0.20.2 (2014-06-16)
a3bc5f5 @scoder increase version of master branch to 0.21dev
scoder authored
633 ===================
635 Features added
636 --------------
1012763 @scoder changelog
scoder authored
638 * Some optimisations for set/frozenset instantiation.
bda9013 @robertwb Support for C++ unordered sets and maps.
robertwb authored
1012763 @scoder changelog
scoder authored
640 * Support for C++ unordered_set and unordered_map.
bda9013 @robertwb Support for C++ unordered sets and maps.
robertwb authored
52b5142 @scoder changelog
scoder authored
642 Bugs fixed
643 ----------
135e52d @scoder fix access to attributes of optimised builtin methods (e.g. '__name__')
scoder authored
645 * Access to attributes of optimised builtin methods (e.g.
646 ``[].append.__name__``) could fail to compile.
68f9263 @scoder fix memory leak for memory views in extension subtypes
scoder authored
648 * Memory leak when extension subtypes add a memory view as attribute
649 to those of the parent type without having Python object attributes
650 or a user provided dealloc method.
e7ffd0a @scoder fix compiler crash on "readonly" properties in "binding" mode
scoder authored
652 * Compiler crash on readonly properties in "binding" mode.
73e24e8 @scoder fix ascii auto-encoding in Py3.3
scoder authored
654 * Auto-encoding with ``c_string_encoding=ascii`` failed in Py3.3.
d2aff82 @scoder fix crash by excluding heap types from the extension type freelists
scoder authored
656 * Crash when subtyping freelist enabled Cython extension types with
657 Python classes that use ``__slots__``.
895e206 @scoder restrict freelist usage to CPython
scoder authored
659 * Freelist usage is restricted to CPython to avoid problems with other
660 Python implementations.
956f650 @scoder fix memory leak in memory views when copying overlapping contiguous s…
scoder authored
662 * Memory leak in memory views when copying overlapping, contiguous slices.
5f35da2 @scoder fix format checking for cython.array.__getbuffer__() in Py3
scoder authored
664 * Format checking when requesting non-contiguous buffers from
7c20a89 @scoder changelog
scoder authored
665 ``cython.array`` objects was accidentally omitted in Py3.
5f35da2 @scoder fix format checking for cython.array.__getbuffer__() in Py3
scoder authored
52b5142 @scoder changelog
scoder authored
667 * C++ destructor calls in extension types could fail to compile in clang.
58d9361 @scoder fix buffer format validation for sequences of strings in structs
scoder authored
669 * Buffer format validation failed for sequences of strings in structs.
52b5142 @scoder changelog
scoder authored
671 * Docstrings on extension type attributes in .pxd files were rejected.
bda9013 @robertwb Support for C++ unordered sets and maps.
robertwb authored
c7c0180 @robertwb Bump version for release.
robertwb authored
674 0.20.1 (2014-02-11)
675 ===================
5e08f83 @scoder fix repeated list multiplication
scoder authored
677 Bugs fixed
678 ----------
173d08e @scoder changelog
scoder authored
680 * Build error under recent MacOS-X versions where ``isspace()`` could not be
681 resolved by clang.
5e08f83 @scoder fix repeated list multiplication
scoder authored
683 * List/Tuple literals multiplied by more than one factor were only multiplied
684 by the last factor instead of all.
b8e37bc @scoder disable usage of _PyType_Lookup() in Py<=2.6/3.1
scoder authored
686 * Lookups of special methods (specifically for context managers) could fail
687 in Python <= 2.6/3.1.
1e71f4e @scoder fix signature introspection for functions with kwonly arguments
scoder authored
689 * Local variables were erroneously appended to the signature introspection
ed41403 @scoder changelog
scoder authored
690 of Cython implemented functions with keyword-only arguments under Python 3.
1e71f4e @scoder fix signature introspection for functions with kwonly arguments
scoder authored
5e08f83 @scoder fix repeated list multiplication
scoder authored
692 * In-place assignments to variables with inferred Python builtin/extension
693 types could fail with type errors if the result value type was incompatible
694 with the type of the previous value.
696 * The C code generation order of cdef classes, closures, helper code,
697 etc. was not deterministic, thus leading to high code churn.
699 * Type inference could fail to deduce C enum types.
701 * Type inference could deduce unsafe or inefficient types from integer
702 assignments within a mix of inferred Python variables and integer
703 variables.
061ca11 @robertwb Add date to release notes.
robertwb authored
706 0.20 (2014-01-18)
707 =================
d0e6b3d @scoder changelog
scoder authored
709 Features added
710 --------------
48975c9 @scoder changelog
scoder authored
712 * Support for CPython 3.4.
9016bdb @robertwb Release notes.
robertwb authored
714 * Support for calling C++ template functions.
a1238e2 @scoder implement 'yield' inside of 'finally' clause
scoder authored
716 * ``yield`` is supported in ``finally`` clauses.
9729f16 @scoder changelog
scoder authored
718 * The C code generated for finally blocks is duplicated for each exit
f2f7d37 @scoder fix typo
scoder authored
719 case to allow for better optimisations by the C compiler.
9729f16 @scoder changelog
scoder authored
721 * Cython tries to undo the Python optimisationism of assigning a bound
722 method to a local variable when it can generate better code for the
723 direct call.
92e16f1 @scoder changelog
scoder authored
725 * Constant Python float values are cached.
f25b99d @scoder changelog
scoder authored
727 * String equality comparisons can use faster type specific code in
728 more cases than before.
c66eca2 @scoder changelog
scoder authored
730 * String/Unicode formatting using the '%' operator uses a faster
731 C-API call.
6900b53 @scoder support 'bytearray' in the same way as 'bytes', starting with Py2.6
scoder authored
733 * ``bytearray`` has become a known type and supports coercion from and
8524b21 @scoder support bytearray as auto encoding string type
scoder authored
734 to C strings. Indexing, slicing and decoding is optimised. Note that
735 this may have an impact on existing code due to type inference.
6900b53 @scoder support 'bytearray' in the same way as 'bytes', starting with Py2.6
scoder authored
f8233ea @scoder extend semantics of 'basestring' typed variables to represent exactly…
scoder authored
737 * Using ``cdef basestring stringvar`` and function arguments typed as
738 ``basestring`` is now meaningful and allows assigning exactly
c9ff29a @scoder changelog
scoder authored
739 ``str`` and ``unicode`` objects, but no subtypes of these types.
f8233ea @scoder extend semantics of 'basestring' typed variables to represent exactly…
scoder authored
35fa56a @scoder changelog
scoder authored
741 * Support for the ``__debug__`` builtin.
743 * Assertions in Cython compiled modules are disabled if the running
744 Python interpreter was started with the "-O" option.
939c44e @scoder changelog
scoder authored
746 * Some types that Cython provides internally, such as functions and
747 generators, are now shared across modules if more than one Cython
748 implemented module is imported.
750 * The type inference algorithm works more fine granular by taking the
751 results of the control flow analysis into account.
4f119a8 @scoder add bin/cythonize script
scoder authored
753 * A new script in ``bin/cythonize`` provides a command line frontend
754 to the cythonize() compilation function (including distutils build).
d32cdad @scoder changelog
scoder authored
756 * The new extension type decorator ``@cython.no_gc_clear`` prevents
16c9b6b @scoder minor changelog fix
scoder authored
757 objects from being cleared during cyclic garbage collection, thus
d32cdad @scoder changelog
scoder authored
758 making sure that object attributes are kept alive until deallocation.
3c878c6 @scoder changelog
scoder authored
760 * During cyclic garbage collection, attributes of extension types that
fc0a514 @scoder changelog
scoder authored
761 cannot create reference cycles due to their type (e.g. strings) are
b07d9d7 @scoder changelog
scoder authored
762 no longer considered for traversal or clearing. This can reduce the
763 processing overhead when searching for or cleaning up reference cycles.
3c878c6 @scoder changelog
scoder authored
5c6c97b @scoder always set __path__ for compiled packages and in Py3.3 actually imple…
scoder authored
765 * Package compilation (i.e. ```` files) now works, starting
766 with Python 3.3.
8a51c8a @scoder changelog
scoder authored
768 * The cython-mode.el script for Emacs was updated. Patch by Ivan Andrus.
43158a5 @scoder changelog
scoder authored
367498f @robertwb Explicitly disallow caching + common_utility_include_dir.
robertwb authored
770 * An option common_utility_include_dir was added to cythonize() to save
771 oft-used utility code once in a separate directory rather than as
772 part of each generated file.
e0ef44b @robertwb Unraisable traceback docs.
robertwb authored
774 * ``unraisable_tracebacks`` directive added to control printing of
775 tracebacks of unraisable exceptions.
d0e6b3d @scoder changelog
scoder authored
777 Bugs fixed
778 ----------
85f5c24 @scoder changelog
scoder authored
780 * Abstract Python classes that subtyped a Cython extension type
781 failed to raise an exception on instantiation, and thus ended
782 up being instantiated.
0d1df63 @scoder changelog
scoder authored
784 * ``set.add(a_tuple)`` and ``set.discard(a_tuple)`` failed with a
785 TypeError in Py2.4.
f082a44 @scoder reimplement PEP 3155 __qualname__ calculation in a dedicated transfor…
scoder authored
787 * The PEP 3155 ``__qualname__`` was incorrect for nested classes and
788 inner classes/functions declared as ``global``.
1955a53 @scoder implement another try-finally corner case (the Py3 way only for now!)…
scoder authored
790 * Several corner cases in the try-finally statement were fixed.
c0c8f92 @scoder implement metaclass calculation/validation algorithm, make classes in…
scoder authored
792 * The metaclass of a Python class was not inherited from its parent
793 class(es). It is now extracted from the list of base classes if not
794 provided explicitly using the Py3 ``metaclass`` keyword argument.
795 In Py2 compilation mode, a ``__metaclass__`` entry in the class
796 dict will still take precedence if not using Py3 metaclass syntax,
797 but only *after* creating the class dict (which may have been done
798 by a metaclass of a base class, see PEP 3115). It is generally
799 recommended to use the explicit Py3 syntax to define metaclasses
800 for Python types at compile time.
d0e6b3d @scoder changelog
scoder authored
802 * The automatic C switch statement generation behaves more safely for
803 heterogeneous value types (e.g. mixing enum and char), allowing for
804 a slightly wider application and reducing corner cases. It now always
805 generates a 'default' clause to avoid C compiler warnings about
806 unmatched enum values.
e1f4acc @robertwb Release notes.
robertwb authored
808 * Fixed a bug where class hierarchies declared out-of-order could result
809 in broken generated code.
9016bdb @robertwb Release notes.
robertwb authored
811 * Fixed a bug which prevented overriding const methods of C++ classes.
d929ac0 @scoder fix crash in Python object to C++ string conversion
scoder authored
813 * Fixed a crash when converting Python objects to C++ strings fails.
d0e6b3d @scoder changelog
scoder authored
815 Other changes
816 -------------
c0c8f92 @scoder implement metaclass calculation/validation algorithm, make classes in…
scoder authored
818 * In Py3 compilation mode, Python2-style metaclasses declared by a
819 ``__metaclass__`` class dict entry are ignored.
b07d9d7 @scoder changelog
scoder authored
821 * In Py3.4+, the Cython generator type uses ``tp_finalize()`` for safer
822 cleanup instead of ``tp_del()``.
1ec7490 @scoder changelog
scoder authored
d0e6b3d @scoder changelog
scoder authored
c2ddf29 @scoder prepare release of 0.19.2
scoder authored
825 0.19.2 (2013-10-13)
7826127 @scoder changelog
scoder authored
826 ===================
828 Features added
829 --------------
831 Bugs fixed
832 ----------
23fa0ea @scoder changelog
scoder authored
834 * Some standard declarations were fixed or updated, including the previously
835 incorrect declaration of ``PyBuffer_FillInfo()`` and some missing bits in
836 ``libc.math``.
838 * Heap allocated subtypes of ``type`` used the wrong base type struct at the
839 C level.
7826127 @scoder changelog
scoder authored
841 * Calling the unbound method dict.keys/value/items() in dict subtypes could
842 call the bound object method instead of the unbound supertype method.
e3ef526 @scoder changelog
scoder authored
844 * "yield" wasn't supported in "return" value expressions.
846 * Using the "bint" type in memory views lead to unexpected results.
847 It is now an error.
849 * Assignments to global/closure variables could catch them in an illegal state
850 while deallocating the old value.
7826127 @scoder changelog
scoder authored
852 Other changes
853 -------------
8f07f8d @scoder fix release date
scoder authored
856 0.19.1 (2013-05-11)
5045a86 @scoder changelog
scoder authored
857 ===================
859 Features added
860 --------------
be0303a @scoder changelog
scoder authored
862 * Completely empty C-API structs for extension type slots (protocols like
573ab07 @scoder remove credits, as requested
scoder authored
863 number/mapping/sequence) are no longer generated into the C code.
be0303a @scoder changelog
scoder authored
439f97c @scoder changelog
scoder authored
865 * Docstrings that directly follow a public/readonly attribute declaration
866 in a cdef class will be used as docstring of the auto-generated property.
573ab07 @scoder remove credits, as requested
scoder authored
867 This fixes ticket 206.
439f97c @scoder changelog
scoder authored
869 * The automatic signature documentation tries to preserve more semantics
870 of default arguments and argument types. Specifically, ``bint`` arguments
573ab07 @scoder remove credits, as requested
scoder authored
871 now appear as type ``bool``.
439f97c @scoder changelog
scoder authored
5045a86 @scoder changelog
scoder authored
873 * A warning is emitted when negative literal indices are found inside of
874 a code section that disables ``wraparound`` handling. This helps with
875 fixing invalid code that might fail in the face of future compiler
876 optimisations.
878 * Constant folding for boolean expressions (and/or) was improved.
9124416 @robertwb Update release notes.
robertwb authored
880 * Added a build_dir option to cythonize() which allows one to place
881 the generated .c files outside the source tree.
5045a86 @scoder changelog
scoder authored
883 Bugs fixed
884 ----------
4dde32b @scoder changelog
scoder authored
886 * ``isinstance(X, type)`` failed to get optimised into a call to
887 ``PyType_Check()``, as done for other builtin types.
07101f9 @scoder changelog
scoder authored
889 * A spurious ``from datetime cimport *`` was removed from the "cpython"
c500e85 @scoder remove 'from datetime cimport *' line from cpython/__init__.pxd as it…
scoder authored
890 declaration package. This means that the "datetime" declarations
891 (added in 0.19) are no longer available directly from the "cpython"
892 namespace, but only from "cpython.datetime". This is the correct
893 way of doing it because the declarations refer to a standard library
894 module, not the core CPython C-API itself.
1491df8 @scoder changelog
scoder authored
896 * The C code for extension types is now generated in topological order
897 instead of source code order to avoid C compiler errors about missing
898 declarations for subtypes that are defined before their parent.
3078752 @scoder changelog
scoder authored
900 * The ``memoryview`` type name no longer shows up in the module dict of
901 modules that use memory views. This fixes trac ticket 775.
b87e6f8 @scoder changelog
scoder authored
903 * Regression in 0.19 that rejected valid C expressions from being used
904 in C array size declarations.
5045a86 @scoder changelog
scoder authored
906 * In C++ mode, the C99-only keyword ``restrict`` could accidentally be
907 seen by the GNU C++ compiler. It is now specially handled for both
908 GCC and MSVC.
910 * Testing large (> int) C integer values for their truth value could fail
911 due to integer wrap-around.
913 Other changes
914 -------------
928d638 @scoder prepare release of 0.19
scoder authored
917 0.19 (2013-04-19)
a62cbf3 @scoder changelog
scoder authored
918 =================
920 Features added
921 --------------
6ce7dbd @scoder changelog
scoder authored
923 * New directives ``c_string_type`` and ``c_string_encoding`` to more easily
924 and automatically convert between C strings and the different Python string
925 types.
b1f10fa @scoder enable Py_TPFLAGS_HAVE_VERSION_TAG on extension types by default (als…
scoder authored
927 * The extension type flag ``Py_TPFLAGS_HAVE_VERSION_TAG`` is enabled by default
928 on extension types and can be disabled using the ``type_version_tag`` compiler
929 directive.
e2a07e8 @scoder implement experimental support for line tracing
scoder authored
931 * EXPERIMENTAL support for simple Cython code level line tracing. Enabled by
932 the "linetrace" compiler directive.
717df79 @scoder implement __annotations__ attribute on CyFunction (PEP 3107)
scoder authored
934 * Cython implemented functions make their argument and return type annotations
935 available through the ``__annotations__`` attribute (PEP 3107).
fca7932 @scoder changelog
scoder authored
937 * Access to non-cdef module globals and Python object attributes is faster.
939 * ``Py_UNICODE*`` coerces from and to Python unicode strings. This is
940 helpful when talking to Windows APIs, which use compatible wchar_t
941 arrays for strings. Note that the ``Py_UNICODE`` type is otherwise
942 deprecated as of CPython 3.3.
2473582 @scoder optimise isinstance(obj, basestring) and map basestring to unicode in…
scoder authored
944 * ``isinstance(obj, basestring)`` is optimised. In Python 3 it only tests
945 for instances of ``str`` (i.e. Py2 ``unicode``).
947 * The ``basestring`` builtin is mapped to ``str`` (i.e. Py2 ``unicode``) when
948 compiling the generated C code under Python 3.
e8bd178 @scoder changelog
scoder authored
950 * Closures use freelists, which can speed up their creation quite substantially.
951 This is also visible for short running generator expressions, for example.
7f524da @scoder changelog
scoder authored
953 * A new class decorator ``@cython.freelist(N)`` creates a static freelist of N
954 instances for an extension type, thus avoiding the costly allocation step if
955 possible. This can speed up object instantiation by 20-30% in suitable
0322f85 @scoder changelog
scoder authored
956 scenarios. Note that freelists are currently only supported for base types,
957 not for types that inherit from others.
7f524da @scoder changelog
scoder authored
2289101 @scoder changelog
scoder authored
959 * Fast extension type instantiation using the ``Type.__new__(Type)`` idiom has
960 gained support for passing arguments. It is also a bit faster for types defined
961 inside of the module.
6a02869 @scoder automatically convert dict.iter*() and dict.view*() methods to .keys/…
scoder authored
963 * The Python2-only dict methods ``.iter*()`` and ``.view*()`` (requires Python 2.7)
964 are automatically mapped to the equivalent keys/values/items methods in Python 3
965 for typed dictionaries.
d2ac07b @scoder changelog
scoder authored
967 * Slicing unicode strings, lists and tuples is faster.
f0df11b @scoder changelog
scoder authored
bddb52a @scoder changelog
scoder authored
969 * list.append() is faster on average.
27b20d1 @scoder changelog
scoder authored
971 * ``raise Exception() from None`` suppresses the exception context in Py3.3.
862249f @scoder changelog
scoder authored
973 * Py3 compatible ``exec(tuple)`` syntax is supported in Py2 code.
a62cbf3 @scoder changelog
scoder authored
975 * Keyword arguments are supported for cdef functions.
6ce7dbd @scoder changelog
scoder authored
977 * External C++ classes can be declared nogil. Patch by John Stumpo. This fixes
978 trac ticket 805.
0ec2ff4 @robertwb Docs for c_string_type and c_string_encoding
robertwb authored
a62cbf3 @scoder changelog
scoder authored
980 Bugs fixed
981 ----------
0105dd2 @scoder changelog
scoder authored
983 * 2-value slicing of unknown objects passes the correct slice when the ``getitem``
984 protocol is used instead of the ``getslice`` protocol (especially in Python 3),
985 i.e. ``None`` values for missing bounds instead of ``[0,maxsize]``. It is also
986 a bit faster in some cases, e.g. for constant bounds. This fixes trac ticket 636.
b108bdb @scoder changelog
scoder authored
988 * Cascaded assignments of None values to extension type variables failed with
989 a ``TypeError`` at runtime.
ea569ef @scoder implement __kwdefaults__ for CyFunction
scoder authored
991 * The ``__defaults__`` attribute was not writable for Cython implemented
992 functions.
994 * Default values of keyword-only arguments showed up in ``__defaults__`` instead
995 of ``__kwdefaults__`` (which was not implemented). Both are available for
996 Cython implemented functions now, as specified in Python 3.x.
187e8c5 @scoder changelog
scoder authored
998 * ``yield`` works inside of ``with gil`` sections. It previously lead to a crash.
999 This fixes trac ticket 803.
1001 * Static methods without explicitly named positional arguments (e.g. having only
1002 ``*args``) crashed when being called. This fixes trac ticket 804.
ea881aa @scoder changelog
scoder authored
1004 * ``dir()`` without arguments previously returned an unsorted list, which now
1005 gets sorted as expected.
8010815 @scoder changelog
scoder authored
1007 * ``dict.items()``, ``dict.keys()`` and ``dict.values()`` no longer return lists
1008 in Python 3.
862249f @scoder changelog
scoder authored
1010 * Exiting from an ``except-as`` clause now deletes the exception in Python 3 mode.
a62cbf3 @scoder changelog
scoder authored
1012 * The declarations of ``frexp()`` and ``ldexp()`` in ``math.pxd`` were incorrect.
1014 Other changes
1015 -------------
afbd83a @scoder prepare release of 0.18
scoder authored
1018 0.18 (2013-01-28)
1019 =================
a0778c1 @scoder added 0.18 section to changelog
scoder authored
1021 Features added
1022 --------------
2a9d8d4 @scoder implement \N{...} Unicode escapes for literals
scoder authored
1024 * Named Unicode escapes ("\N{...}") are supported.
7a91570 @scoder implement __qualname__ special attribute on Python functions/classes …
scoder authored
1026 * Python functions/classes provide the special attribute "__qualname__"
1027 as defined by PEP 3155.
cc788b9 @robertwb More overflowcheck documentation.
robertwb authored
1029 * Added a directive ``overflowcheck`` which raises an OverflowException when
1030 arithmetic with C ints overflow. This has a modest performance penalty, but
1031 is much faster than using Python ints.
8b3c9a3 @scoder changelog
scoder authored
1033 * Calls to nested Python functions are resolved at compile time.
1035 * Type inference works across nested functions.
1a58859 @scoder optimise bytes.decode()
scoder authored
1037 * ``py_bytes_string.decode(...)`` is optimised.
939f8f8 @scoder changelog
scoder authored
1039 * C ``const`` declarations are supported in the language.
a0778c1 @scoder added 0.18 section to changelog
scoder authored
1041 Bugs fixed
1042 ----------
3eedf16 @scoder changelog
scoder authored
1044 * Automatic C++ exception mapping didn't work in nogil functions (only in
1045 "with nogil" blocks).
a0778c1 @scoder added 0.18 section to changelog
scoder authored
1047 Other changes
1048 -------------
53db1cd @robertwb Prep for 0.17.4 release.
robertwb authored
1051 0.17.4 (2013-01-03)
1052 ===================
1054 Bugs fixed
1055 ----------
1057 * Garbage collection triggered during deallocation of container classes could lead to a double-deallocation.
1da2e2f @scoder prepare release of 0.17.3
scoder authored
1060 0.17.3 (2012-12-14)
4e3445d @scoder changelog
scoder authored
1061 ===================
1063 Features added
1064 --------------
1066 Bugs fixed
1067 ----------
8541d7b @scoder fix crash bug during final cleanup for cimported base types
scoder authored
1069 * During final interpreter cleanup (with types cleanup enabled at compile time), extension types that inherit from base types over more than one level that were cimported from other modules could lead to a crash.
1dc512a @scoder changelog
scoder authored
1071 * Weak-reference support in extension types (with a ``cdef __weakref__`` attribute) generated incorrect deallocation code.
19c2e5a @scoder changelog fix
scoder authored
1073 * In CPython 3.3, converting a Unicode character to the Py_UNICODE type could fail to raise an overflow for non-BMP characters that do not fit into a wchar_t on the current platform.
4e3445d @scoder changelog
scoder authored
1075 * Negative C integer constants lost their longness suffix in the generated C code.
1077 Other changes
1078 -------------
10183d6 @scoder prepare release of 0.17.2
scoder authored
1081 0.17.2 (2012-11-20)
977c15c @scoder added changelog file
scoder authored
1082 ===================
1084 Features added
1085 --------------
1087 * ``cythonize()`` gained a best effort compile mode that can be used to simply ignore .py files that fail to compile.
1089 Bugs fixed
1090 ----------
10183d6 @scoder prepare release of 0.17.2
scoder authored
1092 * Replacing an object reference with the value of one of its cdef attributes could generate incorrect C code that accessed the object after deleting its last reference.
f2ef0f5 @scoder changelog
scoder authored
1094 * C-to-Python type coercions during cascaded comparisons could generate invalid C code, specifically when using the 'in' operator.
24cdbff @scoder make the parser correctly understand obj[1,] as passing a tuple as key
scoder authored
1096 * "obj[1,]" passed a single integer into the item getter instead of a tuple.
977c15c @scoder added changelog file
scoder authored
1098 * Cyclic imports at module init time did not work in Py3.
1100 * The names of C++ destructors for template classes were built incorrectly.
1102 * In pure mode, type casts in Cython syntax and the C ampersand operator are now rejected. Use the pure mode replacements instead.
1104 * In pure mode, C type names and the sizeof() function are no longer recognised as such and can be used as normal Python names.
1106 * The extended C level support for the CPython array type was declared too late to be used by user defined classes.
1108 * C++ class nesting was broken.
402dc50 @robertwb Fix compiler crash for invalid C++ base classes.
robertwb authored
1110 * Better checking for required nullary constructors for stack-allocated C++ instances.
1112 * Remove module docstring in no-docstring mode.
1114 * Fix specialization for varargs function signatures.
1116 * Fix several compiler crashes.
977c15c @scoder added changelog file
scoder authored
1118 Other changes
1119 -------------
4de2055 @scoder changelog comment
scoder authored
1121 * An experimental distutils script for compiling the CPython standard library was added as Tools/
977c15c @scoder added changelog file
scoder authored
1124 0.17.1 (2012-09-26)
1125 ===================
1127 Features added
1128 --------------
1130 Bugs fixed
1131 ----------
1133 * A reference leak was fixed in the new dict iteration code when the loop target was not a plain variable but an unpacked tuple.
1135 * Memory views did not handle the special case of a NULL buffer strides value, as allowed by PEP3118.
1137 Other changes
1138 -------------
1141 0.17 (2012-09-01)
1142 =================
1144 Features added
1145 --------------
31215ed @scoder minor changelog cleanups
scoder authored
1147 * Alpha quality support for compiling and running Cython generated extension modules in PyPy (through cpyext). Note that this requires at least PyPy 1.9 and in many cases also adaptations in user code, especially to avoid borrowed references when no owned reference is being held directly in C space (a reference in a Python list or dict is not enough, for example). See the documentation on porting Cython code to PyPy.
977c15c @scoder added changelog file
scoder authored
1149 * "yield from" is supported (PEP 380) and a couple of minor problems with generators were fixed.
31215ed @scoder minor changelog cleanups
scoder authored
1151 * C++ STL container classes automatically coerce from and to the equivalent Python container types on typed assignments and casts. Note that the data in the containers is copied during this conversion.
977c15c @scoder added changelog file
scoder authored
31215ed @scoder minor changelog cleanups
scoder authored
1153 * C++ iterators can now be iterated over using "for x in cpp_container" whenever cpp_container has begin() and end() methods returning objects satisfying the iterator pattern (that is, it can be incremented, dereferenced, and compared (for non-equality)).
977c15c @scoder added changelog file
scoder authored
1155 * cdef classes can now have C++ class members (provided a zero-argument constructor exists)
1157 * A new cpython.array standard cimport file allows to efficiently talk to the stdlib array.array data type in Python 2. Since CPython does not export an official C-API for this module, it receives special casing by the compiler in order to avoid setup overhead on user side. In Python 3, both buffers and memory views on the array type already worked out of the box with earlier versions of Cython due to the native support for the buffer interface in the Py3 array module.
1159 * Fast dict iteration is now enabled optimistically also for untyped variables when the common iteration methods are used.
1161 * The unicode string processing code was adapted for the upcoming CPython 3.3 (PEP 393, new Unicode buffer layout).
1163 * Buffer arguments and memory view arguments in Python functions can be declared "not None" to raise a TypeError on None input.
1165 * c(p)def functions in pure mode can specify their return type with "@cython.returns()".
1167 * Automatic dispatch for fused functions with memoryview arguments
1169 * Support newaxis indexing for memoryviews
1171 * Support decorators for fused functions
1173 Bugs fixed
1174 ----------
1176 * Old-style Py2 imports did not work reliably in Python 3.x and were broken in Python 3.3. Regardless of this fix, it's generally best to be explicit about relative and global imports in Cython code because old-style imports have a higher overhead. To this end, "from __future__ import absolute_import" is supported in Python/Cython 2.x code now (previous versions of Cython already used it when compiling Python 3 code).
31215ed @scoder minor changelog cleanups
scoder authored
1178 * Stricter constraints on the "inline" and "final" modifiers. If your code does not compile due to this change, chances are these modifiers were previously being ignored by the compiler and can be removed without any performance regression.
977c15c @scoder added changelog file
scoder authored
1180 * Exceptions are always instantiated while raising them (as in Python), instead of risking to instantiate them in potentially unsafe situations when they need to be handled or otherwise processed.
1182 * locals() properly ignores names that do not have Python compatible types (including automatically inferred types).
1184 * Some garbage collection issues of memory views were fixed.
1186 * numpy.pxd compiles in Python 3 mode.
1188 * Several C compiler warnings were fixed.
1190 * Several bugs related to memoryviews and fused types were fixed.
1192 * Several bug-fixes and improvements related to cythonize(), including ccache-style caching.
1194 Other changes
1195 -------------
1197 * libc.string provides a convenience declaration for const uchar in addition to const char.
1199 * User declared char* types are now recognised as such and auto-coerce to and from Python bytes strings.
1201 * callable() and next() compile to more efficient C code.
1203 * list.append() is faster on average.
1205 * Modules generated by @cython.inline() are written into the directory pointed to by the environment variable CYTHON_CACHE_DIR if set.
1208 0.16 (2012-04-21)
1209 =================
1211 Features added
1212 --------------
1214 * Enhancements to Cython's function type (support for weak references, default arguments, code objects, dynamic attributes, classmethods, staticmethods, and more)
1216 * Fused Types - Template-like support for functions and methods CEP 522 (docs)
1218 * Typed views on memory - Support for efficient direct and indirect buffers (indexing, slicing, transposing, ...) CEP 517 (docs)
1220 * super() without arguments
1222 * Final cdef methods (which translate into direct calls on known instances)
1224 Bugs fixed
1225 ----------
1227 * fix alignment handling for record types in buffer support
1229 Other changes
1230 -------------
1232 * support default arguments for closures
1234 * search sys.path for pxd files
1236 * support C++ template casting
1238 * faster traceback building and faster generator termination
1240 * support inplace operators on indexed buffers
1242 * allow nested prange sections
1245 0.15.1 (2011-09-19)
1246 ===================
1248 Features added
1249 --------------
1251 Bugs fixed
1252 ----------
1254 Other changes
1255 -------------
1258 0.15 (2011-08-05)
1259 =================
1261 Features added
1262 --------------
1264 * Generators (yield) - Cython has full support for generators, generator expressions and PEP 342 coroutines.
1266 * The nonlocal keyword is supported.
1268 * Re-acquiring the gil: with gil - works as expected within a nogil context.
1270 * OpenMP support: prange.
1272 * Control flow analysis prunes dead code and emits warnings and errors about uninitialised variables.
1274 * Debugger command cy set to assign values of expressions to Cython variables and cy exec counterpart $cy_eval().
1276 * Exception chaining PEP 3134.
1278 * Relative imports PEP 328.
1280 * Improved pure syntax including cython.cclass, cython.cfunc, and cython.ccall.
1282 * The with statement has its own dedicated and faster C implementation.
1284 * Support for del.
1286 * Boundschecking directives implemented for builtin Python sequence types.
1288 * Several updates and additions to the shipped standard library .pxd files.
1290 * Forward declaration of types is no longer required for circular references.
1292 Bugs fixed
1293 ----------
1295 Other changes
1296 -------------
1298 * Uninitialized variables are no longer initialized to None and accessing them has the same semantics as standard Python.
1300 * 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
1302 * 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.
1304 * 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.
1307 0.14.1 (2011-02-04)
1308 ===================
1310 Features added
1311 --------------
1313 * The gdb debugging support was extended to include all major Cython features, including closures.
1315 * raise MemoryError() is now safe to use as Cython replaces it with the correct C-API call.
1317 Bugs fixed
1318 ----------
1320 Other changes
1321 -------------
1323 * Decorators on special methods of cdef classes now raise a compile time error rather than being ignored.
1325 * In Python 3 language level mode (-3 option), the 'str' type is now mapped to 'unicode', so that cdef str s declares a Unicode string even when running in Python 2.
1328 0.14 (2010-12-14)
1329 =================
1331 Features added
1332 --------------
1334 * Python classes can now be nested and receive a proper closure at definition time.
1336 * Redefinition is supported for Python functions, even within the same scope.
1338 * Lambda expressions are supported in class bodies and at the module level.
1340 * Metaclasses are supported for Python classes, both in Python 2 and Python 3 syntax. The Python 3 syntax (using a keyword argument in the type declaration) is preferred and optimised at compile time.
1342 * "final" extension classes prevent inheritance in Python space. This feature is available through the new "" decorator. In the future, these classes may receive further optimisations.
1344 * "internal" extension classes do not show up in the module dictionary. This feature is available through the new "cython.internal" decorator.
1346 * Extension type inheritance from builtin types, such as "cdef class MyUnicode(unicode)", now works without further external type redeclarations (which are also strongly discouraged now and continue to issue a warning).
1348 * GDB support.
1350 * A new build system with support for inline distutils directives, correct dependency tracking, and parallel compilation.
1352 * Support for dynamic compilation at runtime via the new cython.inline function and cython.compile decorator.
1354 * "nogil" blocks are supported when compiling pure Python code by writing "with cython.nogil".
1356 * Iterating over arbitrary pointer types is now supported, as is an optimized version of the in operator, e.g. x in ptr[a:b].
1358 Bugs fixed
1359 ----------
1361 * In parallel assignments, the right side was evaluated in reverse order in 0.13. This could result in errors if it had side effects (e.g. function calls).
1363 * In some cases, methods of builtin types would raise a SystemError instead of an AttributeError when called on None.
1365 Other changes
1366 -------------
1368 * Constant tuples are now cached over the lifetime of an extension module, just like CPython does. Constant argument tuples of Python function calls are also cached.
1370 * Closures have tightened to include exactly the names used in the inner functions and classes. Previously, they held the complete locals of the defining function.
1372 * The builtin "next()" function in Python 2.6 and later is now implemented internally and therefore available in all Python versions. This makes it the preferred and portable way of manually advancing an iterator.
1374 * In addition to the previously supported inlined generator expressions in 0.13, "sorted(genexpr)" can now be used as well. Typing issues were fixed in "sum(genexpr)" that could lead to invalid C code being generated. Other known issues with inlined generator expressions were also fixed that make upgrading to 0.14 a strong recommendation for code that uses them. Note that general generators and generator expressions continue to be not supported.
1376 * Inplace arithmetic operators now respect the cdivision directive and are supported for complex types.
1378 * Typing a variable as type "complex" previously gave it the Python object type. It now uses the appropriate C/C++ double complex type. A side-effect is that assignments and typed function parameters now accept anything that Python can coerce to a complex, including integers and floats, and not only complex instances.
1380 * Large integer literals pass through the compiler in a safer way. To prevent truncation in C code, non 32-bit literals are turned into Python objects if not used in a C context. This context can either be given by a clear C literal suffix such as "UL" or "LL" (or "L" in Python 3 code), or it can be an assignment to a typed variable or a typed function argument, in which case it is up to the user to take care of a sufficiently large value space of the target.
1382 * Python functions are declared in the order they appear in the file, rather than all being created at module creation time. This is consistent with Python and needed to support, for example, conditional or repeated declarations of functions. In the face of circular imports this may cause code to break, so a new --disable-function-redefinition flag was added to revert to the old behavior. This flag will be removed in a future release, so should only be used as a stopgap until old code can be fixed.
1385 0.13 (2010-08-25)
1386 =================
1388 Features added
1389 --------------
1391 * Closures are fully supported for Python functions. Cython supports inner functions and lambda expressions. Generators and generator expressions are not supported in this release.
1393 * Proper C++ support. Cython knows about C++ classes, templates and overloaded function signatures, so that Cython code can interact with them in a straight forward way.
1395 * Type inference is enabled by default for safe C types (e.g. double, bint, C++ classes) and known extension types. This reduces the need for explicit type declarations and can improve the performance of untyped code in some cases. There is also a verbose compile mode for testing the impact on user code.
1397 * Cython's for-in-loop can iterate over C arrays and sliced pointers. The type of the loop variable will be inferred automatically in this case.
1399 * The Py_UNICODE integer type for Unicode code points is fully supported, including for-loops and 'in' tests on unicode strings. It coerces from and to single character unicode strings. Note that untyped for-loop variables will automatically be inferred as Py_UNICODE when iterating over a unicode string. In most cases, this will be much more efficient than yielding sliced string objects, but can also have a negative performance impact when the variable is used in a Python context multiple times, so that it needs to coerce to a unicode string object more than once. If this happens, typing the loop variable as unicode or object will help.
1401 * The built-in functions any(), all(), sum(), list(), set() and dict() are inlined as plain for loops when called on generator expressions. Note that generator expressions are not generally supported apart from this feature. Also, tuple(genexpr) is not currently supported - use tuple([listcomp]) instead.
1403 * More shipped standard library declarations. The python_* and stdlib/stdio .pxd files have been deprecated in favor of clib.* and cpython[.*] and may get removed in a future release.
1405 * Pure Python mode no longer disallows non-Python keywords like 'cdef', 'include' or 'cimport'. It also no longer recognises syntax extensions like the for-from loop.
1407 * Parsing has improved for Python 3 syntax in Python code, although not all features are correctly supported. The missing Python 3 features are being worked on for the next release.
1409 * from __future__ import print_function is supported in Python 2.6 and later. Note that there is currently no emulation for earlier Python versions, so code that uses print() with this future import will require at least Python 2.6.
1411 * New compiler directive language_level (valid values: 2 or 3) with corresponding command line options -2 and -3 requests source code compatibility with Python 2.x or Python 3.x respectively. Language level 3 currently enforces unicode literals for unprefixed string literals, enables the print function (requires Python 2.6 or later) and keeps loop variables in list comprehensions from leaking.
1413 * Loop variables in set/dict comprehensions no longer leak into the surrounding scope (following Python 2.7). List comprehensions are unchanged in language level 2.
1415 * print >> stream
1417 Bugs fixed
1418 ----------
1420 Other changes
1421 -------------
1423 * The availability of type inference by default means that Cython will also infer the type of pointers on assignments. Previously, code like this::
1425 cdef char* s = ...
1426 untyped_variable = s
1428 would convert the char* to a Python bytes string and assign that. This is no longer the case and no coercion will happen in the example above. The correct way of doing this is through an explicit cast or by typing the target variable, i.e.
1430 ::
1432 cdef char* s = ...
1433 untyped_variable1 = <bytes>s
1434 untyped_variable2 = <object>s
1436 cdef object py_object = s
1437 cdef bytes bytes_string = s
1439 * bool is no longer a valid type name by default. The problem is that it's not clear whether bool should refer to the Python type or the C++ type, and expecting one and finding the other has already led to several hard-to-find bugs. Both types are available for importing: you can use from cpython cimport bool for the Python bool type, and from libcpp cimport bool for the C++ type. bool is still a valid object by default, so one can still write bool(x).
1441 * ``__getsegcount__`` is now correctly typed to take a ``Py_size_t*`` rather than an ``int*``.
1444 0.12.1 (2010-02-02)
1445 ===================
1447 Features added
1448 --------------
1450 * Type inference improvements.
1452 * There have been several bug fixes and improvements to the type inferencer.
1454 * Notably, there is now a "safe" mode enabled by setting the infer_types directive to None. (The None here refers to the "default" mode, which will be the default in 0.13.) This safe mode limits inference to Python object types and C doubles, which should speed up execution without affecting any semantics such as integer overflow behavior like infer_types=True might. There is also an infer_types.verbose option which allows one to see what types are inferred.
1456 * The boundscheck directive works for lists and tuples as well as buffers.
1458 * len(s) and s.decode("encoding") are efficiently supported for char* s.
1460 * Cython's INLINE macro has been renamed to CYTHON_INLINE to reduce conflict and has better support for the MSVC compiler on Windows. It is no longer clobbered if externally defined.
1462 * Revision history is now omitted from the source package, resulting in a 85% size reduction. Running make repo will download the history and turn the directory into a complete Mercurial working repository.
1464 * Cython modules don't need to be recompiled when the size of an external type grows. (A warning, rather than an error, is produced.) This should be helpful for binary distributions relying on NumPy.
1466 Bugs fixed
1467 ----------
1469 * Several other bugs and minor improvements have been made. This release should be fully backwards compatible with 0.12.
1471 Other changes
1472 -------------
1475 0.12 (2009-11-23)
1476 =================
1478 Features added
1479 --------------
1481 * Type inference with the infer_types directive
1483 * Seamless C++ complex support
1485 * Fast extension type instantiation using the normal Python meme obj = MyType.__new__(MyType)
1487 * Improved support for Py3.1
1489 * Cython now runs under Python 3.x using the 2to3 tool
1491 * unittest support for doctests in Cython modules
1493 * Optimised handling of C strings (char*): for c in cstring[2:50] and cstring.decode()
1495 * Looping over c pointers: for i in intptr[:50].
1497 * pyximport improvements
1499 * cython_freeze improvements
1501 Bugs fixed
1502 ----------
1504 * Many bug fixes
1506 Other changes
1507 -------------
1509 * Many other optimisation, e.g. enumerate() loops, parallel swap assignments (a,b = b,a), and unicode.encode()
1511 * More complete numpy.pxd
1514 0.11.2 (2009-05-20)
1515 ===================
1517 Features added
1518 --------------
1520 * There's now native complex floating point support! C99 complex will be used if complex.h is included, otherwise explicit complex arithmetic working on all C compilers is used. [Robert Bradshaw]
1522 ::
1524 cdef double complex a = 1 + 0.3j
1525 cdef np.ndarray[np.complex128_t, ndim=2] arr = \
1526 np.zeros(10, np.complex128)
1528 * Cython can now generate a main()-method for embedding of the Python interpreter into an executable (see #289) [Robert Bradshaw]
1530 * @wraparound directive (another way to disable arr[idx] for negative idx) [Dag Sverre Seljebotn]
1532 * Correct support for NumPy record dtypes with different alignments, and "cdef packed struct" support [Dag Sverre Seljebotn]
1534 * @callspec directive, allowing custom calling convention macros [Lisandro Dalcin]
1536 Bugs fixed
1537 ----------
1539 Other changes
1540 -------------
1542 * Bug fixes and smaller improvements. For the full list, see [1].
Something went wrong with that request. Please try again.