Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-msgpack-numpy for openSUSE:Factory checked in at 2022-07-12 11:12:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-msgpack-numpy (Old) and /work/SRC/openSUSE:Factory/.python-msgpack-numpy.new.1523 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-msgpack-numpy" Tue Jul 12 11:12:25 2022 rev:6 rq:988275 version:0.4.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-msgpack-numpy/python-msgpack-numpy.changes 2021-02-19 23:45:20.547367930 +0100 +++ /work/SRC/openSUSE:Factory/.python-msgpack-numpy.new.1523/python-msgpack-numpy.changes 2022-07-12 11:12:38.603714461 +0200 @@ -1,0 +2,9 @@ +Sat Jul 9 13:41:14 UTC 2022 - Arun Persaud <a...@gmx.de> + +- specfile: + * update copyright year + +- update to version 0.4.8: + * Add support for ndarrays with dtype=object (#46). + +------------------------------------------------------------------- Old: ---- msgpack-numpy-0.4.7.1.tar.gz New: ---- msgpack-numpy-0.4.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-msgpack-numpy.spec ++++++ --- /var/tmp/diff_new_pack.O5krBt/_old 2022-07-12 11:12:39.059715058 +0200 +++ /var/tmp/diff_new_pack.O5krBt/_new 2022-07-12 11:12:39.063715063 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-msgpack-numpy # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %global skip_python36 1 Name: python-msgpack-numpy -Version: 0.4.7.1 +Version: 0.4.8 Release: 0 Summary: Numpy data serialization library using msgpack License: BSD-3-Clause ++++++ msgpack-numpy-0.4.7.1.tar.gz -> msgpack-numpy-0.4.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/.gitignore new/msgpack-numpy-0.4.8/.gitignore --- old/msgpack-numpy-0.4.7.1/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/msgpack-numpy-0.4.8/.gitignore 2020-12-22 05:08:34.000000000 +0100 @@ -0,0 +1,140 @@ +# Created by https://www.toptal.com/developers/gitignore/api/python +# Edit at https://www.toptal.com/developers/gitignore?templates=python + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +pytestdebug.log + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ +doc/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# End of https://www.toptal.com/developers/gitignore/api/python diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/.travis.yml new/msgpack-numpy-0.4.8/.travis.yml --- old/msgpack-numpy-0.4.7.1/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/msgpack-numpy-0.4.8/.travis.yml 2020-12-22 05:08:34.000000000 +0100 @@ -0,0 +1,14 @@ +dist: xenial +language: python +os: + - linux + +python: + - 2.7 + - 3.5 + - 3.6 + - 3.7 + - 3.8 + +install: pip install tox-travis +script: tox diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/AUTHORS.md new/msgpack-numpy-0.4.8/AUTHORS.md --- old/msgpack-numpy-0.4.7.1/AUTHORS.md 2020-09-30 23:20:50.000000000 +0200 +++ new/msgpack-numpy-0.4.8/AUTHORS.md 2022-04-28 18:23:33.000000000 +0200 @@ -11,6 +11,7 @@ - [Alex Ford](https://github.com/asford) - bug fix. - [Colin Jermain](https://github.com/cjermain) - Python 3 support. +- [Etienne Wodey](https://github.com/airwoodix) - support for ndarrays with dtype='O' - [John Tyree](https://github.com/johntyree) - support for numpy scalar booleans. - [Mehdi Sadeghi](https://github.com/mehdisadeghi) - bug reports. - [Sujoy Roy](https://github.com/tvkpz) - bug reports. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/CHANGES.md new/msgpack-numpy-0.4.8/CHANGES.md --- old/msgpack-numpy-0.4.7.1/CHANGES.md 2020-09-30 23:22:08.000000000 +0200 +++ new/msgpack-numpy-0.4.8/CHANGES.md 2022-04-28 17:26:34.000000000 +0200 @@ -5,6 +5,10 @@ Change Log ========== +Release 0.4.8 (April 28, 2022) +------------------------------ +* Add support for ndarrays with dtype=object (#46). + Release 0.4.7.1 (September 30, 2020) ------------------------------------ * Fix Python 2.7 regression (#45). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/LICENSE.md new/msgpack-numpy-0.4.8/LICENSE.md --- old/msgpack-numpy-0.4.7.1/LICENSE.md 2020-09-16 14:43:27.000000000 +0200 +++ new/msgpack-numpy-0.4.8/LICENSE.md 2022-04-28 17:19:59.000000000 +0200 @@ -5,7 +5,7 @@ License ======= -Copyright (c) 2013-2020, Lev E. Givon. +Copyright (c) 2013-2022, Lev E. Givon. All rights reserved. Redistribution and use in source and binary forms, with or without diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/Makefile new/msgpack-numpy-0.4.8/Makefile --- old/msgpack-numpy-0.4.7.1/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/msgpack-numpy-0.4.8/Makefile 2020-12-22 05:08:34.000000000 +0100 @@ -0,0 +1,28 @@ +PYTHON := `which python` + +NAME = msgpack-numpy +VERSION = $(shell $(PYTHON) -c 'import setup; print setup.VERSION') + +.PHONY: package build develop install test clean + +package: + $(PYTHON) setup.py sdist --formats=gztar bdist_wheel + +upload: | package + twine upload dist/* + +build: + $(PYTHON) setup.py build + +develop: + $(PYTHON) setup.py develop + +install: + $(PYTHON) setup.py install + +test: + $(PYTHON) msgpack_numpy.py + +clean: + $(PYTHON) setup.py clean + rm -f dist/* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/PKG-INFO new/msgpack-numpy-0.4.8/PKG-INFO --- old/msgpack-numpy-0.4.7.1/PKG-INFO 2020-09-30 23:22:59.973143800 +0200 +++ new/msgpack-numpy-0.4.8/PKG-INFO 2022-06-09 05:42:59.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: msgpack-numpy -Version: 0.4.7.1 +Version: 0.4.8 Summary: Numpy data serialization using msgpack Home-page: https://github.com/lebedov/msgpack-numpy Author: Lev E. Givon @@ -66,7 +66,14 @@ information in the serialized data necessarily incurs some storage overhead; if preservation of type information is not needed, one may be able to avoid some of this overhead by writing a custom encoder/decoder pair that produces more - efficient serializations for those specific use cases. + efficient serializations for those specific use cases. + + Numpy arrays with a dtype of 'O' are serialized/deserialized using pickle as + a fallback solution to enable msgpack-numpy to handle + such arrays. As the additional overhead of pickle serialization negates one + of the reasons to use msgpack, it may be advisable to either write a custom + encoder/decoder to handle the specific use case efficiently or else not bother + using msgpack-numpy. Note that numpy arrays deserialized by msgpack-numpy are read-only and must be copied if they are to be modified. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/README.md new/msgpack-numpy-0.4.8/README.md --- old/msgpack-numpy-0.4.7.1/README.md 2020-09-30 23:19:44.000000000 +0200 +++ new/msgpack-numpy-0.4.8/README.md 2022-04-28 18:44:55.000000000 +0200 @@ -65,7 +65,14 @@ information in the serialized data necessarily incurs some storage overhead; if preservation of type information is not needed, one may be able to avoid some of this overhead by writing a custom encoder/decoder pair that produces more -efficient serializations for those specific use cases. +efficient serializations for those specific use cases. + +Numpy arrays with a dtype of 'O' are serialized/deserialized using pickle as +a fallback solution to enable msgpack-numpy to handle +such arrays. As the additional overhead of pickle serialization negates one +of the reasons to use msgpack, it may be advisable to either write a custom +encoder/decoder to handle the specific use case efficiently or else not bother +using msgpack-numpy. Note that numpy arrays deserialized by msgpack-numpy are read-only and must be copied if they are to be modified. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/msgpack_numpy.egg-info/PKG-INFO new/msgpack-numpy-0.4.8/msgpack_numpy.egg-info/PKG-INFO --- old/msgpack-numpy-0.4.7.1/msgpack_numpy.egg-info/PKG-INFO 2020-09-30 23:22:59.000000000 +0200 +++ new/msgpack-numpy-0.4.8/msgpack_numpy.egg-info/PKG-INFO 2022-06-09 05:42:59.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: msgpack-numpy -Version: 0.4.7.1 +Version: 0.4.8 Summary: Numpy data serialization using msgpack Home-page: https://github.com/lebedov/msgpack-numpy Author: Lev E. Givon @@ -66,7 +66,14 @@ information in the serialized data necessarily incurs some storage overhead; if preservation of type information is not needed, one may be able to avoid some of this overhead by writing a custom encoder/decoder pair that produces more - efficient serializations for those specific use cases. + efficient serializations for those specific use cases. + + Numpy arrays with a dtype of 'O' are serialized/deserialized using pickle as + a fallback solution to enable msgpack-numpy to handle + such arrays. As the additional overhead of pickle serialization negates one + of the reasons to use msgpack, it may be advisable to either write a custom + encoder/decoder to handle the specific use case efficiently or else not bother + using msgpack-numpy. Note that numpy arrays deserialized by msgpack-numpy are read-only and must be copied if they are to be modified. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/msgpack_numpy.egg-info/SOURCES.txt new/msgpack-numpy-0.4.8/msgpack_numpy.egg-info/SOURCES.txt --- old/msgpack-numpy-0.4.7.1/msgpack_numpy.egg-info/SOURCES.txt 2020-09-30 23:22:59.000000000 +0200 +++ new/msgpack-numpy-0.4.8/msgpack_numpy.egg-info/SOURCES.txt 2022-06-09 05:42:59.000000000 +0200 @@ -1,11 +1,16 @@ +.gitignore +.travis.yml AUTHORS.md CHANGES.md LICENSE.md +Makefile README.md msgpack_numpy.py +requirements.txt setup.cfg setup.py tests.py +tox.ini msgpack_numpy.egg-info/PKG-INFO msgpack_numpy.egg-info/SOURCES.txt msgpack_numpy.egg-info/dependency_links.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/msgpack_numpy.py new/msgpack-numpy-0.4.8/msgpack_numpy.py --- old/msgpack-numpy-0.4.7.1/msgpack_numpy.py 2020-09-30 23:19:44.000000000 +0200 +++ new/msgpack-numpy-0.4.8/msgpack_numpy.py 2022-04-28 18:31:22.000000000 +0200 @@ -4,13 +4,14 @@ Support for serialization of numpy data types with msgpack. """ -# Copyright (c) 2013-2020, Lev E. Givon +# Copyright (c) 2013-2022, Lev E. Givon # All rights reserved. # Distributed under the terms of the BSD license: # http://www.opensource.org/licenses/bsd-license import sys import functools +import pickle import warnings import msgpack @@ -19,10 +20,14 @@ import numpy as np if sys.version_info >= (3, 0): - if sys.platform == 'darwin': - ndarray_to_bytes = lambda obj: obj.tobytes() - else: - ndarray_to_bytes = lambda obj: obj.data if obj.flags['C_CONTIGUOUS'] else obj.tobytes() + def ndarray_to_bytes(obj): + if obj.dtype == 'O': + return obj.dumps() + else: + if sys.platform == 'darwin': + return obj.tobytes() + else: + return obj.data if obj.flags['C_CONTIGUOUS'] else obj.tobytes() num_to_bytes = lambda obj: obj.data @@ -32,10 +37,14 @@ else: return str(x) else: - if sys.platform == 'darwin': - ndarray_to_bytes = lambda obj: obj.tobytes() - else: - ndarray_to_bytes = lambda obj: memoryview(obj.data) if obj.flags['C_CONTIGUOUS'] else obj.tobytes() + def ndarray_to_bytes(obj): + if obj.dtype == 'O': + return obj.dumps() + else: + if sys.platform == 'darwin': + return obj.tobytes() + else: + return memoryview(obj.data) if obj.flags['C_CONTIGUOUS'] else obj.tobytes() num_to_bytes = lambda obj: memoryview(obj.data) @@ -50,12 +59,13 @@ if isinstance(obj, np.ndarray): # If the dtype is structured, store the interface description; # otherwise, store the corresponding array protocol type string: - if obj.dtype.kind == 'V': - kind = b'V' + if obj.dtype.kind in ('V', 'O'): + kind = bytes(obj.dtype.kind, 'ascii') descr = obj.dtype.descr else: kind = b'' descr = obj.dtype.str + return {b'nd': True, b'type': descr, b'kind': kind, @@ -81,14 +91,18 @@ if obj[b'nd'] is True: # Check if b'kind' is in obj to enable decoding of data - # serialized with older versions (#20): + # serialized with older versions (#20) or data + # that had dtype == 'O' (#46): if b'kind' in obj and obj[b'kind'] == b'V': descr = [tuple(tostr(t) if type(t) is bytes else t for t in d) \ for d in obj[b'type']] + elif b'kind' in obj and obj[b'kind'] == b'O': + return pickle.loads(obj[b'data']) else: descr = obj[b'type'] - return np.frombuffer(obj[b'data'], - dtype=_unpack_dtype(descr)).reshape(obj[b'shape']) + return np.ndarray(buffer=obj[b'data'], + dtype=_unpack_dtype(descr), + shape=obj[b'shape']) else: descr = obj[b'type'] return np.frombuffer(obj[b'data'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/requirements.txt new/msgpack-numpy-0.4.8/requirements.txt --- old/msgpack-numpy-0.4.7.1/requirements.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/msgpack-numpy-0.4.8/requirements.txt 2020-12-22 05:08:34.000000000 +0100 @@ -0,0 +1,2 @@ +numpy>=1.9.0 +msgpack>=0.5.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/setup.py new/msgpack-numpy-0.4.8/setup.py --- old/msgpack-numpy-0.4.7.1/setup.py 2020-09-30 23:20:35.000000000 +0200 +++ new/msgpack-numpy-0.4.8/setup.py 2022-04-28 17:20:20.000000000 +0200 @@ -6,7 +6,7 @@ from setuptools import setup NAME = 'msgpack-numpy' -VERSION = '0.4.7.1' +VERSION = '0.4.8' AUTHOR = 'Lev E. Givon' AUTHOR_EMAIL = 'l...@columbia.edu' URL = 'https://github.com/lebedov/msgpack-numpy' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/tests.py new/msgpack-numpy-0.4.8/tests.py --- old/msgpack-numpy-0.4.7.1/tests.py 2020-09-16 14:43:27.000000000 +0200 +++ new/msgpack-numpy-0.4.8/tests.py 2022-04-28 17:30:55.000000000 +0200 @@ -188,6 +188,12 @@ assert_array_equal(x, x_rec) assert_equal(x.dtype, x_rec.dtype) + def test_numpy_array_object(self): + x = np.random.rand(5).astype(object) + x_rec = self.encode_decode(x) + assert_array_equal(x, x_rec) + assert_equal(x.dtype, x_rec.dtype) + def test_numpy_array_complex(self): x = (np.random.rand(5)+1j*np.random.rand(5)).astype(np.complex128) x_rec = self.encode_decode(x) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/msgpack-numpy-0.4.7.1/tox.ini new/msgpack-numpy-0.4.8/tox.ini --- old/msgpack-numpy-0.4.7.1/tox.ini 1970-01-01 01:00:00.000000000 +0100 +++ new/msgpack-numpy-0.4.8/tox.ini 2020-12-22 05:08:34.000000000 +0100 @@ -0,0 +1,8 @@ +[tox] +envlist = py{27,35,36,37,38} +recreate = True + +[testenv] +deps = + -r{toxinidir}/requirements.txt +commands = python tests.py