Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 5c50e60

Browse files
committed
Correctly specify custom JSON encoder
Fixes #282.
1 parent 7372c3c commit 5c50e60

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
2.5.0 (Unreleased)
22
==================
3+
- [FIXED] Fixed ``TypeError`` when setting revision limits on Python>=3.6.
34

45
2.4.0 (2017-02-14)
56
==================

src/cloudant/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ def set_revision_limit(self, limit):
758758
"""
759759
url = posixpath.join(self.database_url, '_revs_limit')
760760

761-
resp = self.r_session.put(url, data=json.dumps(limit, self.client.encoder))
761+
resp = self.r_session.put(url, data=json.dumps(limit, cls=self.client.encoder))
762762
resp.raise_for_status()
763763

764764
return resp.json()

0 commit comments

Comments
 (0)