Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
504c4fe
have DocumentSchema use jsonobject
dannyroberts Aug 19, 2013
514f91d
fix save
dannyroberts Aug 21, 2013
55d47d3
use jsonobject.exceptions.BadValueError
dannyroberts Aug 21, 2013
2bcd3f3
use exclude_if_none instead of removing from doc in to_json()
dannyroberts Aug 21, 2013
98f47f3
remove support for clone()
dannyroberts Aug 21, 2013
761aa8f
use _validate_lazily
dannyroberts Aug 22, 2013
cbfe07a
change tests i do not like
dannyroberts Aug 22, 2013
3776f70
use jsonobject SetProperty
dannyroberts Aug 23, 2013
1eaa0e1
rename _validate_lazily to _validate_required_lazily
dannyroberts Aug 23, 2013
ed205c3
fix DocumentBase.save
dannyroberts Aug 23, 2013
e9956d7
use jsonobject's DecimalProperty and TimeProperty
dannyroberts Aug 23, 2013
b76ea1d
fix ProxyDict
dannyroberts Aug 23, 2013
ae953ec
remove support for creating schemas as instances of DocumentSchema
dannyroberts Aug 23, 2013
6e4dcd9
remove support for using schema instance as item_type
dannyroberts Aug 23, 2013
34cfc62
change error message expected in test
dannyroberts Aug 23, 2013
3dcf4fe
finish fixing a test
dannyroberts Aug 23, 2013
7eb4208
change tests to expect validate to return None
dannyroberts Aug 23, 2013
d6378bb
change tests to expect adding the wrong type of element to a typed co…
dannyroberts Aug 23, 2013
8aff64d
change tests to expect containers to normalize their values eagerly
dannyroberts Aug 23, 2013
56d3549
expose ALLOWED_PROPERTY_TYPES back
dannyroberts Aug 24, 2013
f474698
raise AttributeError on __getitem__
dannyroberts Aug 24, 2013
a7a56d2
have Lazy{Dict,List,Set} point to Json{Dict,Array,Set}
dannyroberts Aug 25, 2013
fbe0aa8
expose dynamic_properties()
dannyroberts Aug 26, 2013
d121fd7
have _attachment default to None
dannyroberts Aug 26, 2013
31d27d3
allow to delete properties from document._doc
dannyroberts Aug 26, 2013
e5e7761
update doc manually on save (doc.update has been removed)
dannyroberts Aug 27, 2013
c6699e1
fix ProxyDict behavior to call super and to define __delitem__ not __…
dannyroberts Aug 27, 2013
0e791a2
add __copy__ to ProxyDict
dannyroberts Aug 27, 2013
3c7b647
WIP
dannyroberts Aug 27, 2013
97739b6
clean up properties.py
dannyroberts Aug 28, 2013
5a792ae
add jsonobject dependency
dannyroberts Aug 28, 2013
be72d9e
Merge branch 'wrapper' into jsonobject
dannyroberts Sep 1, 2013
0e7ecc3
add back _doc_type_attr feature
dannyroberts Sep 1, 2013
337f1cf
fix tests for python 2.6
dannyroberts Sep 2, 2013
e12e556
Merge branch 'master' into jsonobject
dannyroberts Sep 13, 2013
06457fa
Merge branch 'lenient-wrapping' into jsonobject
dannyroberts Sep 13, 2013
8fbcce4
Merge branch 'master' into jsonobject
dannyroberts Sep 27, 2013
0457043
Merge branch 'get_test_db_name' into jsonobject
dannyroberts Sep 27, 2013
91bb8e0
set up for pypi jsonboject-couchdbkit
dannyroberts Oct 1, 2013
109b241
update readme
dannyroberts Oct 1, 2013
2066474
declare that jsonobject-couchdbkit provides couchdbkit so it does not…
dannyroberts Oct 6, 2013
94587ca
bump version to 0.6.5.1
dannyroberts Oct 6, 2013
9dab888
declare that jsonobject-couchdbkit obsoletes couchdbkit so both canno…
dannyroberts Oct 6, 2013
7e8450b
bump version to 0.6.5.2
dannyroberts Oct 6, 2013
3bbd1ec
update jsonobject ref for precise datetimes
dannyroberts Nov 3, 2013
5317991
fix tests to reflect precise datetimes
dannyroberts Nov 1, 2013
8f30aec
Merge pull request #3 from dannyroberts/precise-datetime
dannyroberts Nov 3, 2013
19ea58d
update version
dannyroberts Nov 3, 2013
306a5b4
Revert "Merge pull request #3 from dannyroberts/precise-datetime"
dannyroberts Feb 3, 2014
a652891
bump version
dannyroberts Feb 3, 2014
0994bbd
use jsonobject>=0.4.0, bump version to 0.6.5.5
dannyroberts Apr 9, 2014
efe6ea5
Merge branch 'master' into jsonobject
dannyroberts Sep 8, 2014
6318527
change tests to reflect minor change in error message
dannyroberts Sep 9, 2014
1216355
make changes to accomodate jsonobject type config changes
dannyroberts Sep 8, 2014
30cf2b9
update jsonobject requirement
dannyroberts Sep 8, 2014
f2cfeea
change jsonobject version to 0.6.0b1
dannyroberts Sep 9, 2014
f0c5332
drop support for python 2.6
dannyroberts Sep 9, 2014
3d7c49b
Merge pull request #3 from dimagi/jsonobject-type-config
millerdev Sep 10, 2014
268b2f6
update version to 0.6.5.6.b1
dannyroberts Sep 12, 2014
fc4739f
fix for jsonobject==0.6.0.b2
dannyroberts Oct 3, 2014
6b106b5
Merge pull request #5 from dimagi/jsonobject-0.6.5.6.b2
czue Oct 3, 2014
5dd4d31
release 0.6.5.6
dannyroberts Oct 15, 2014
4aa8251
Merge pull request #6 from dimagi/release-0.6.5.6
czue Oct 15, 2014
366c09d
Update README.rst
emord Jul 17, 2015
aaad2ed
Merge pull request #7 from snopoke/patch-1
emord Jul 17, 2015
8eade7f
Bump version
emord Jul 17, 2015
7a0a374
Merge pull request #8 from dimagi/emord-patch-1
dannyroberts Jul 17, 2015
63dabff
SortedDict -> OrderedDict
Aug 28, 2015
cce58bc
require python 2.7
Aug 28, 2015
91e796a
Merge pull request #9 from dimagi/django18
dannyroberts Aug 28, 2015
b243233
version 0.7.0
Aug 31, 2015
568253e
make logging its own module
czue Sep 18, 2015
94f7178
expose logger object
czue Sep 18, 2015
c822ff7
add request logger and log requests
czue Sep 18, 2015
0ac5d9b
bump version number
czue Sep 18, 2015
1072443
fix end_time reference in error cases
czue Sep 18, 2015
491c4a0
Merge pull request #10 from dimagi/request-logging
snopoke Sep 20, 2015
c3d7696
remove redundant assignment
czue Sep 20, 2015
1d02d66
Merge pull request #11 from dimagi/request-logging
dannyroberts Sep 20, 2015
7485c88
log bulk save errors
snopoke Sep 25, 2015
9710934
Merge pull request #12 from dimagi/log-error
czue Sep 28, 2015
85fcbd9
Add support for abstract meta property for mixins
millerdev Nov 19, 2015
2ef1913
Merge pull request #13 from dimagi/meta-abstract
dannyroberts Nov 20, 2015
efb8f59
Bump version to 0.7.1.0
millerdev Nov 20, 2015
5b9e30c
Add Document.bulk_delete, analagous to bulk_save
esoergel Feb 1, 2016
dab2b27
bump version number to update via pip
esoergel Feb 1, 2016
a501109
Finish docstring
esoergel Feb 2, 2016
00396bf
Check that both docs are deleted
esoergel Feb 2, 2016
54a1154
Merge pull request #14 from dimagi/bulk-delete
dannyroberts Feb 2, 2016
50a9789
making sure doc list for bulk save is accessable by index
calellowitz Mar 23, 2016
116f2de
moving indexing check to inside save_docs
calellowitz Mar 23, 2016
d380cd7
using actual classes instead of strings
calellowitz Mar 23, 2016
c991288
Merge pull request #16 from dimagi/doc-list
esoergel Mar 23, 2016
75e678a
Do not propagate Meta.abstract to subclasses
millerdev Apr 14, 2016
7aa640f
Bump version
millerdev Apr 14, 2016
a5ca5ea
Merge pull request #17 from dimagi/fix-meta-abstract
dannyroberts Apr 19, 2016
9c91b29
use post_migrate for django 1.7
Sep 1, 2016
5870146
bump version
Sep 1, 2016
182e98a
get rid of removed --use-mirrors flag
Sep 2, 2016
6ce34fa
Merge pull request #18 from dimagi/np/django19
dannyroberts Sep 2, 2016
f795498
remove legacy (and unused) arg
snopoke Sep 18, 2016
f3df1a9
Merge pull request #19 from dimagi/sk/django-1.7-fix
czue Sep 19, 2016
baebe12
bump version
snopoke Sep 19, 2016
7299367
drop support for django < 1.7
snopoke Sep 19, 2016
0b44d2d
Merge pull request #20 from dimagi/sk/django-1.7
calellowitz Sep 20, 2016
17806bc
add more info to request logging
snopoke Oct 12, 2016
3ac8ffc
bump version
snopoke Oct 12, 2016
4f381f5
Merge pull request #21 from dimagi/sk/extra-debug
czue Oct 12, 2016
d12562a
add database name to request logger
snopoke May 4, 2017
5a3bd2e
bump version
snopoke May 4, 2017
4435217
Merge pull request #22 from dimagi/sk/log-db
May 4, 2017
590c300
only push docs if there are changes
snopoke Nov 8, 2017
6a87d1b
test against couch 2
emord Nov 9, 2017
a2df967
Update git ignore
emord Nov 10, 2017
084e4d5
couch 2 doesn't support all_or_nothing
emord Nov 10, 2017
11b3bf4
Couch 2 doesn't have temp views.
emord Nov 10, 2017
25755b4
couch 2 has different seq numbers
emord Nov 10, 2017
4164e75
Reduce nodes to 1 because 'eventual consistency'
emord Nov 10, 2017
bc29bdf
Merge pull request #25 from dimagi/sk/sync
snopoke Nov 13, 2017
136f531
test whitespace
emord Nov 13, 2017
8544e94
add doc conflict test
emord Nov 13, 2017
f7f8e2d
Merge pull request #26 from emord/je/couch-2
snopoke Nov 17, 2017
35601e5
Bump version to 0.9.0.0
emord Nov 17, 2017
e4f4ad8
Merge pull request #27 from emord/je/bump-version
emord Nov 17, 2017
990835b
we don't use mercuruial
emord Sep 17, 2017
238c777
Don't use file
emord Nov 17, 2017
3da3589
Added cloudant's couch library.
emord Sep 17, 2017
9360e45
Merge pull request #28 from emord/je/cleanup
emord Nov 20, 2017
952f042
Added six as dependency.
emord Nov 17, 2017
998744b
add couchdb server
emord Sep 17, 2017
1f5d0b6
Some cloudant endpoints
emord Sep 17, 2017
69b845d
More cloudant lib stuff
emord Sep 17, 2017
8cbcb10
more cloudant
emord Sep 17, 2017
1a4890b
open_doc uses cloudant
emord Sep 18, 2017
19a325d
cloudant ensure full commit
emord Nov 17, 2017
506a327
save_doc(s) uses cloudant lib
emord Nov 17, 2017
9f4451c
Fix importer lint
emord Nov 17, 2017
3ea6072
cloudant lib get rev
emord Nov 17, 2017
79d9539
delete doc cloudant lib
emord Nov 17, 2017
8bf4554
raise for status
emord Nov 17, 2017
158d952
cloudant lib copy doc
emord Nov 17, 2017
d4673d9
Removed unittest2.
emord Nov 20, 2017
0cd9fa1
Merge pull request #30 from emord/je/remove-unittest
nickpell Nov 20, 2017
db08de1
Merge pull request #29 from emord/je/cloudant-lib-pt1
nickpell Nov 21, 2017
bb68b30
python-modernize . -w
Feb 8, 2018
04ce94f
keep using the filter keyword
Feb 8, 2018
880c0cd
don't use octal
Feb 8, 2018
02e47e6
Merge pull request #31 from dimagi/np/py3
nickpell Feb 9, 2018
26c2744
bump to version 0.9.0.1
Jun 21, 2018
38d965f
try pinning requests
Jun 22, 2018
35eedb5
pin jsonobject
Jun 22, 2018
4eb140c
Revert "try pinning requests"
Jun 22, 2018
cc05490
jsonobject to 0.9.0
Jun 22, 2018
e369620
modify test
Jun 22, 2018
511521f
update to latest jsonobject
Jun 22, 2018
d788ec1
Merge pull request #34 from nickpell/np/0.9.0.1
nickpell Jun 25, 2018
131b16d
raise ResourceNotFound when deleting database raises CloudantClientEx…
Jun 30, 2018
6dd4a69
preserve exception message
Jul 5, 2018
cd735f3
Merge pull request #37 from dimagi/np/ResourceNotFound
nickpell Jul 5, 2018
dd27077
open_doc should return a dict, not a cloudant Document
Jul 6, 2018
9546b72
use dict instead of json.loads
Jul 6, 2018
6891145
Merge pull request #38 from dimagi/np/open_doc-dict
nickpell Jul 6, 2018
6503264
raise ResourceNotFound in get_rev if document is not found
Jul 6, 2018
7b20d36
bump version
Jul 6, 2018
4ed3820
use try-except
Jul 6, 2018
0a1d9dd
Merge pull request #39 from dimagi/np/rev-404
nickpell Jul 6, 2018
1ac374d
include reason in ResourceNotFound
Jul 6, 2018
7095db4
bump version
Jul 6, 2018
4c40bdc
Merge pull request #40 from dimagi/np/missing
nickpell Jul 6, 2018
9f9f919
make save_doc keep the same return values
Jul 6, 2018
0e7477b
bump version
Jul 6, 2018
9a64497
Merge pull request #41 from dimagi/np/save_doc
nickpell Jul 6, 2018
fb7f92e
allow getting attachments with doc.get(doc_id, attachments=True)
Jul 10, 2018
77eb658
bump version
Jul 10, 2018
9fe30a4
Merge pull request #42 from dimagi/np/attachments
nickpell Jul 10, 2018
35bb5a5
remove prefix 'W/"' from _rev
Jul 11, 2018
6f0e215
bump version
Jul 11, 2018
af2c366
use lstrip
Jul 12, 2018
74cd0a7
add comment
Jul 12, 2018
9e1b698
Merge pull request #43 from dimagi/np/fix-get_rev
nickpell Jul 12, 2018
6444260
make sure that attempting to save a document after deletion raises Re…
Jul 12, 2018
3909a0b
maintain behavior of raising ResourceConflict when attempting to dele…
Jul 12, 2018
c331469
bump version
Jul 12, 2018
010df95
Merge pull request #44 from dimagi/np/maintain-behavior
nickpell Jul 12, 2018
9167e4e
raise ResourceNotFound when trying to delete an already deleted doc
Jul 16, 2018
6df4106
bump version
Jul 16, 2018
7ca786e
Merge pull request #45 from dimagi/np/raise-ResourceNotFound
nickpell Jul 16, 2018
05d9d6b
WSGI is unused
emord Mar 18, 2018
24dcd3e
bump version
Jul 17, 2018
bfbbf2e
bump to 0.9.1
Jul 17, 2018
0c2d6a4
Merge pull request #35 from dimagi/np/remove-restkit
nickpell Jul 17, 2018
e074e00
Make sure a wheel file shows up on pypi
pr33thi Jul 20, 2018
4e31022
Use list comprehension to get version number
pr33thi Jul 20, 2018
d3af5bf
Bump version
pr33thi Jul 20, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ couchdbkit.egg-info
dist/
doc/_build/
distribute-*
data
jsonobject_couchdbkit.egg-info
20 changes: 0 additions & 20 deletions .hgignore

This file was deleted.

38 changes: 0 additions & 38 deletions .hgtags

This file was deleted.

28 changes: 21 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
language: python

services:
- couchdb
- docker

python:
- 2.6
- 2.7
python: 2.7

install:
- pip install -r requirements_dev.txt
- python setup.py install

before_script:
- "docker run -d --name couchdb-cluster \
-p 5984:5984 \
-v $(pwd)/data:/usr/src/couchdb/dev/lib/ \
klaemo/couchdb:2.0-dev \
--with-admin-party-please \
--with-haproxy
-n 1"
- |
while :
do
curl http://localhost:5984/${db_name} -sv 2>&1 | grep '^< HTTP/.* 200 OK' && break || continue
sleep 1
done

install:
- pip install -r requirements_dev.txt --use-mirrors
- python setup.py install

script: python setup.py test
9 changes: 9 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
About the jsonobject fork of couchdbkit
---------------------------------------
`jsonobject-couchdbkit`_ is a fork of couchdbkit that replaces couchdbkit.schema
with a thin wrapper around jsonobject
(which was, incidentally, written as a **way** faster replacement
for couchdbkit.schema.) See `jsonobject`_.

About
-----

Expand Down Expand Up @@ -155,6 +162,8 @@ greets::

greets = Greeting.view('greeting/all')

.. _jsonobject-couchdbkit: https://github.com/dimagi/couchdbkit/tree/jsonobject
.. _jsonobject: http://github.com/dimagi/jsonobject
.. _Couchdbkit: http://couchdbkit.org
.. _API: http://couchdbkit.org/doc/api/
.. _couchapp: http://github.com/couchapp/couchapp/tree/
30 changes: 2 additions & 28 deletions couchdbkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,11 @@
Property, IntegerProperty, DecimalProperty, BooleanProperty, FloatProperty, StringProperty,
DateTimeProperty, DateProperty, TimeProperty,
dict_to_json, dict_to_json, dict_to_json,
value_to_python, dict_to_python,
dict_to_python,
DocumentSchema, DocumentBase, Document, StaticDocument, contain,
QueryMixin, AttachmentMixin,
SchemaProperty, SchemaListProperty, SchemaDictProperty,
ListProperty, DictProperty, StringDictProperty, StringListProperty, SetProperty
)

import logging

LOG_LEVELS = {
"critical": logging.CRITICAL,
"error": logging.ERROR,
"warning": logging.WARNING,
"info": logging.INFO,
"debug": logging.DEBUG
}

def set_logging(level, handler=None):
"""
Set level of logging, and choose where to display/save logs
(file or standard output).
"""
if not handler:
handler = logging.StreamHandler()

loglevel = LOG_LEVELS.get(level, logging.INFO)
logger = logging.getLogger('couchdbkit')
logger.setLevel(loglevel)
format = r"%(asctime)s [%(process)d] [%(levelname)s] %(message)s"
datefmt = r"%Y-%m-%d %H:%M:%S"

handler.setFormatter(logging.Formatter(format, datefmt))
logger.addHandler(handler)

from .logging import (LOG_LEVELS, set_logging, logger)
Loading