commit d932ea8b2eb3147861f6ff1da791177b9121b188cd394664712dde1430577474 Author: Todd R Date: Thu May 24 20:56:36 2018 +0000 Accepting request 612015 from devel:languages:python:misc Python library for serializing any arbitrary object graph into JSON OBS-URL: https://build.opensuse.org/request/show/612015 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpickle?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/jsonpickle-0.9.6.tar.gz b/jsonpickle-0.9.6.tar.gz new file mode 100644 index 0000000..a05e0a6 --- /dev/null +++ b/jsonpickle-0.9.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:545b3bee0d65e1abb4baa1818edcc9ec239aa9f2ffbfde8084d71c056180054f +size 67137 diff --git a/python-jsonpickle.changes b/python-jsonpickle.changes new file mode 100644 index 0000000..9d6df85 --- /dev/null +++ b/python-jsonpickle.changes @@ -0,0 +1,186 @@ +------------------------------------------------------------------- +Wed May 23 04:19:13 UTC 2018 - toddrme2178@gmail.com + +- Update to version 0.9.6 + * Better support for SQLAlchemy (#180). + * Better support for NumPy and SciKit-Learn. (#184). +- Update to version 0.9.5 + * Better support for objects that implement the reduce protocol. (#170). +- Remove no longer relevant handle_more_than_two_args.patch +- Spec file cleanups + +------------------------------------------------------------------- +Wed Apr 26 03:51:53 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. +- Fix source URL. +- Update to Version 0.9.4 + * Arbitrary byte streams are now better supported. + (`#143 `_). + * Better support for NumPy data types. The Python3 NumPy support + is especially robust. + * Fortran-ordered based NumPy arrays are now properly serialized. +- Update to Version 0.9.3 + * UUID objects can now be serialized + (`#130 `_). + * Added `set_decoder_options` method to allow decoder specific options + equal to `set_encoder_options`. + * Int keys can be encoded directly by e.g. demjson by passing + `numeric_keys=True` and setting its backend options via + `jsonpickle.set_encoder_options('demjson', strict=False)`. + * Newer Numpy versions (v1.10+) are now supported. +- Update to Version 0.9.2 + * Fixes for serializing objects with custom handlers. + * We now properly serialize deque objects constructed with a `maxlen` parameter. + * Test suite fixes +- Update to Version 0.9.1 + * Support datetime objects with FixedOffsets. +- Update to Version 0.9.0 + * Support for Pickle Protocol v4. + * We now support serializing defaultdict subclasses that use `self` + as their default factory. + * We now have a decorator syntax for registering custom handlers, + and allow custom handlers to register themselves for all subclasses. + (`#104 `_). + * We now support serializing types with metaclasses and their + instances (e.g., Python 3 `enum`). + * We now support serializing bytestrings in both Python 2 and Python 3. + In Python 2, the `str` type is decoded to UTF-8 whenever possible and + serialized as a true bytestring elsewise; in Python 3, bytestrings + are explicitly encoded/decoded as bytestrings. Unicode strings are + always encoded as is in both Python 2 and Python 3. + * Added support for serializing numpy arrays, dtypes and scalars + (see `jsonpickle.ext.numpy` module). +- Update to Version 0.8.0 + * We now support serializing objects that contain references to + module-level functions + (`#77 `_). + * Better Pickle Protocol v2 support + (`#78 `_). + * Support for string __slots__ and iterable __slots__ + (`#67 `_) + (`#68 `_). + * `encode()` now has a `warn` option that makes jsonpickle emit warnings + when encountering objects that cannot be pickled. + * A Javascript implementation of jsonpickle is now included + in the jsonpickleJS directory. +- Update to Version 0.7.2 + * We now properly serialize classes that inherit from classes + that use `__slots__` and add additional slots in the derived class. + * jsonpickle can now serialize objects that implement `__getstate__()` but + not `__setstate__()`. The result of `__getstate__()` is returned as-is + when doing a round-trip from Python objects to jsonpickle and back. + * Better support for collections.defaultdict with custom factories. + * Added support for `queue.Queue` objects. +- Update to Version 0.7.1 + * Added support for Python 3.4. + * Added support for :class:`posix.stat_result`. +- Update to Version 0.7.0 + * Added ``handles`` decorator to :class:`jsonpickle.handlers.BaseHandler`, + enabling simple declaration of a handler for a class. + * `__getstate__()` and `__setstate__()` are now honored + when pickling objects that subclass :class:`dict`. + * jsonpickle can now serialize :class:`collections.Counter` objects. + * Object references are properly handled when using integer keys. + * Object references are now supported when using custom handlers. + * Decimal objects are supported in Python 3. + * jsonpickle's "fallthrough-on-error" behavior can now be disabled. + * Simpler API for registering custom handlers. + * A new "safe-mode" is provided which avoids eval(). + Backwards-compatible deserialization of repr-serialized objects + is disabled in this mode. e.g. `decode(string, safe=True)` +- Update to Version 0.6.1 + * Python 3.2 support, and additional fixes for Python 3. +- Update to Version 0.6.0 + * Python 3 support! + * :class:`time.struct_time` is now serialized using the built-in + :class:`jsonpickle.handlers.SimpleReduceHandler`. +- Update to Version 0.5.0 + * Non-string dictionary keys (e.g. ints, objects) are now supported + by passing `keys=True` to :func:`jsonpickle.encode` and + :func:`jsonpickle.decode`. + * We now support namedtuple, deque, and defaultdict. + * Datetimes with timezones are now fully supported. + * Better support for complicated structures e.g. + datetime inside dicts. + * jsonpickle added support for references and cyclical data structures + in 0.4.0. This can be disabled by passing `make_refs=False` to + :func:`jsonpickle.encode`. +- Add handle_more_than_two_args.patch + Needed for python 3.6 compatibility. Note that only the first + part of the upstream patch is used. The second part is travis CI + changes. + +------------------------------------------------------------------- +Mon Jun 17 09:17:39 UTC 2013 - speilicke@suse.com + +- Buildrequire python-simplejson to fix unit tests +- Recommend simplejson instead of demjson (moved to suggests) + +------------------------------------------------------------------- +Tue May 21 12:35:14 UTC 2013 - speilicke@suse.com + +- Drop requirement on simplejson, the json module is part of Python-2.6 +- feedparser runtime requirement was bogus +- Only suggest demjson and recommend yajl / jsonlib experimental bindings + +------------------------------------------------------------------- +Fri Sep 23 13:14:31 UTC 2011 - saschpe@suse.de + +- Update to version 0.4.0: + * Switch build from setuptools to distutils + * Consistent dictionary key ordering + * Fix areas with improper support for unpicklable=False + * Added support for cyclical data structures (#16). + * Experimental support for jsonlib and py-yajl backends. + * New contributers David K. Hess and Alec Thomas +- Set license to BSD-3-Clause (SPDX style) +- Run testsuite and added needed (Build)Requires + +------------------------------------------------------------------- +Mon Dec 14 19:57:37 UTC 2009 - jfunk@funktronics.ca + +- Update to 0.3.1 + - Include tests and docs directories in sdist for distribution packages. +- Version 0.3.0 - December 11, 2009 + - Officially migrated to git from subversion. Project home now at + http://jsonpickle.github.com/. Thanks to Michael Jone’s sphinx-to-github. + - Fortified jsonpickle against common error conditions. + - Added support for: + - List and set subclasses. + - Objects with module references. + - Newstyle classes with __slots__. + - Objects implementing __setstate__() and __getstate__() (follows the + pickle protocol). + - Improved support for Zope objects via pre-fetch. + - Support for user-defined serialization handlers via the + jsonpickle.handlers registry. + - Removed cjson support per John Millikin’s recommendation. + - General improvements to style, including PEP 257 compliance and refactored + project layout. + - Steps towards Python 2.3 and Python 3 support. + - New contributors Dan Buch and Ian Schenck. + - Thanks also to Kieran Darcy, Eoghan Murray, and Antonin Hildebrand for + their assistance! +- Version 0.2.0 - January 10, 2009 + - Support for all major Python JSON backends (including json in Python 2.6, + simplejson, cjson, and demjson) + - Handle several datetime objects using the repr() of the objects (Thanks to + Antonin Hildebrand). + - Sphinx documentation + - Added support for recursive data structures + - Unicode dict-keys support + - Support for Google App Engine and Django + - Tons of additional testing and bug reports (Antonin Hildebrand, Sorin, + Roberto Saccon, Faber Fedor, FirePython, and Joose) +- Version 0.1.0 - August 21, 2008 + - Added long as basic primitive (thanks Adam Fisk) + - Prefer python-cjson to simplejson, if available + - Major API change, use python-cjson’s decode/encode instead of simplejson’s + load/loads/dump/dumps + - Added benchmark.py to compare simplejson and python-cjson + +------------------------------------------------------------------- +Mon Aug 11 2008 - jfunk@funktronics.ca + +- Initial release diff --git a/python-jsonpickle.spec b/python-jsonpickle.spec new file mode 100644 index 0000000..0573d1c --- /dev/null +++ b/python-jsonpickle.spec @@ -0,0 +1,76 @@ +# +# spec file for package python-jsonpickle +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-jsonpickle +Version: 0.9.6 +Release: 0 +Url: http://jsonpickle.github.com/ +Summary: Python library for serializing any arbitrary object graph into JSON +License: BSD-3-Clause +Group: Development/Languages/Python +Source: https://files.pythonhosted.org/packages/source/j/jsonpickle/jsonpickle-%{version}.tar.gz +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +# SECTION test requirements +BuildRequires: %{python_module SQLAlchemy} +BuildRequires: %{python_module nose} +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pymongo} +# /SECTION +# SECTION python 2 test requirements +BuildRequires: python-enum34 +# /SECTION +Recommends: python-simplejson +Suggests: python-demjson +Suggests: python-ujson +Suggests: python-yajl +# SECTION python 2 requirements +Suggests: python-feedparser +Suggests: python-jsonlib +BuildArch: noarch +# /SECTION +%python_subpackages + +%description +Python library for serializing any arbitrary object graph into JSON. +It can take almost any Python object and turn the object into JSON. +Additionally, it can reconstitute the object back into Python. + +%prep +%setup -q -n jsonpickle-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_expand nosetests-%{$python_bin_suffix} + +%files %{python_files} +%doc README.rst +%license COPYING +%{python_sitelib}/* + +%changelog