pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/py-cffi Updated py-cffi to 1.10.0.
details: https://anonhg.NetBSD.org/pkgsrc/rev/ba34b537990c
branches: trunk
changeset: 360713:ba34b537990c
user: wiz <wiz%pkgsrc.org@localhost>
date: Wed Apr 05 15:54:26 2017 +0000
description:
Updated py-cffi to 1.10.0.
v1.10
Issue #295: use calloc() directly instead of PyObject_Malloc()+memset()
to handle ffi.new() with a default allocator. Speeds up
ffi.new(large-array) where most of the time you never touch
most of the array.
Some OS/X build fixes (?only with Xcode but without CLT?).
Improve a couple of error messages: when getting mismatched
versions of cffi and its backend; and when calling functions
which cannot be called with libffi because an argument is a
struct that is ?too complicated? (and not a struct pointer,
which always works).
Add support for some unusual compilers (non-msvc, non-gcc,
non-icc, non-clang)
Implemented the remaining cases for ffi.from_buffer. Now all
buffer/memoryview objects can be passed. The one remaining check
is against passing unicode strings in Python 2. (They support
the buffer interface, but that gives the raw bytes behind the
UTF16/UCS4 storage, which is most of the times not what you
expect. In Python 3 this has been fixed and the unicode strings
don?t support the memoryview interface any more.)
The C type _Bool or bool now converts to a Python boolean when
reading, instead of the content of the byte as an integer. The
potential incompatibility here is what occurs if the byte
contains a value different from 0 and 1. Previously, it would
just return it; with this change, CFFI raises an exception in
this case. But this case means ?undefined behavior? in C; if
you really have to interface with a library relying on this,
don?t use bool in the CFFI side. Also, it is still valid to use
a byte string as initializer for a bool[], but now it must only
contain \x00 or \x01. As an aside, ffi.string() no longer works
on bool[] (but it never made much sense, as this function stops
at the first zero).
ffi.buffer is now the name of cffi?s buffer type, and ffi.buffer()
works like before but is the constructor of that type.
ffi.addressof(lib, "name") now works also in in-line mode, not
only in out-of-line mode. This is useful for taking the address
of global variables.
Issue #255: cdata objects of a primitive type (integers, floats,
char) are now compared and ordered by value. For example, <cdata
'int' 42> compares equal to 42 and <cdata 'char' b'A'> compares
equal to b'A'. Unlike C, <cdata 'int' -1> does not compare equal
to ffi.cast("unsigned int", -1): it compares smaller, because
-1 < 4294967295.
PyPy: ffi.new() and ffi.new_allocator()() did not record ?memory
pressure?, causing the GC to run too infrequently if you call
ffi.new() very often and/or with large arrays. Fixed in PyPy
5.7.
Support in ffi.cdef() for numeric expressions with + or -.
Assumes that there is no overflow; it should be fixed first
before we add more general support for arbitrary arithmetic on
constants.
diffstat:
devel/py-cffi/Makefile | 8 ++++++--
devel/py-cffi/PLIST | 5 ++++-
devel/py-cffi/distinfo | 10 +++++-----
3 files changed, 15 insertions(+), 8 deletions(-)
diffs (58 lines):
diff -r 5e5e29fd0c9c -r ba34b537990c devel/py-cffi/Makefile
--- a/devel/py-cffi/Makefile Wed Apr 05 15:50:20 2017 +0000
+++ b/devel/py-cffi/Makefile Wed Apr 05 15:54:26 2017 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.24 2017/01/28 15:34:19 wiz Exp $
+# $NetBSD: Makefile,v 1.25 2017/04/05 15:54:26 wiz Exp $
-DISTNAME= cffi-1.9.1
+DISTNAME= cffi-1.10.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_PYPI:=c/cffi/}
@@ -15,6 +15,10 @@
DEPENDS+= ${PYPKGPREFIX}-cparser-[0-9]*:../../devel/py-cparser
BUILD_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
+# needs 'make install' before running the tests
+# segfault in c/test_c.py::test_callback
+# https://bitbucket.org/cffi/cffi/issues/303/cffi-191-segmentation-fault-during-self
+# probably problem in libffi
do-test:
cd ${WRKSRC} && py.test-${PYVERSSUFFIX} -v
diff -r 5e5e29fd0c9c -r ba34b537990c devel/py-cffi/PLIST
--- a/devel/py-cffi/PLIST Wed Apr 05 15:50:20 2017 +0000
+++ b/devel/py-cffi/PLIST Wed Apr 05 15:54:26 2017 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2016/09/12 07:57:41 wiz Exp $
+@comment $NetBSD: PLIST,v 1.6 2017/04/05 15:54:26 wiz Exp $
${PYSITELIB}/_cffi_backend.so
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
@@ -27,6 +27,9 @@
${PYSITELIB}/cffi/cparser.py
${PYSITELIB}/cffi/cparser.pyc
${PYSITELIB}/cffi/cparser.pyo
+${PYSITELIB}/cffi/error.py
+${PYSITELIB}/cffi/error.pyc
+${PYSITELIB}/cffi/error.pyo
${PYSITELIB}/cffi/ffiplatform.py
${PYSITELIB}/cffi/ffiplatform.pyc
${PYSITELIB}/cffi/ffiplatform.pyo
diff -r 5e5e29fd0c9c -r ba34b537990c devel/py-cffi/distinfo
--- a/devel/py-cffi/distinfo Wed Apr 05 15:50:20 2017 +0000
+++ b/devel/py-cffi/distinfo Wed Apr 05 15:54:26 2017 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.22 2016/11/14 14:31:18 wiz Exp $
+$NetBSD: distinfo,v 1.23 2017/04/05 15:54:26 wiz Exp $
-SHA1 (cffi-1.9.1.tar.gz) = 16265a4b305d433fb9089b19278502e904b0cb43
-RMD160 (cffi-1.9.1.tar.gz) = 0521145fc517fc308462acb10cba0551a7f6b524
-SHA512 (cffi-1.9.1.tar.gz) = 6e76f181b6b7b760a14ad70338edd104a8b8e2eac5680e336d3868e0bd031a1665608e29a65dc0c56806afb8a8c03811586f151f3acef11e54e60c1bfcf902e3
-Size (cffi-1.9.1.tar.gz) = 407108 bytes
+SHA1 (cffi-1.10.0.tar.gz) = 8484aba03d1e64367d3110c0e36c1ed052b43f12
+RMD160 (cffi-1.10.0.tar.gz) = 8bcdd03716d70fed5a7c25fd0371572356b36aab
+SHA512 (cffi-1.10.0.tar.gz) = 02c9987c44698708dcb7e0aa17637df6b15f81732dc25b03e54563ca5664a817863b87daf7a782a62c7b6150388cdca858ef496a975ab289c86f05e5492465ef
+Size (cffi-1.10.0.tar.gz) = 418131 bytes
SHA1 (patch-c_malloc__closure.h) = d169a2ebdf899b5b67a714a068749ce25087be8a
Home |
Main Index |
Thread Index |
Old Index