Moving to cloudant library - #24
Conversation
| else: | ||
| self.res = self.resource_class(uri, **client_opts) | ||
| self._uuids = deque() | ||
| self.cloudant_client = CouchDB('', '', url=uri, admin_party=True, connect=True) |
There was a problem hiding this comment.
I'm curious why use admin_party=True? Does this change the auth mode of the database to admin party?
There was a problem hiding this comment.
The url is passed in with the username/pass already in the uri. I think that was a temporary workaround since i'll need to change the way that's called
|
👏 |
| with-coverage=1 | ||
| cover-package=couchdbkit | ||
| # with-coverage=1 | ||
| # cover-package=couchdbkit |
There was a problem hiding this comment.
Is this just disabling coverage tracking? Any particular reason?
There was a problem hiding this comment.
Think that was just a local thing. I'll add it back before taking off open for review
| db = self.Server.create_db('couchdbkit_test') | ||
| res = db.set_security({"meta": "test"}) | ||
| self.assert_(res['ok'] == True) | ||
| del self.Server['couchdbkit_test'] |
There was a problem hiding this comment.
any particular reason this test is being removed?
There was a problem hiding this comment.
I thikn this was because it doesn't work with couch2 #26
| raise | ||
| raise ResourceConflict | ||
|
|
||
| res = deepcopy(couch_doc) |
There was a problem hiding this comment.
This can be slow for large objects. Is there a more surgical method (copying less of the object) that could be used to avoid this?
|
The last commit doesn't actually work, and I feel a little unsure of the last 3 (all dealing with attachments). Going to be breaking up this PR into smaller more easily understood ones |
|
closing this one in favor of #29 |
I started looking at this while I was in India, but never got around to submitting it.
The reason for doing this is that the cloudant library uses requests and supports python3. I've looked into moving restkit and couchdbkit to python3, but because it uses it's own socket library (socketpool), it's going to take a decent amount of work to get bytes and strings working correctly. Another plus is that anything we want in restkit/couchdbkit, we will have to do on our own vs cloudant has an obvious financial reason to keep their library up to date.
Just opening this up to see what you guys think of this approach. I'll also need to go back and check my work, but I think most of this should just work.
@dannyroberts ( i think you've done the most work on this lib)
@millerdev @nickpell (py3)
@mkangia (buddy)