New issue 173 by daevaorn: Drop package simplejson dependency
http://code.google.com/p/couchdb-python/issues/detail?id=173
setup.py for python version below 2.6 forces `simplejson` dependency. In
some use cases there can be 2.5 version and for example `cjson` instead of
`simplejson`.
Patch is attached.
Attachments:
drop-simplejson-dependency.diff 729 bytes
This patch will make couchdb-python package broken for pure 2.4 and 2.5
python installations which are announced as supported. If things are going
in this way, so may be refactoring whole project is better to use all
features of python 2.6 instead of removing one dependency?
Yeah, I wouldn't want to take it like this. On the other hand, we can try
to detect a cjson installation and not require simplejson if cjson is
installed.
Package will not be broken. It will install nice and the some
sub-components will even working (I use `couchdb.mapping` as wrapper for
MongoDB objects which requirs no json library at all).
We can refactor `couchdb.json` module to perform more smart library
discovery and helpful error message if no one is available.
I think the expectation should still be that major functionality like the
stuff in the client module also works when couchdb-python is installed, so
there should at least be some JSON available, whether it's stdlib json,
simplejson or cjson. I'm not sure why you're so keen on getting the
dependency removed, but we're not going to take your patch as-is.