Mon Jan 27 19:44:24 2014 UTC ()
Update to 0.20:

0.20 (??)
===================

Features added
--------------

* Support for CPython 3.4.

* Support for calling C++ template functions.

* ``yield`` is supported in ``finally`` clauses.

* The C code generated for finally blocks is duplicated for each exit
  case to allow for better optimisations by the C compiler.

* Cython tries to undo the Python optimisationism of assigning a bound
  method to a local variable when it can generate better code for the
  direct call.

* Constant Python float values are cached.

* String equality comparisons can use faster type specific code in
  more cases than before.

* String/Unicode formatting using the '%' operator uses a faster
  C-API call.

* ``bytearray`` has become a known type and supports coercion from and
  to C strings.  Indexing, slicing and decoding is optimised. Note that
  this may have an impact on existing code due to type inference.

* Using ``cdef basestring stringvar`` and function arguments typed as
  ``basestring`` is now meaningful and allows assigning exactly
  ``str`` and ``unicode`` objects, but no subtypes of these types.

* Support for the ``__debug__`` builtin.

* Assertions in Cython compiled modules are disabled if the running
  Python interpreter was started with the "-O" option.

* Some types that Cython provides internally, such as functions and
  generators, are now shared across modules if more than one Cython
  implemented module is imported.

* The type inference algorithm works more fine granular by taking the
  results of the control flow analysis into account.

* A new script in ``bin/cythonize`` provides a command line frontend
  to the cythonize() compilation function (including distutils build).

* The new extension type decorator ``@cython.no_gc_clear`` prevents
  objects from being cleared during cyclic garbage collection, thus
  making sure that object attributes are kept alive until deallocation.

* During cyclic garbage collection, attributes of extension types that
  cannot create reference cycles due to their type (e.g. strings) are
  no longer considered for traversal or clearing.  This can reduce the
  processing overhead when searching for or cleaning up reference cycles.

* Package compilation (i.e. ``__init__.py`` files) now works, starting
  with Python 3.3.

* The cython-mode.el script for Emacs was updated.  Patch by Ivan Andrus.

* An option common_utility_include_dir was added to cythonize() to save
  oft-used utility code once in a separate directory rather than as
  part of each generated file.

* ``unraisable_tracebacks`` directive added to control printing of
  tracebacks of unraisable exceptions.

Bugs fixed
----------

* Abstract Python classes that subtyped a Cython extension type
  failed to raise an exception on instantiation, and thus ended
  up being instantiated.

* ``set.add(a_tuple)`` and ``set.discard(a_tuple)`` failed with a
  TypeError in Py2.4.

* The PEP 3155 ``__qualname__`` was incorrect for nested classes and
  inner classes/functions declared as ``global``.

* Several corner cases in the try-finally statement were fixed.

* The metaclass of a Python class was not inherited from its parent
  class(es).  It is now extracted from the list of base classes if not
  provided explicitly using the Py3 ``metaclass`` keyword argument.
  In Py2 compilation mode, a ``__metaclass__`` entry in the class
  dict will still take precedence if not using Py3 metaclass syntax,
  but only *after* creating the class dict (which may have been done
  by a metaclass of a base class, see PEP 3115).  It is generally
  recommended to use the explicit Py3 syntax to define metaclasses
  for Python types at compile time.

* The automatic C switch statement generation behaves more safely for
  heterogeneous value types (e.g. mixing enum and char), allowing for
  a slightly wider application and reducing corner cases.  It now always
  generates a 'default' clause to avoid C compiler warnings about
  unmatched enum values.

* Fixed a bug where class hierarchies declared out-of-order could result
  in broken generated code.

* Fixed a bug which prevented overriding const methods of C++ classes.

* Fixed a crash when converting Python objects to C++ strings fails.

Other changes
-------------

* In Py3 compilation mode, Python2-style metaclasses declared by a
  ``__metaclass__`` class dict entry are ignored.

* In Py3.4+, the Cython generator type uses ``tp_finalize()`` for safer
  cleanup instead of ``tp_del()``.


(wiz)
diff -r1.17 -r1.18 pkgsrc/devel/py-cython/Makefile
diff -r1.10 -r1.11 pkgsrc/devel/py-cython/PLIST
diff -r1.10 -r1.11 pkgsrc/devel/py-cython/distinfo

cvs diff -r1.17 -r1.18 pkgsrc/devel/py-cython/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/py-cython/Makefile 2014/01/25 10:30:03 1.17
+++ pkgsrc/devel/py-cython/Makefile 2014/01/27 19:44:24 1.18
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.17 2014/01/25 10:30:03 wiz Exp $ 1# $NetBSD: Makefile,v 1.18 2014/01/27 19:44:24 wiz Exp $
2 2
3DISTNAME= Cython-0.19.2 3DISTNAME= Cython-0.20
4PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/Cy/cy/} 4PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/Cy/cy/}
5CATEGORIES= lang python 5CATEGORIES= lang python
6MASTER_SITES= http://cython.org/release/ 6MASTER_SITES= http://cython.org/release/
7 7
8MAINTAINER= jihbed.research@gmail.com 8MAINTAINER= jihbed.research@gmail.com
9HOMEPAGE= http://cython.org/ 9HOMEPAGE= http://cython.org/
10COMMENT= C-Extensions for Python 10COMMENT= C-Extensions for Python
11LICENSE= apache-1.1 11LICENSE= apache-1.1
12 12
13USE_LANGUAGES= c 13USE_LANGUAGES= c
14PYDISTUTILSPKG= yes 14PYDISTUTILSPKG= yes
15 15
16PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX} 16PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}

cvs diff -r1.10 -r1.11 pkgsrc/devel/py-cython/PLIST (expand / switch to unified diff)

--- pkgsrc/devel/py-cython/PLIST 2013/05/05 20:47:29 1.10
+++ pkgsrc/devel/py-cython/PLIST 2014/01/27 19:44:24 1.11
@@ -1,19 +1,22 @@ @@ -1,19 +1,22 @@
1@comment $NetBSD: PLIST,v 1.10 2013/05/05 20:47:29 wiz Exp $ 1@comment $NetBSD: PLIST,v 1.11 2014/01/27 19:44:24 wiz Exp $
2bin/cygdb${PYVERSSUFFIX} 2bin/cygdb${PYVERSSUFFIX}
3bin/cython${PYVERSSUFFIX} 3bin/cython${PYVERSSUFFIX}
4${PYSITELIB}/Cython/Build/BuildExecutable.py 4${PYSITELIB}/Cython/Build/BuildExecutable.py
5${PYSITELIB}/Cython/Build/BuildExecutable.pyc 5${PYSITELIB}/Cython/Build/BuildExecutable.pyc
6${PYSITELIB}/Cython/Build/BuildExecutable.pyo 6${PYSITELIB}/Cython/Build/BuildExecutable.pyo
 7${PYSITELIB}/Cython/Build/Cythonize.py
 8${PYSITELIB}/Cython/Build/Cythonize.pyc
 9${PYSITELIB}/Cython/Build/Cythonize.pyo
7${PYSITELIB}/Cython/Build/Dependencies.py 10${PYSITELIB}/Cython/Build/Dependencies.py
8${PYSITELIB}/Cython/Build/Dependencies.pyc 11${PYSITELIB}/Cython/Build/Dependencies.pyc
9${PYSITELIB}/Cython/Build/Dependencies.pyo 12${PYSITELIB}/Cython/Build/Dependencies.pyo
10${PYSITELIB}/Cython/Build/Inline.py 13${PYSITELIB}/Cython/Build/Inline.py
11${PYSITELIB}/Cython/Build/Inline.pyc 14${PYSITELIB}/Cython/Build/Inline.pyc
12${PYSITELIB}/Cython/Build/Inline.pyo 15${PYSITELIB}/Cython/Build/Inline.pyo
13${PYSITELIB}/Cython/Build/Tests/TestInline.py 16${PYSITELIB}/Cython/Build/Tests/TestInline.py
14${PYSITELIB}/Cython/Build/Tests/TestInline.pyc 17${PYSITELIB}/Cython/Build/Tests/TestInline.pyc
15${PYSITELIB}/Cython/Build/Tests/TestInline.pyo 18${PYSITELIB}/Cython/Build/Tests/TestInline.pyo
16${PYSITELIB}/Cython/Build/Tests/TestStripLiterals.py 19${PYSITELIB}/Cython/Build/Tests/TestStripLiterals.py
17${PYSITELIB}/Cython/Build/Tests/TestStripLiterals.pyc 20${PYSITELIB}/Cython/Build/Tests/TestStripLiterals.pyc
18${PYSITELIB}/Cython/Build/Tests/TestStripLiterals.pyo 21${PYSITELIB}/Cython/Build/Tests/TestStripLiterals.pyo
19${PYSITELIB}/Cython/Build/Tests/__init__.py 22${PYSITELIB}/Cython/Build/Tests/__init__.py
@@ -313,27 +316,28 @@ ${PYSITELIB}/Cython/Includes/libc/stdio. @@ -313,27 +316,28 @@ ${PYSITELIB}/Cython/Includes/libc/stdio.
313${PYSITELIB}/Cython/Includes/libc/stdlib.pxd 316${PYSITELIB}/Cython/Includes/libc/stdlib.pxd
314${PYSITELIB}/Cython/Includes/libc/string.pxd 317${PYSITELIB}/Cython/Includes/libc/string.pxd
315${PYSITELIB}/Cython/Includes/libcpp/__init__.pxd 318${PYSITELIB}/Cython/Includes/libcpp/__init__.pxd
316${PYSITELIB}/Cython/Includes/libcpp/deque.pxd 319${PYSITELIB}/Cython/Includes/libcpp/deque.pxd
317${PYSITELIB}/Cython/Includes/libcpp/list.pxd 320${PYSITELIB}/Cython/Includes/libcpp/list.pxd
318${PYSITELIB}/Cython/Includes/libcpp/map.pxd 321${PYSITELIB}/Cython/Includes/libcpp/map.pxd
319${PYSITELIB}/Cython/Includes/libcpp/pair.pxd 322${PYSITELIB}/Cython/Includes/libcpp/pair.pxd
320${PYSITELIB}/Cython/Includes/libcpp/queue.pxd 323${PYSITELIB}/Cython/Includes/libcpp/queue.pxd
321${PYSITELIB}/Cython/Includes/libcpp/set.pxd 324${PYSITELIB}/Cython/Includes/libcpp/set.pxd
322${PYSITELIB}/Cython/Includes/libcpp/stack.pxd 325${PYSITELIB}/Cython/Includes/libcpp/stack.pxd
323${PYSITELIB}/Cython/Includes/libcpp/string.pxd 326${PYSITELIB}/Cython/Includes/libcpp/string.pxd
324${PYSITELIB}/Cython/Includes/libcpp/utility.pxd 327${PYSITELIB}/Cython/Includes/libcpp/utility.pxd
325${PYSITELIB}/Cython/Includes/libcpp/vector.pxd 328${PYSITELIB}/Cython/Includes/libcpp/vector.pxd
326${PYSITELIB}/Cython/Includes/numpy.pxd 329${PYSITELIB}/Cython/Includes/numpy/__init__.pxd
 330${PYSITELIB}/Cython/Includes/numpy/math.pxd
327${PYSITELIB}/Cython/Includes/openmp.pxd 331${PYSITELIB}/Cython/Includes/openmp.pxd
328${PYSITELIB}/Cython/Includes/posix/__init__.pxd 332${PYSITELIB}/Cython/Includes/posix/__init__.pxd
329${PYSITELIB}/Cython/Includes/posix/fcntl.pxd 333${PYSITELIB}/Cython/Includes/posix/fcntl.pxd
330${PYSITELIB}/Cython/Includes/posix/ioctl.pxd 334${PYSITELIB}/Cython/Includes/posix/ioctl.pxd
331${PYSITELIB}/Cython/Includes/posix/unistd.pxd 335${PYSITELIB}/Cython/Includes/posix/unistd.pxd
332${PYSITELIB}/Cython/Plex/Actions.pxd 336${PYSITELIB}/Cython/Plex/Actions.pxd
333${PYSITELIB}/Cython/Plex/Actions.py 337${PYSITELIB}/Cython/Plex/Actions.py
334${PYSITELIB}/Cython/Plex/Actions.pyc 338${PYSITELIB}/Cython/Plex/Actions.pyc
335${PYSITELIB}/Cython/Plex/Actions.pyo 339${PYSITELIB}/Cython/Plex/Actions.pyo
336${PYSITELIB}/Cython/Plex/Actions.so 340${PYSITELIB}/Cython/Plex/Actions.so
337${PYSITELIB}/Cython/Plex/DFA.py 341${PYSITELIB}/Cython/Plex/DFA.py
338${PYSITELIB}/Cython/Plex/DFA.pyc 342${PYSITELIB}/Cython/Plex/DFA.pyc
339${PYSITELIB}/Cython/Plex/DFA.pyo 343${PYSITELIB}/Cython/Plex/DFA.pyo
@@ -373,47 +377,52 @@ ${PYSITELIB}/Cython/Runtime/refnanny.pyx @@ -373,47 +377,52 @@ ${PYSITELIB}/Cython/Runtime/refnanny.pyx
373${PYSITELIB}/Cython/Runtime/refnanny.so 377${PYSITELIB}/Cython/Runtime/refnanny.so
374${PYSITELIB}/Cython/Shadow.py 378${PYSITELIB}/Cython/Shadow.py
375${PYSITELIB}/Cython/Shadow.pyc 379${PYSITELIB}/Cython/Shadow.pyc
376${PYSITELIB}/Cython/Shadow.pyo 380${PYSITELIB}/Cython/Shadow.pyo
377${PYSITELIB}/Cython/StringIOTree.py 381${PYSITELIB}/Cython/StringIOTree.py
378${PYSITELIB}/Cython/StringIOTree.pyc 382${PYSITELIB}/Cython/StringIOTree.pyc
379${PYSITELIB}/Cython/StringIOTree.pyo 383${PYSITELIB}/Cython/StringIOTree.pyo
380${PYSITELIB}/Cython/Tempita/__init__.py 384${PYSITELIB}/Cython/Tempita/__init__.py
381${PYSITELIB}/Cython/Tempita/__init__.pyc 385${PYSITELIB}/Cython/Tempita/__init__.pyc
382${PYSITELIB}/Cython/Tempita/__init__.pyo 386${PYSITELIB}/Cython/Tempita/__init__.pyo
383${PYSITELIB}/Cython/Tempita/_looper.py 387${PYSITELIB}/Cython/Tempita/_looper.py
384${PYSITELIB}/Cython/Tempita/_looper.pyc 388${PYSITELIB}/Cython/Tempita/_looper.pyc
385${PYSITELIB}/Cython/Tempita/_looper.pyo 389${PYSITELIB}/Cython/Tempita/_looper.pyo
 390${PYSITELIB}/Cython/Tempita/_tempita.py
 391${PYSITELIB}/Cython/Tempita/_tempita.pyc
 392${PYSITELIB}/Cython/Tempita/_tempita.pyo
 393${PYSITELIB}/Cython/Tempita/_tempita.so
386${PYSITELIB}/Cython/Tempita/compat3.py 394${PYSITELIB}/Cython/Tempita/compat3.py
387${PYSITELIB}/Cython/Tempita/compat3.pyc 395${PYSITELIB}/Cython/Tempita/compat3.pyc
388${PYSITELIB}/Cython/Tempita/compat3.pyo 396${PYSITELIB}/Cython/Tempita/compat3.pyo
389${PYSITELIB}/Cython/TestUtils.py 397${PYSITELIB}/Cython/TestUtils.py
390${PYSITELIB}/Cython/TestUtils.pyc 398${PYSITELIB}/Cython/TestUtils.pyc
391${PYSITELIB}/Cython/TestUtils.pyo 399${PYSITELIB}/Cython/TestUtils.pyo
392${PYSITELIB}/Cython/Tests/TestCodeWriter.py 400${PYSITELIB}/Cython/Tests/TestCodeWriter.py
393${PYSITELIB}/Cython/Tests/TestCodeWriter.pyc 401${PYSITELIB}/Cython/Tests/TestCodeWriter.pyc
394${PYSITELIB}/Cython/Tests/TestCodeWriter.pyo 402${PYSITELIB}/Cython/Tests/TestCodeWriter.pyo
395${PYSITELIB}/Cython/Tests/TestStringIOTree.py 403${PYSITELIB}/Cython/Tests/TestStringIOTree.py
396${PYSITELIB}/Cython/Tests/TestStringIOTree.pyc 404${PYSITELIB}/Cython/Tests/TestStringIOTree.pyc
397${PYSITELIB}/Cython/Tests/TestStringIOTree.pyo 405${PYSITELIB}/Cython/Tests/TestStringIOTree.pyo
398${PYSITELIB}/Cython/Tests/__init__.py 406${PYSITELIB}/Cython/Tests/__init__.py
399${PYSITELIB}/Cython/Tests/__init__.pyc 407${PYSITELIB}/Cython/Tests/__init__.pyc
400${PYSITELIB}/Cython/Tests/__init__.pyo 408${PYSITELIB}/Cython/Tests/__init__.pyo
401${PYSITELIB}/Cython/Tests/xmlrunner.py 409${PYSITELIB}/Cython/Tests/xmlrunner.py
402${PYSITELIB}/Cython/Tests/xmlrunner.pyc 410${PYSITELIB}/Cython/Tests/xmlrunner.pyc
403${PYSITELIB}/Cython/Tests/xmlrunner.pyo 411${PYSITELIB}/Cython/Tests/xmlrunner.pyo
404${PYSITELIB}/Cython/Utility/Buffer.c 412${PYSITELIB}/Cython/Utility/Buffer.c
405${PYSITELIB}/Cython/Utility/Builtins.c 413${PYSITELIB}/Cython/Utility/Builtins.c
406${PYSITELIB}/Cython/Utility/Capsule.c 414${PYSITELIB}/Cython/Utility/Capsule.c
 415${PYSITELIB}/Cython/Utility/CommonTypes.c
407${PYSITELIB}/Cython/Utility/CppConvert.pyx 416${PYSITELIB}/Cython/Utility/CppConvert.pyx
408${PYSITELIB}/Cython/Utility/CppSupport.cpp 417${PYSITELIB}/Cython/Utility/CppSupport.cpp
409${PYSITELIB}/Cython/Utility/CythonFunction.c 418${PYSITELIB}/Cython/Utility/CythonFunction.c
410${PYSITELIB}/Cython/Utility/Exceptions.c 419${PYSITELIB}/Cython/Utility/Exceptions.c
411${PYSITELIB}/Cython/Utility/ExtensionTypes.c 420${PYSITELIB}/Cython/Utility/ExtensionTypes.c
412${PYSITELIB}/Cython/Utility/FunctionArguments.c 421${PYSITELIB}/Cython/Utility/FunctionArguments.c
413${PYSITELIB}/Cython/Utility/Generator.c 422${PYSITELIB}/Cython/Utility/Generator.c
414${PYSITELIB}/Cython/Utility/ImportExport.c 423${PYSITELIB}/Cython/Utility/ImportExport.c
415${PYSITELIB}/Cython/Utility/MemoryView.pyx 424${PYSITELIB}/Cython/Utility/MemoryView.pyx
416${PYSITELIB}/Cython/Utility/MemoryView_C.c 425${PYSITELIB}/Cython/Utility/MemoryView_C.c
417${PYSITELIB}/Cython/Utility/ModuleSetupCode.c 426${PYSITELIB}/Cython/Utility/ModuleSetupCode.c
418${PYSITELIB}/Cython/Utility/ObjectHandling.c 427${PYSITELIB}/Cython/Utility/ObjectHandling.c
419${PYSITELIB}/Cython/Utility/Optimize.c 428${PYSITELIB}/Cython/Utility/Optimize.c

cvs diff -r1.10 -r1.11 pkgsrc/devel/py-cython/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/py-cython/distinfo 2013/10/20 22:04:31 1.10
+++ pkgsrc/devel/py-cython/distinfo 2014/01/27 19:44:24 1.11
@@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
1$NetBSD: distinfo,v 1.10 2013/10/20 22:04:31 wiz Exp $ 1$NetBSD: distinfo,v 1.11 2014/01/27 19:44:24 wiz Exp $
2 2
3SHA1 (Cython-0.19.2.tar.gz) = f8b5baff885c836a264bec2ac7f2f7910b2f1a9d 3SHA1 (Cython-0.20.tar.gz) = fb22442bd23acb26b6a803bad0dd6746cbb602f3
4RMD160 (Cython-0.19.2.tar.gz) = ec1377cac7fc9b9aabf42eb543ccb607d4f25112 4RMD160 (Cython-0.20.tar.gz) = bc67c79c9eb817db2a1213bda4ab7fa7e3c5a4b5
5Size (Cython-0.19.2.tar.gz) = 1389354 bytes 5Size (Cython-0.20.tar.gz) = 1420856 bytes
6SHA1 (patch-aa) = 78bed9e17be5bc5e97695fe6c7fd6bc09d8e2b6a 6SHA1 (patch-aa) = 78bed9e17be5bc5e97695fe6c7fd6bc09d8e2b6a
7SHA1 (patch-ab) = de923488eb3f08f7e048c35c57bd60cbfb2b4c53 7SHA1 (patch-ab) = de923488eb3f08f7e048c35c57bd60cbfb2b4c53
8SHA1 (patch-ac) = 79b421be9b4b72c57df9907533c4732fec9458f9 8SHA1 (patch-ac) = 79b421be9b4b72c57df9907533c4732fec9458f9