pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-cython py-cython: update to 0.27



details:   https://anonhg.NetBSD.org/pkgsrc/rev/250e3f07027b
branches:  trunk
changeset: 369518:250e3f07027b
user:      adam <adam%pkgsrc.org@localhost>
date:      Sat Sep 30 09:53:23 2017 +0000

description:
py-cython: update to 0.27

0.27:

Features added
* Extension module initialisation follows
  `PEP 489 <https://www.python.org/dev/peps/pep-0489/>`_ in CPython 3.5+, which
  resolves several differences with regard to normal Python modules.  This makes
  the global names ``__file__`` and ``__path__`` correctly available to module
  level code and improves the support for module-level relative imports.
* Asynchronous generators (`PEP 525 <https://www.python.org/dev/peps/pep-0525/>`_)
  and asynchronous comprehensions (`PEP 530 <https://www.python.org/dev/peps/pep-0530/>`_)
  have been implemented.  Note that async generators require finalisation support
  in order to allow for asynchronous operations during cleanup, which is only
  available in CPython 3.6+.  All other functionality has been backported as usual.
* Variable annotations are now parsed according to
  `PEP 526 <https://www.python.org/dev/peps/pep-0526/>`_.  Cython types (e.g.
  ``cython.int``) are evaluated as C type declarations and everything else as Python
  types.  This can be disabled with the directive ``annotation_typing=False``.
  Note that most complex PEP-484 style annotations are currently ignored.  This will
  change in future releases.
* Extension types (also in pure Python mode) can implement the normal special methods
  ``__eq__``, ``__lt__`` etc. for comparisons instead of the low-level ``__richcmp__``
  method.
* New decorator ``@cython.exceptval(x=None, check=False)`` that makes the signature
  declarations ``except x``, ``except? x`` and ``except *`` available to pure Python
  code.  Original patch by Antonio Cuni.
* Signature annotations are now included in the signature docstring generated by
  the ``embedsignature`` directive.
* The gdb support for Python code (``libpython.py``) was updated to the latest
  version in CPython 3.7 (git rev 5fe59f8).
* The compiler tries to find a usable exception return value for cdef functions
  with ``except *`` if the returned type allows it.  Note that this feature is subject
  to safety limitations, so it is still better to provide an explicit declaration.
* C functions can be assigned to function pointers with a compatible exception
  declaration, not only with exact matches.  A side-effect is that certain compatible
  signature overrides are now allowed and some more mismatches of exception signatures
  are now detected and rejected as errors that were not detected before.
* The IPython/Jupyter magic integration has a new option ``%%cython --pgo`` for profile
  guided optimisation. It compiles the cell with PGO settings for the C compiler,
  executes it to generate a runtime profile, and then compiles it again using that
  profile for C compiler optimisation.  Currently only tested with gcc.
* ``len(memoryview)`` can be used in nogil sections to get the size of the
  first dimension of a memory view (``shape[0]``).
* C++ classes can now contain (properly refcounted) Python objects.
* NumPy dtype subarrays are now accessible through the C-API.
* Resolves several issues with PyPy and uses faster async slots in PyPy3.

Bugs fixed
* Extension types that were cimported from other Cython modules could disagree
  about the order of fused cdef methods in their call table.  This could lead
  to wrong methods being called and potentially also crashes.  The fix required
  changes to the ordering of fused methods in the call table, which may break
  existing compiled modules that call fused cdef methods across module boundaries,
  if these methods were implemented in a different order than they were declared
  in the corresponding .pxd file.
* The exception state handling in generators and coroutines could lead to
  exceptions in the caller being lost if an exception was raised and handled
  inside of the coroutine when yielding.
* Loops over ``range(enum)`` were not converted into C for-loops.  Note that it
  is still recommended to use an explicit cast to a C integer type in this case.
* Error positions of names (e.g. variables) were incorrectly reported after the
  name and not at the beginning of the name.
* Compile time ``DEF`` assignments were evaluated even when they occur inside of
  falsy ``IF`` blocks.
* Disabling the line tracing from a trace function could fail.
* Several issues with the Pythran integration were resolved.
* abs(signed int) now returns a signed rather than unsigned int.
* Reading ``frame.f_locals`` of a Cython function (e.g. from a debugger or profiler
  could modify the module globals.
* Buffer type mismatches in the NumPy buffer support could leak a reference to the
  buffer owner.
* Using the "is_f_contig" and "is_c_contig" memoryview methods together could leave
  one of them undeclared.
* Compilation failed if the for-in-range loop target was not a variable but a more
  complex expression, e.g. an item assignment.
* Compile time evaluations of (partially) constant f-strings could show incorrect
  results.
* Escape sequences in raw f-strings (``fr'...'``) were resolved instead of passing
  them through as expected.
* Some ref-counting issues in buffer error handling have been resolved.

Other changes
* Type declarations in signature annotations are now parsed according to
  `PEP 484 <https://www.python.org/dev/peps/pep-0484/>`_
  typing.  Only Cython types (e.g. ``cython.int``) and Python builtin types are
  currently considered as type declarations.  Everything else is ignored, but this
  will change in a future Cython release.
* The directive ``annotation_typing`` is now ``True`` by default, which enables
  parsing type declarations from annotations.
* This release no longer supports Python 3.2.

diffstat:

 devel/py-cython/Makefile |   4 ++--
 devel/py-cython/PLIST    |   6 ++++--
 devel/py-cython/distinfo |  10 +++++-----
 3 files changed, 11 insertions(+), 9 deletions(-)

diffs (64 lines):

diff -r 6ec1ca534be1 -r 250e3f07027b devel/py-cython/Makefile
--- a/devel/py-cython/Makefile  Sat Sep 30 09:47:03 2017 +0000
+++ b/devel/py-cython/Makefile  Sat Sep 30 09:53:23 2017 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.37 2017/09/03 18:48:54 adam Exp $
+# $NetBSD: Makefile,v 1.38 2017/09/30 09:53:23 adam Exp $
 
-DISTNAME=      Cython-0.26.1
+DISTNAME=      Cython-0.27
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:tl}
 CATEGORIES=    lang python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=c/cython/}
diff -r 6ec1ca534be1 -r 250e3f07027b devel/py-cython/PLIST
--- a/devel/py-cython/PLIST     Sat Sep 30 09:47:03 2017 +0000
+++ b/devel/py-cython/PLIST     Sat Sep 30 09:53:23 2017 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.21 2017/09/03 18:48:54 adam Exp $
+@comment $NetBSD: PLIST,v 1.22 2017/09/30 09:53:23 adam Exp $
 bin/cygdb${PYVERSSUFFIX}
 bin/cython${PYVERSSUFFIX}
 bin/cythonize${PYVERSSUFFIX}
@@ -139,6 +139,7 @@
 ${PYSITELIB}/Cython/Compiler/Pythran.py
 ${PYSITELIB}/Cython/Compiler/Pythran.pyc
 ${PYSITELIB}/Cython/Compiler/Pythran.pyo
+${PYSITELIB}/Cython/Compiler/Pythran.so
 ${PYSITELIB}/Cython/Compiler/Scanning.pxd
 ${PYSITELIB}/Cython/Compiler/Scanning.py
 ${PYSITELIB}/Cython/Compiler/Scanning.pyc
@@ -178,8 +179,8 @@
 ${PYSITELIB}/Cython/Compiler/Tests/TestTreePath.pyc
 ${PYSITELIB}/Cython/Compiler/Tests/TestTreePath.pyo
 ${PYSITELIB}/Cython/Compiler/Tests/TestTypes.py
+${PYSITELIB}/Cython/Compiler/Tests/TestTypes.pyc
 ${PYSITELIB}/Cython/Compiler/Tests/TestTypes.pyo
-${PYSITELIB}/Cython/Compiler/Tests/TestTypes.pyc
 ${PYSITELIB}/Cython/Compiler/Tests/TestUtilityLoad.py
 ${PYSITELIB}/Cython/Compiler/Tests/TestUtilityLoad.pyc
 ${PYSITELIB}/Cython/Compiler/Tests/TestUtilityLoad.pyo
@@ -475,6 +476,7 @@
 ${PYSITELIB}/Cython/Tests/xmlrunner.py
 ${PYSITELIB}/Cython/Tests/xmlrunner.pyc
 ${PYSITELIB}/Cython/Tests/xmlrunner.pyo
+${PYSITELIB}/Cython/Utility/AsyncGen.c
 ${PYSITELIB}/Cython/Utility/Buffer.c
 ${PYSITELIB}/Cython/Utility/Builtins.c
 ${PYSITELIB}/Cython/Utility/CConvert.pyx
diff -r 6ec1ca534be1 -r 250e3f07027b devel/py-cython/distinfo
--- a/devel/py-cython/distinfo  Sat Sep 30 09:47:03 2017 +0000
+++ b/devel/py-cython/distinfo  Sat Sep 30 09:53:23 2017 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.29 2017/09/03 18:48:54 adam Exp $
+$NetBSD: distinfo,v 1.30 2017/09/30 09:53:23 adam Exp $
 
-SHA1 (Cython-0.26.1.tar.gz) = 1e0134beb69fe183a3b04d5b535501e1951d3788
-RMD160 (Cython-0.26.1.tar.gz) = 4b018ca138da99f630fd538db189e5e25bc589fd
-SHA512 (Cython-0.26.1.tar.gz) = cdf31afaba78209c37a224345471c5c822b78c6d26c51583c46669b6b2b57b4952b33a839a51d06c3330fdff889345ac611fbaa2b2f17498cb02f3b5675f7948
-Size (Cython-0.26.1.tar.gz) = 1725133 bytes
+SHA1 (Cython-0.27.tar.gz) = 1ad0ac2419f7c6a757c199806c4558b22158d442
+RMD160 (Cython-0.27.tar.gz) = 2fb0fdbb56c3b4000e4d1c7b510c98e2fa606585
+SHA512 (Cython-0.27.tar.gz) = eaead5e550e8cdb2e285c9cf7e86784e114b258ca8be9a983c9da90f29123e4316f1ef0c1bde2b2b7172b8c3000312e06bb78e7ce242d0d778534c1da8a67c0d
+Size (Cython-0.27.tar.gz) = 1769385 bytes
 SHA1 (patch-ac) = d0e06dd9e4b5a34d0614ec17f51c129eb7724323
 SHA1 (patch-runtests.py) = 788ff593da9ce447af368957f1a8be562e2d40da



Home | Main Index | Thread Index | Old Index