From 62c363dcb2eda5d5351bc35460283f64a856e222 Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 11 Apr 2020 14:02:50 +0000 Subject: [PATCH] py-msgpack: updated to 1.0.0 1.0.0 Remove Python 2 support from the msgpack/_cmsgpack. msgpack/fallback still supports Python 2. Remove encoding option from the Packer and Unpacker. Unpacker: The default value of max_buffer_type is changed to 100MiB. Unpacker: strict_map_key is True by default now. Unpacker: String map keys are interned. Drop old buffer protocol support. Support Timestamp type. Support serializing and decerializing datetime object with tzinfo. Unpacker: Fix Unpacker.read_bytes() in fallback implementation. 0.6.2 Support Python 3.8. Update Cython to 0.29.13 for support Python 3.8. Some small optimizations. 0.6.1 This release is for mitigating pain caused by v0.6.0 reduced max input limits for security reason. unpackb(data) configures max_*_len options from len(data), instead of static default sizes. Unpacker(max_buffer_len=N) configures max_*_len options from N, instead of static default sizes. max_bin_len, max_str_len, and max_ext_len are deprecated. Since this is minor release, it's document only deprecation. 0.6.0 This release contains some backward incompatible changes for security reason (DoS). Important changes unpacker: Default value of input limits are smaller than before to avoid DoS attack. If you need to handle large data, you need to specify limits manually. Unpacker doesn't wrap underlaying ValueError (including UnicodeError) into UnpackValueError. If you want to catch all exception during unpack, you need to use try ... except Exception with minimum try code block. PackValueError and PackOverflowError are also removed. You need to catch normal ValueError and OverflowError. Unpacker has strict_map_key option now. When it is true, only bytes and str (unicode in Python 2) are allowed for map keys. It is recommended to avoid hashdos. Default value of this option is False for backward compatibility reason. But it will be changed True in 1.0. Other changes Extension modules are merged. There is msgpack._cmsgpack instead of msgpack._packer and msgpack._unpacker. Add Unpacker.getbuffer() method. unpacker: msgpack.StackError is raised when input data contains too nested data. unpacker: msgpack.FormatError is raised when input data is not valid msgpack format. --- devel/py-msgpack/Makefile | 10 ++++++++-- devel/py-msgpack/PLIST | 16 +++++++++------- devel/py-msgpack/distinfo | 10 +++++----- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/devel/py-msgpack/Makefile b/devel/py-msgpack/Makefile index 67b2c7760590..3c576295f3eb 100644 --- a/devel/py-msgpack/Makefile +++ b/devel/py-msgpack/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.22 2018/02/23 14:20:55 adam Exp $ +# $NetBSD: Makefile,v 1.23 2020/04/11 14:02:50 adam Exp $ -DISTNAME= msgpack-0.5.6 +DISTNAME= msgpack-1.0.0 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} CATEGORIES= devel python MASTER_SITES= ${MASTER_SITE_PYPI:=m/msgpack/} @@ -10,7 +10,13 @@ HOMEPAGE= https://msgpack.org/ COMMENT= MessagePack (de)serializer for Python LICENSE= apache-2.0 +TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test + USE_LANGUAGES= c c++ +do-test: + cd ${WRKSRC} && pytest-${PYVERSSUFFIX} test + + .include "../../lang/python/egg.mk" .include "../../mk/bsd.pkg.mk" diff --git a/devel/py-msgpack/PLIST b/devel/py-msgpack/PLIST index 5ebc18a6802a..5d407285bb47 100644 --- a/devel/py-msgpack/PLIST +++ b/devel/py-msgpack/PLIST @@ -1,19 +1,21 @@ -@comment $NetBSD: PLIST,v 1.3 2014/01/23 09:40:29 obache Exp $ +@comment $NetBSD: PLIST,v 1.4 2020/04/11 14:02:50 adam Exp $ +${PYSITELIB}/${EGG_INFODIR}/PKG-INFO +${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt +${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt +${PYSITELIB}/${EGG_INFODIR}/top_level.txt ${PYSITELIB}/msgpack/__init__.py ${PYSITELIB}/msgpack/__init__.pyc ${PYSITELIB}/msgpack/__init__.pyo -${PYSITELIB}/msgpack/_packer.so -${PYSITELIB}/msgpack/_unpacker.so +${PLIST.py3x}${PYSITELIB}/msgpack/_cmsgpack.so ${PYSITELIB}/msgpack/_version.py ${PYSITELIB}/msgpack/_version.pyc ${PYSITELIB}/msgpack/_version.pyo ${PYSITELIB}/msgpack/exceptions.py ${PYSITELIB}/msgpack/exceptions.pyc ${PYSITELIB}/msgpack/exceptions.pyo +${PYSITELIB}/msgpack/ext.py +${PYSITELIB}/msgpack/ext.pyc +${PYSITELIB}/msgpack/ext.pyo ${PYSITELIB}/msgpack/fallback.py ${PYSITELIB}/msgpack/fallback.pyc ${PYSITELIB}/msgpack/fallback.pyo -${PYSITELIB}/${EGG_INFODIR}/PKG-INFO -${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt -${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt -${PYSITELIB}/${EGG_INFODIR}/top_level.txt diff --git a/devel/py-msgpack/distinfo b/devel/py-msgpack/distinfo index c683f30827f8..909077230b86 100644 --- a/devel/py-msgpack/distinfo +++ b/devel/py-msgpack/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.13 2018/02/23 14:20:55 adam Exp $ +$NetBSD: distinfo,v 1.14 2020/04/11 14:02:50 adam Exp $ -SHA1 (msgpack-0.5.6.tar.gz) = 916c234864a5eaae179982dcd4b20efaa3677a30 -RMD160 (msgpack-0.5.6.tar.gz) = 48818b2ea891871e70754fc3720a15d04a12c28c -SHA512 (msgpack-0.5.6.tar.gz) = bdbd193bd3bd02e78d9c6e8d9d8fa687d13583dff2813bc77c5e6cbbe0d180765da3c9a80d176f9993589e35f548ad04973e3d523d0b6d41ef7916ecd86195aa -Size (msgpack-0.5.6.tar.gz) = 138292 bytes +SHA1 (msgpack-1.0.0.tar.gz) = d55eda443260ae6af169f007e2dcf4e56529f4f0 +RMD160 (msgpack-1.0.0.tar.gz) = 26d86cec6d47d4cc300fe33100d967d9890117e7 +SHA512 (msgpack-1.0.0.tar.gz) = 6dc168b111cd37807e8e8a09840d1b116d7f38d56f4622b9d36ab7dbd983ebe2f34e763f48c6348148c6945c9f1c9a0f83f5f03e12d12bc18f7b8e0cbd669f87 +Size (msgpack-1.0.0.tar.gz) = 232331 bytes