Add test for decimal; fails on Python 3
Involve the SimpleReduceHandler for decimal.Decimal. Fixes failing test.
Merge pull request #57 from jaraco/master

Use SimpleReduceHandler for decimal.Decimal on Python 3.
backend: allow disabling of the fallthrough-on-error behavior

By default, jsonpickle tries the next backend when decoding or
encoding using a backend fails.

This can make it difficult to force jsonpickle to use a specific
backend, and catch errors, because the error will be suppressed
and may not be raised by the subsequent backend.

Add an enable_fallthrough() option that allows us to disable
this behavior.

Signed-off-by: David Aguilar <davvid@gmail.com>
Added BaseHandler.handles to simplify declaration of handlers using decoration.
Use new 'handles' function for simpler usage
Merge pull request #58 from jaraco/handler-decorator

Implement a BaseHandler.handles decorator.
jsonpickle: honor __getstate__ and __setstate__ for dict subclasses

Rework the picklers so that the __getstate__ machinery is activated on
dict subclasses.  Add elaborate tests to ensure that it interacts
correctly with the referencing machinery.

Closes #59

Reported-by: @as45239 via github.com
Signed-off-by: David Aguilar <davvid@gmail.com>
changelog: mention the __getstate__ fix for dict subclass

Signed-off-by: David Aguilar <davvid@gmail.com>
handlers: use SimpleReduceHandler for collections.Counter

We were not handling collections.Counter objects.  Register the
SimpleReduceHandler for collections.Counter objects so that they can be
properly serialized.

Add unit tests to cover the keys={True,False} use cases.

Closes #62

Reported-by: Alex Raichev <alex@raichev.net>
Signed-off-by: David Aguilar <davvid@gmail.com>
tests: replace our single use of assertEquals with assertEqual

Signed-off-by: David Aguilar <davvid@gmail.com>
jsonpickle: support objects whose __getstate__() returns a list

Closes #65

Reported-by: @krzykro2 via github.com
Signed-off-by: David Aguilar <davvid@gmail.com>
doc: update v0.7.0 changelog

Signed-off-by: David Aguilar <davvid@gmail.com>
jsonpickle: add a "safe-mode" when decoding objects

Avoid usage of eval() when in safe mode.  We may later break backwards
compatibility and switch the default value of "safe" from False to True,
but for now we are simply making the new mode available.

Signed-off-by: David Aguilar <davvid@gmail.com>
jsonpickle v0.7.0

Signed-off-by: David Aguilar <davvid@gmail.com>
.travis.yml: avoid Python 3.2

"pip install" fails on Python 3.2 because simplejson does
not support Python < 3.3, and simplejson is used by pip.

Avoid travis build failures by excluding Python 3.2 from
the Travis CI builds.

jsonpickle itself *does* support Python 3.2 so setup.py
is intentionally left as-is.

Signed-off-by: David Aguilar <davvid@gmail.com>
jsonpickle: add support for Python 3.4

collections.OrderedDict has a different __reduce__()
representation on Python 3.4.

Add a custom handler to paper over differences in in the reduced
representation.  The OrderedDictReduceHandler produces a
compatible flattened output so that the on-disk representation
is consistent across python versions.

Closes #68

Reported-by: @Arfrever via github.com
Signed-off-by: David Aguilar <davvid@gmail.com>
Rakefile: add Python 3.4

Signed-off-by: David Aguilar <davvid@gmail.com>
.travis.yml: Travis CI does not yet support Python 3.4(?)

Signed-off-by: David Aguilar <davvid@gmail.com>
tests: add coverage for OrderedDict inside a dict with int keys

jsonpickle properly handles the case where an OrderedDict is
stored inside a dict with integer keys.  Add a unit test to
guarantee the behavior.

Closes #64

Reported-by: Alex Raichev <alex@raichev.net>
Signed-off-by: David Aguilar <davvid@gmail.com>