[PYCBC-236] Interleaved streaming views + get causes crash Created: 06/Mar/14  Updated: 19/May/14  Resolved: 07/Mar/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Bug Priority: Blocker
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File repro.py    
Issue Links:
Gantt: start-finish

 Comments   
Comment by Mark Nunberg [ 06/Mar/14 ]
File to reproduce
Comment by Mark Nunberg [ 06/Mar/14 ]
Calling wait on __fetch
Returning 72 rows..
Callback called 72 times
Calling wait on __fetch
Returning 796 rows..
Callback called 868 times
Calling wait on __fetch
Returning 6358 rows..
Callback called 7226 times
Calling wait on __fetch
Returning 50916 rows..
Callback called 58142 times
Insufficient row data..
NData: 35
Got complete callback with 120000 rows
Callback invoked 120001 total times
query users=10000
query users=20000
query users=30000
query users=40000
query users=50000
total users=58142
total rows=120000
Comment by Mark Nunberg [ 06/Mar/14 ]
http://review.couchbase.org/#/c/34249/




[PYCBC-160] Provide link to Item API info for all multi methods Created: 24/Jul/13  Updated: 14/Aug/13  Resolved: 14/Aug/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: apidocs
Affects Version/s: 1.1.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Task Priority: Blocker
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-183] Cannot run on PyPy Created: 06/Sep/13  Updated: 06/Sep/13  Resolved: 06/Sep/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0.0
Fix Version/s: None
Security Level: Public

Type: Task Priority: Blocker
Reporter: Jai Gupta Assignee: Mark Nunberg
Resolution: Duplicate Votes: 0
Labels: pypy
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: PyPy 2.0.2 with GCC 4.4.7 20120313 (Red Hat 4.4.7-3)

Issue Links:
Duplicate
duplicates PYCBC-144 Support PyPy In Progress

 Description   
Cannot run on PyPy.
--------------------------
Installation looks good.

(pypy)[root@l ~]# pip install couchbase
Downloading/unpacking couchbase
  Downloading couchbase-1.0.0.tar.gz (140kB): 140kB downloaded
  Running setup.py egg_info for package couchbase
    
Installing collected packages: couchbase
  Running setup.py install for couchbase
    building 'couchbase._libcouchbase' extension
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/argument.c -o build/temp.linux-x86_64-2.7/src/argument.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/exceptions.c -o build/temp.linux-x86_64-2.7/src/exceptions.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/ext.c -o build/temp.linux-x86_64-2.7/src/ext.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/result.c -o build/temp.linux-x86_64-2.7/src/result.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/opresult.c -o build/temp.linux-x86_64-2.7/src/opresult.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/callbacks.c -o build/temp.linux-x86_64-2.7/src/callbacks.o
    src/callbacks.c: In function 'get_common_objects':
    src/callbacks.c:148: warning: implicit declaration of function 'PyErr_WarnExplicit'
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/convert.c -o build/temp.linux-x86_64-2.7/src/convert.o
    src/convert.c: In function 'encode_common':
    src/convert.c:100: warning: implicit declaration of function 'PyByteArray_Check'
    src/convert.c:146: warning: implicit declaration of function 'PyByteArray_AS_STRING'
    src/convert.c:146: warning: assignment makes pointer from integer without a cast
    src/convert.c:147: warning: implicit declaration of function 'PyByteArray_GET_SIZE'
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/connection.c -o build/temp.linux-x86_64-2.7/src/connection.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/store.c -o build/temp.linux-x86_64-2.7/src/store.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/constants.c -o build/temp.linux-x86_64-2.7/src/constants.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/multiresult.c -o build/temp.linux-x86_64-2.7/src/multiresult.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/miscops.c -o build/temp.linux-x86_64-2.7/src/miscops.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/typeutil.c -o build/temp.linux-x86_64-2.7/src/typeutil.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/oputil.c -o build/temp.linux-x86_64-2.7/src/oputil.o
    src/oputil.c: In function 'pycbc_oputil_check_sequence':
    src/oputil.c:198: warning: implicit declaration of function 'PyByteArray_Check'
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/get.c -o build/temp.linux-x86_64-2.7/src/get.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/arithmetic.c -o build/temp.linux-x86_64-2.7/src/arithmetic.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/http.c -o build/temp.linux-x86_64-2.7/src/http.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/htresult.c -o build/temp.linux-x86_64-2.7/src/htresult.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/ctranscoder.c -o build/temp.linux-x86_64-2.7/src/ctranscoder.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/observe.c -o build/temp.linux-x86_64-2.7/src/observe.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/viewrow/viewrow.c -o build/temp.linux-x86_64-2.7/src/viewrow/viewrow.o
    cc -O2 -fPIC -Wimplicit -I/var/pypy/include -c src/contrib/jsonsl/jsonsl.c -o build/temp.linux-x86_64-2.7/src/contrib/jsonsl/jsonsl.o
    cc -shared build/temp.linux-x86_64-2.7/src/argument.o build/temp.linux-x86_64-2.7/src/exceptions.o build/temp.linux-x86_64-2.7/src/ext.o build/temp.linux-x86_64-2.7/src/result.o build/temp.linux-x86_64-2.7/src/opresult.o build/temp.linux-x86_64-2.7/src/callbacks.o build/temp.linux-x86_64-2.7/src/convert.o build/temp.linux-x86_64-2.7/src/connection.o build/temp.linux-x86_64-2.7/src/store.o build/temp.linux-x86_64-2.7/src/constants.o build/temp.linux-x86_64-2.7/src/multiresult.o build/temp.linux-x86_64-2.7/src/miscops.o build/temp.linux-x86_64-2.7/src/typeutil.o build/temp.linux-x86_64-2.7/src/oputil.o build/temp.linux-x86_64-2.7/src/get.o build/temp.linux-x86_64-2.7/src/arithmetic.o build/temp.linux-x86_64-2.7/src/http.o build/temp.linux-x86_64-2.7/src/htresult.o build/temp.linux-x86_64-2.7/src/ctranscoder.o build/temp.linux-x86_64-2.7/src/observe.o build/temp.linux-x86_64-2.7/src/viewrow/viewrow.o build/temp.linux-x86_64-2.7/src/contrib/jsonsl/jsonsl.o -lcouchbase -o build/lib.linux-x86_64-2.7/couchbase/_libcouchbase.pypy-20.so
    
Successfully installed couchbase
Cleaning up...
-------------------------

It fails on Library import.

ImportError: unable to load extension module '/var/pypy/site-packages/couchbase/_libcouchbase.pypy-20.so': /var/pypy/site-packages/couchbase/_libcouchbase.pypy-20.so: undefined symbol: PyErr_WarnExplicit

-----------------------

It runs well on Python 2.7 (without PyPy) on same machine.


 Comments   
Comment by Mark Nunberg [ 06/Sep/13 ]
PyPy uses a different underlying implementation which is currently not supported. There are other issues besides undefined symbols which prevent the extension from functioning properly on that platform.
Comment by Mark Nunberg [ 06/Sep/13 ]
Duplicate of PYCBC-144




[PYCBC-159] Add test for FMT_AUTO in constructor Created: 23/Jul/13  Updated: 14/Aug/13  Resolved: 14/Aug/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: tests
Affects Version/s: 1.1.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Task Priority: Blocker
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-128] Client crashes if invalid hostname is passed Created: 07/Jun/13  Updated: 17/Jun/13  Resolved: 17/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 0.11.1
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Blocker
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
    def test_invalid_hostname(self):
        self.assertRaises(InvalidError,
                          Connection,
                          bucket='default', host='12345:qwer###')

Will crash because the lcb_t object is not cleared when lcb_create fails.

 Comments   
Comment by Mark Nunberg [ 07/Jun/13 ]
http://review.couchbase.org/#/c/26830/




[PYCBC-105] Provide simple 'raw' view API Created: 10/May/13  Updated: 17/May/13  Resolved: 17/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 0.11.0
Security Level: Public

Type: New Feature Priority: Blocker
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This API will just provide a means by which a user can get a view results. Paths will be passed verbatim to LCB, and the view payload may be handled as a subclass of the Result object

 Comments   
Comment by Rami Chowdhury [ 11/May/13 ]
A simple implementation of this with the existing pylibcouchbase Cython code is in progress, based on: https://github.com/couchbase/couchbase-python-client/pull/21 -- we're starting to use this branch of the client at Esplorio and would be happy to work on it.
Comment by Mark Nunberg [ 12/May/13 ]
We're in the process of moving away from the Cython version and using something in the Python C API (for several reasons).
Comment by Rami Chowdhury [ 12/May/13 ]
Is there a publicly-visible branch where that work is going on? At the very least I'd like to see how work is going and how ready it is, and will probably want to contribute some work if possible.
Comment by Mark Nunberg [ 12/May/13 ]
https://github.com/mnunberg/couchbase-python-client/tree/pylibcouchbase

It'll be merged into our actual repository shortly. If you wish to partake in the review process, you may comment here:

http://review.couchbase.org/#/c/26234/

Comment by Rami Chowdhury [ 12/May/13 ]
Great, thanks for the links. How soon is it expected to be merged, out of curiosity? It'll take me a little bit to get up to speed with the C code, anyway.
Comment by Mark Nunberg [ 12/May/13 ]
sometime next week it will be pushed, though makor changes from that link are not expected
Comment by Mark Nunberg [ 17/May/13 ]
https://github.com/couchbase/couchbase-python-client/commit/676a6806cec6b3df0c0653d05c15dba5d6a332bb




[PYCBC-37] durability requirement versions of commands Created: 12/Jul/12  Updated: 14/Aug/13  Resolved: 14/Aug/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.1.0
Security Level: Public

Type: Improvement Priority: Blocker
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
These operations would be built atop the lowlevel observe operation and would then allow for highlevel operations where one specifies the number of nodes to persist to and replciate to.




[PYCBC-248] Asynchronous stats handler may reference freed memory Created: 10/Jun/14  Updated: 12/Jun/14  Resolved: 12/Jun/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.1.0, 1.2.1
Fix Version/s: 1.2.2
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Mark Nunberg [ 11/Jun/14 ]
http://review.couchbase.org/#/c/38152/




[PYCBC-246] Specify example of connecting to non-local cluster (i.e. non-localhost) in getting started Created: 08/May/14  Updated: 04/Jun/14  Resolved: 08/May/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-245] Enhance view parameter documentation. Created: 07/May/14  Updated: 14/May/14  Resolved: 14/May/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.1
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Mark Nunberg [ 12/May/14 ]
http://review.couchbase.org/#/c/36846/




[PYCBC-243] test failure under Py3 Created: 28/Apr/14  Updated: 26/May/14  Resolved: 26/May/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
======================================================================
ERROR: test_simple_ops (couchbase.tests.test_sync.ConnectionIopsTest_Connection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Jenkins\workspace\pycbc-win\label\python_win2008_x64\pyarch\x64\pyversion\33\couchbase\tests\cases\iops_t.py", line 43, in test_simple_ops
    cb.set(key, value)
  File "C:\Jenkins\workspace\pycbc-win\label\python_win2008_x64\pyarch\x64\pyversion\33\couchbase\connection.py", line 331, in set
    persist_to, replicate_to)
  File "C:\Jenkins\workspace\pycbc-win\label\python_win2008_x64\pyarch\x64\pyversion\33\couchbase\iops\select.py", line 174, in start_watching
    self._poll()
  File "C:\Jenkins\workspace\pycbc-win\label\python_win2008_x64\pyarch\x64\pyversion\33\couchbase\iops\select.py", line 127, in _poll
    self._timers.sort()
couchbase.exceptions.ArgumentError: <Bad value for flags, inner_cause=unorderable types: SelectTimer() < SelectTimer(), C Source=(src\convert.c,465)>

----------------------------------------------------------------------
XML: nosetests.xml
----------------------------------------------------------------------

 Comments   
Comment by Mark Nunberg [ 12/May/14 ]
This is not critical, but I'll try to get this fixed up before next release.
Comment by Mark Nunberg [ 19/May/14 ]
http://review.couchbase.org/#/c/37083/




[PYCBC-241] Use new "Semantic Errors" from libcouchbase 2.3.0 Created: 14/Apr/14  Updated: 04/Jun/14  Resolved: 30/Apr/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.1
Security Level: Public

Type: New Feature Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Mark Nunberg [ 14/Apr/14 ]
http://review.couchbase.org/#/c/35689/




[PYCBC-228] persist_to and replicate_to mismatched Created: 13/Feb/14  Updated: 04/Jun/14  Resolved: 19/Feb/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Bug Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: customer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
Duplicate
is duplicated by PYCBC-242 set call does not correct assign repl... Resolved

 Description   
The persist_to and replicate_to arguments are mismatched in the set() operation, thus persist_to means replicate_to and vice versa

 Comments   
Comment by Mark Nunberg [ 13/Feb/14 ]
http://review.couchbase.org/#/c/33489/




[PYCBC-240] pip install fails with Xcode 5.1 Created: 07/Apr/14  Updated: 07/Apr/14  Resolved: 07/Apr/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.2.0
Fix Version/s: None
Security Level: Public

Type: Task Priority: Critical
Reporter: David Haikney Assignee: Mark Nunberg
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: MacOS 10.9.2 - Xcode 5.1


 Description   
Following the python Getting Started guide, the 'pip install couchbase' fails with the following error:


pip install couchbase
Downloading/unpacking couchbase
  Downloading couchbase-1.2.0.tar.gz (254kB): 254kB downloaded
  Running setup.py (path:/private/tmp/pip_build_root/couchbase/setup.py) egg_info for package couchbase
    
Installing collected packages: couchbase
  Running setup.py install for couchbase
    building 'couchbase._libcouchbase' extension
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/exceptions.c -o build/temp.macosx-10.9-intel-2.7/src/exceptions.o
    clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
    clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
    error: command 'cc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/couchbase/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-GHEKAF-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-intel-2.7

creating build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/__init__.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/_bootstrap.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/_pyport.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/_version.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/admin.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/connection.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/exceptions.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/experimental.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/items.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/mockserver.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/result.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/transcoder.py -> build/lib.macosx-10.9-intel-2.7/couchbase

copying couchbase/user_constants.py -> build/lib.macosx-10.9-intel-2.7/couchbase

creating build/lib.macosx-10.9-intel-2.7/couchbase/views

copying couchbase/views/__init__.py -> build/lib.macosx-10.9-intel-2.7/couchbase/views

copying couchbase/views/iterator.py -> build/lib.macosx-10.9-intel-2.7/couchbase/views

copying couchbase/views/params.py -> build/lib.macosx-10.9-intel-2.7/couchbase/views

creating build/lib.macosx-10.9-intel-2.7/couchbase/iops

copying couchbase/iops/__init__.py -> build/lib.macosx-10.9-intel-2.7/couchbase/iops

copying couchbase/iops/base.py -> build/lib.macosx-10.9-intel-2.7/couchbase/iops

copying couchbase/iops/select.py -> build/lib.macosx-10.9-intel-2.7/couchbase/iops

creating build/lib.macosx-10.9-intel-2.7/couchbase/async

copying couchbase/async/__init__.py -> build/lib.macosx-10.9-intel-2.7/couchbase/async

copying couchbase/async/connection.py -> build/lib.macosx-10.9-intel-2.7/couchbase/async

copying couchbase/async/events.py -> build/lib.macosx-10.9-intel-2.7/couchbase/async

copying couchbase/async/view.py -> build/lib.macosx-10.9-intel-2.7/couchbase/async

creating build/lib.macosx-10.9-intel-2.7/couchbase/tests

copying couchbase/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests

copying couchbase/tests/base.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests

copying couchbase/tests/importer.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests

copying couchbase/tests/test_sync.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests

creating build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/__init__.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/admin_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/append_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/arithmetic_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/badargs_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/connection_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/couchbase_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/delete_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/design_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/dupkeys_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/empty_key_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/encodings_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/endure_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/excextra_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/format_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/get_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/iops_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/itemsyntax_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/itertypes_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/itmops_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/lock_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/lockmode_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/misc_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/observe_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/pipeline_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/querystrings_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/results_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/rget_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/set_converters_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/set_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/stats_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/touch_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/transcoder_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/view_iterator_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

copying couchbase/tests/cases/view_t.py -> build/lib.macosx-10.9-intel-2.7/couchbase/tests/cases

creating build/lib.macosx-10.9-intel-2.7/gcouchbase

copying gcouchbase/__init__.py -> build/lib.macosx-10.9-intel-2.7/gcouchbase

copying gcouchbase/connection.py -> build/lib.macosx-10.9-intel-2.7/gcouchbase

copying gcouchbase/iops_gevent0x.py -> build/lib.macosx-10.9-intel-2.7/gcouchbase

copying gcouchbase/iops_gevent10.py -> build/lib.macosx-10.9-intel-2.7/gcouchbase

creating build/lib.macosx-10.9-intel-2.7/txcouchbase

copying txcouchbase/__init__.py -> build/lib.macosx-10.9-intel-2.7/txcouchbase

copying txcouchbase/connection.py -> build/lib.macosx-10.9-intel-2.7/txcouchbase

copying txcouchbase/iops.py -> build/lib.macosx-10.9-intel-2.7/txcouchbase

running build_ext

building 'couchbase._libcouchbase' extension

creating build/temp.macosx-10.9-intel-2.7

creating build/temp.macosx-10.9-intel-2.7/src

creating build/temp.macosx-10.9-intel-2.7/src/viewrow

creating build/temp.macosx-10.9-intel-2.7/src/contrib

creating build/temp.macosx-10.9-intel-2.7/src/contrib/jsonsl

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/exceptions.c -o build/temp.macosx-10.9-intel-2.7/src/exceptions.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/couchbase/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-GHEKAF-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/couchbase
Storing debug log for failure in /Users/dhaikney/Library/Logs/pip.log


The following page suggests that Xcode has hardened its treatment of such warnings to turn them into errors: http://kaspermunck.github.io/2014/03/fixing-clang-error/

Temporary *workaround* is to set the following flag prior to running pip:
export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

 Comments   
Comment by Mark Nunberg [ 07/Apr/14 ]
We don't explicitly manipulate compilation flags anywhere within the python setup scripts. If the -mno-fused-add is popping up, it's an issue with the Python supplied by OS X - which is known to be broken. Python developers are known to avoid the vendor-supplied Python on systems such as Redhat and Mac.

Please use the Python from homebrew and try again, or apply the workaround. This is not something which can be fixed within the SDK.




[PYCBC-146] OBSERVE may crash when trying against nodes with replicas Created: 27/Jun/13  Updated: 02/Jul/13  Resolved: 02/Jul/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0 Beta
Fix Version/s: 1.0.0
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
When checking against replicas, OBSERVE may crash because of the assymetric command counting used.

 Comments   
Comment by Mark Nunberg [ 02/Jul/13 ]
commit 6f39f82ebf6a33b99b9205d151433ff6237f8afd
Author: Mark Nunberg <mnunberg@haskalah.org>
Date: Thu Jun 27 12:09:49 2013 -0700

    PYCBC-146: Don't crash on OBSERVE with replicas
    
    Change-Id: Ibcc2b032f321f11497cad8eb7d4cb8c005dde5f4




[PYCBC-138] _multi arith functions not setting amount properly Created: 17/Jun/13  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.11.1
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Fix in progress. This is because we don't have a nice python-level wrapper for these functions, so the delta is never set.

 Comments   
Comment by Mark Nunberg [ 17/Jun/13 ]
http://review.couchbase.org/26986




[PYCBC-136] quiet parameter not being passed from Couchbase.connect Created: 16/Jun/13  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.11.1
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Mark Nunberg [ 17/Jun/13 ]
http://review.couchbase.org/26984




[PYCBC-125] Add lock option for Connection object Created: 04/Jun/13  Updated: 17/Jun/13  Resolved: 17/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.10.0, 0.11.0, 0.11.1
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Add an explicit option to the constructor to lock the object - to prevent simulatenous access from multiple threads.

 Comments   
Comment by Mark Nunberg [ 04/Jun/13 ]
While we ask users to do this manually, it turns out it's a bit of a chore to debug when something goes wrong. Having this option built-in makes it easier to figure out what's wrong :)




[PYCBC-123] Memory leak on store Created: 31/May/13  Updated: 31/May/13  Resolved: 31/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.11.0
Fix Version/s: 0.11.1
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The container MultiResult object is never freed for each store operation. This means that the application's memory usage will gradually get bigger and bigger as more items are set.

 Comments   
Comment by Mark Nunberg [ 31/May/13 ]
https://github.com/couchbase/couchbase-python-client/commit/3f5dce0986863f8527aeb1ec61c527d38716e37b




[PYCBC-112] Add test to ensure objects can be pretty-printed Created: 14/May/13  Updated: 16/May/13  Resolved: 16/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.10.0
Fix Version/s: 0.11.0
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Write tests to ensure Result objects can be repr'd and stringified without errors.




[PYCBC-90] Allow FMT_PLAIN for 'normal' python strings. Created: 26/Apr/13  Updated: 17/May/13  Resolved: 17/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.9.0
Fix Version/s: 0.10.0
Security Level: Public

Type: Task Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Currently simple strings, i.e. "str" will not properly be set in "plain" mode. The library should apply some heuristics to determine if the string is a simple "byte" string, or whether it needs some special encoding.

 Comments   
Comment by Mark Nunberg [ 30/Apr/13 ]
http://review.couchbase.org/#/c/25948/
Comment by Mark Nunberg [ 11/May/13 ]
We're using FMT_BYTES and FMT_UTF8 to disambiguate between the two now
Comment by Mark Nunberg [ 17/May/13 ]
PYCBC-103 introduces a FMT_UTF8 flag. Heuristics should not be performed by default because of the ambiguity of Python's types. We don't want to accidentally stringify an object that's got a __str__ method implemented (and every object does).




[PYCBC-7] An interface to access Couchbase Views is needed Created: 22/Aug/11  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0 Beta
Security Level: Public

Type: New Feature Priority: Critical
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Need an interface to be able to access Couchbase Views. Even without the ability to create and delete views, accessing view results is important, as views can be created through the Web UI interface.

The specific implementation should be specific to, and familiar to the surrounding language and library, but it should have some general capabilities:
- List views from a given cluster
- Instantiate an Object that represents a view on a given cluster
- Assemble query parameters for a View
- Retrieve non-reduced results from a View
  * Be able to get the underlying document from the non-reduced results (this request should flow over binprot)
- Retrieve reduced results from a View (the format is the same, but there is no associated docid)

 Comments   
Comment by Farshid Ghods (Inactive) [ 29/Sep/11 ]
looking at the readme files now seems like some view functionalities are already implemented :

    # save a design document
    # right now with no _rev, we can only create, we can't update
    try:
        doc_id = newbucket.save(design)
    except:
        doc_id = "_design/testing"

    rows = newbucket.view("_design/testing/_view/all")
    for row in rows:
        print row

Keith,
can you please go through this checklist and let us know which features need to be worked on ?
Comment by Benjamin Young [ 06/Apr/12 ]
Keith, can you get us an update on the status of this issue?

Much thanks!
Comment by Benjamin Young [ 17/May/12 ]
Think you're leading this charge. :) Thanks!
Comment by Matt Ingenthron [ 24/Aug/12 ]
@benjamin is completing this in 0.8
Comment by Benjamin Young [ 30/Aug/12 ]
The one remaining piece--"include docs over binary protocol" is stalled due to get_multi()

However, the API can still handle include_docs over HTTP, so I'm closing this one, and adding another one for include docs over binary protocol.
Comment by Benjamin Young [ 30/Aug/12 ]
http://www.couchbase.com/issues/browse/PYCBC-63
Binary protocol improvements related to this API & include_docs




[PYCBC-247] Provide 'type' argument to _cntl() which would allow a more flexible coercion spec. Created: 10/Jun/14  Updated: 23/Jun/14  Resolved: 23/Jun/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.2.1
Fix Version/s: 1.2.2
Security Level: Public

Type: Improvement Priority: Critical
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency

 Description   
Currently, unhandled values for the _ctl() method are treated as floats. We should provide a third argument indicating the type to be used (this may be a string or yet another constant) to which the value may be coerced into.

 Comments   
Comment by Mark Nunberg [ 12/Jun/14 ]
http://review.couchbase.org/#/c/38220/




[PYCBC-242] set call does not correct assign replicate_to and assign_to Created: 17/Apr/14  Updated: 04/Jun/14  Resolved: 17/Apr/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Bug Priority: Major
Reporter: Daniel Owen Assignee: Daniel Owen
Resolution: Duplicate Votes: 0
Labels: customer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File python-cb.set.py    
Issue Links:
Duplicate
duplicates PYCBC-228 persist_to and replicate_to mismatched Resolved

 Description   
Defect resides in couchbase-python-client/couchbase/connection.py

In function set (line number 257).
The return code is (line number 330 & 331)

         return _Base.set(self, key, value, cas, ttl, format,
                         persist_to, replicate_to)

however should be...

return _Base.set(self, key, value, cas, ttl, format,
                         persist_to=persist_to, replicate_to=replicate_to)

The attached program can be used to demonstrate the problem.

 Comments   
Comment by Mark Nunberg [ 17/Apr/14 ]
https://www.couchbase.com/issues/browse/PYCBC-228




[PYCBC-231] Use compact JSON encoding for Python objects Created: 25/Feb/14  Updated: 12/May/14  Resolved: 12/May/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Improvement Priority: Major
Reporter: Dave Rigby Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency

 Description   
When encoding Python objects to JSON, we currently use json.dumps() with default arguments. This produces JSON encoded with spaces separating fields. This is somewhat wasteful from a memory / disk / network utilisation point of view.

More preferable would be to use a "compact" encoding which removes all spaces - this can be achieved using separators=(',', ':') or similar (see http://docs.python.org/2/library/json.html).



 Comments   
Comment by Mark Nunberg [ 01/May/14 ]
http://review.couchbase.org/#/c/36565/




[PYCBC-232] Library crashes on user-defined transcoder decoding exceptions Created: 25/Feb/14  Updated: 04/Jun/14  Resolved: 26/Feb/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.0.0, 1.1.0, 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Bug Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: customer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
If the transcoder throws an exception during decode it will crash the client as the client does not wrap it inside a CouchbaseError

 Comments   
Comment by Mark Nunberg [ 25/Feb/14 ]
http://review.couchbase.org/#/c/33908/




[PYCBC-229] Example for mapkey_single is wrong Created: 17/Feb/14  Updated: 14/Apr/14  Resolved: 14/Apr/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Task Priority: Major
Reporter: Patrick Varley Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: documentation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: http://www.couchbase.com/autodocs/couchbase-python-client-1.2.0/html/api/views.html#couchbase.views.params.Query.mapkey_single


 Description   
The examples uses this:

q.mapkey_single = ["abbaye_de_maredsous"]

It should be:

q.mapkey_single = "abbaye_de_maredsous"

The 1st one creates the following url options:
'key=%5B%22abbaye_de_maredsous22%5D'

Where %5B and %5D are the square brackets.

 Comments   
Comment by Mark Nunberg [ 14/Apr/14 ]
http://review.couchbase.org/35693




[PYCBC-226] JSON Library Created: 06/Feb/14  Updated: 09/Feb/14  Resolved: 09/Feb/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.2.0
Fix Version/s: None
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Roberts Assignee: Mark Nunberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File illustration.py    

 Description   
The default json library that ships with Python is slow, and couchbase makes extensive use of it. It would be ideal to be able to specify the json library used by couchbase, or have a bundled json library written in C.

 Comments   
Comment by Mark Nunberg [ 06/Feb/14 ]
Are you talking about the views handling, or the encoding? For the former it is already possible to override it. For the latter it is not implemented but wouldn't be difficult to do.
Comment by Mark Roberts [ 09/Feb/14 ]
Yes, I am referring to the encoding. Here's a sample that illustrates what I'm talking about. It spends about half the time in JSON encoding.
Comment by Mark Nunberg [ 09/Feb/14 ]
http://pythonhosted.org//couchbase/api/convertfuncs.html#couchbase.set_json_converters

Sorry, I meant the _latter_ :)
Comment by Mark Roberts [ 09/Feb/14 ]
Yesssss. I'm not sure how I missed this in the documentation *or* my perusal of the source. Thanks!




[PYCBC-225] Get CAS for a key without reading the entire document. Created: 04/Feb/14  Updated: 19/Feb/14  Resolved: 19/Feb/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: New Feature Priority: Major
Reporter: Dave Rigby Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
depends on CCBC-152 Provide lcb_check to (weakly) check f... Resolved

 Description   
Customer has requested the ability to be able to obtain the CAS for a document without having to read the document value.

Customer is currently using observe() to achieve this, but current Python observe unconditionally checks for persisted/replicated which isn't needed (and furthermore is slower as you potentially wait for them). They require a fast lookup (like get) but just returning CAS.



 Comments   
Comment by Mark Nunberg [ 04/Feb/14 ]
This can be done via a single observe call to the master. However, this would need support in libcouchbase. This means adding an additional API call and/or struct field, and the like
Comment by Mark Nunberg [ 04/Feb/14 ]
Which.. has actually been up for review for quite some time in the form of CCBC-152!
Comment by Dave Rigby [ 04/Feb/14 ]
@Mark: I think this could also be done with the low-level CMD_GET_META, but that doesn't appear to be in libcouchbase either at present...
Comment by Matt Ingenthron [ 04/Feb/14 ]
note that CMD_GET_META is not considered part of the public interface by the Couchbase Server team, so it won't be in libcouchbase.

I see the use case described there, but to be honest it doesn't fully make sense to me. It talks about grabbing the item to determine a particular state, but then grabbing the CAS at a later time. There's a problem there in that the item could have changed either by the application or by some kind of failure.

In any event, Mark is correct this is part of the low level observe() command.
Comment by Perry Krug [ 05/Feb/14 ]
Spoke with both Matt and the end customer. The use case is about (in some cases) avoiding writing a large object back to Couchbase in the event that it has changed and would generate a CAS miss. There's a case to be made for understanding how likely that is to happen, but either way our lower-level code paths could be slightly improved upon to allow for a call to observe just for existence on the active.

Mark, could it be done without an additional API by just improving libcouchbase to handle replicateTo0 and persistTo0 as just a call to the active? I don't think it's as important to have a specific call just for CAS if a slightly optimized observe will really do the trick...
Comment by Mark Nunberg [ 05/Feb/14 ]
I wouldn't find such an improvement maintainable. It would be an extension to the 'observe' command which would return a normal 'array' of a single object which would be limited to the master/active node only. These "Improvements" would be reflected up the chain and would provide for a rather odd API.

That's why I think a new API which explicitly only contacts the master is a better option. I suppose we could call it observe_m? We're primarily stuck on figuring out how to implement these semantics.
Comment by Mark Nunberg [ 10/Feb/14 ]
http://review.couchbase.org/33410




[PYCBC-224] Expose bootstrap timeout setting Created: 30/Jan/14  Updated: 25/Feb/14  Resolved: 25/Feb/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.1
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Mark Nunberg [ 10/Feb/14 ]
http://review.couchbase.org/#/c/33412/
Comment by Mark Nunberg [ 25/Feb/14 ]
http://review.couchbase.org/33698




[PYCBC-223] Streaming on view crashes python. Created: 30/Jan/14  Updated: 12/May/14  Resolved: 12/May/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Bug Priority: Major
Reporter: adonoho Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: customer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Python v3.3.3 on OS X 10.8.5


 Description   
The following query:

def query_by_timestamp(timestamp: int) -> Query:

    q = Query()

    q.stale = STALE_UPDATE_BEFORE
    q.startkey = timestamp
    q.endkey = int(timestamp + QUERY_PERIOD)
    q.inclusive_end = False

    return q

## query_by_timestamp()

being called by:

def by_timestamp(cb: Connection, timestamp: int) -> View:

    q = query_by_timestamp(timestamp)

    q.reduce = False

    view = cb.query("sensitive", "by_timestamp", include_docs=True, query=q, streaming=1)

    return view

## by_timestamp()

The timestamp is a traditional Unix timestamp, i.e. it is a number key and not a string key. When `streaming` is set to `0` and not `1`, the query operates properly by returning the expected documents. (I pass `0` and `1` instead of True or False because the documentation says it is a bool and not a boolean.)

Anon,
Andrew


 Comments   
Comment by adonoho [ 20/Mar/14 ]
Any progress on fixing streaming?

Anon,
Andrew
Comment by Mark Nunberg [ 20/Mar/14 ]
I was about to mark this as a duplicate some weeks ago when I fixed a related issue.

See if this fixes your issue (the fix is merged into current master): https://www.couchbase.com/issues/browse/PYCBC-236
Comment by Mark Nunberg [ 20/Mar/14 ]
Considering you are using include_docs with streaming, that _may_ have been your issue, too (should be fixed by the ticket referenced above).
Comment by adonoho [ 28/Mar/14 ]
Mark,

Forgive my noobitude, where do I find this patch? Is it on Github or on a CB repo somewhere?

Andrew
Comment by Mark Nunberg [ 28/Mar/14 ]
https://github.com/couchbase/couchbase-python-client

-- there is no special step required if you're familiar with building from a python package source.

However if you're not:

(1) checkout the repository
(2) cd into the repository
(3) pip install .
OR
(3) python setup.py install

Let me know if you have issues with this

Mark
Comment by Mark Nunberg [ 12/May/14 ]
I believe this has been fixed




[PYCBC-235] Document MultiResult class a bit better Created: 05/Mar/14  Updated: 02/May/14  Resolved: 02/May/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: apidocs
Affects Version/s: None
Fix Version/s: 1.2.1
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Specify the purpose behind MultiResult - it's a dict, but show some examples.

 Comments   
Comment by Mark Nunberg [ 01/May/14 ]
http://review.couchbase.org/36566




[PYCBC-222] Promote gevent and txcouchbase to stable Created: 14/Jan/14  Updated: 04/Jun/14  Resolved: 02/May/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: apidocs
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Task Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
I happened to notice in the connect() that gevent is still listed as experimental. This is supported as of 1.2.0, correct?

 Comments   
Comment by Mark Nunberg [ 14/Jan/14 ]
Yes, the API itself is experimental. It's supported but experimental.
Comment by Mark Nunberg [ 14/Jan/14 ]
This will go away in 1.2.1; though gevent is inherently experimental.
Comment by Mark Nunberg [ 14/Apr/14 ]
http://review.couchbase.org/35692




[PYCBC-220] Wrong package version when installing from another git repository Created: 14/Jan/14  Updated: 10/Feb/14  Resolved: 10/Feb/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Bug Priority: Major
Reporter: Pavel Paulau Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Downloading/unpacking couchbase==1.2.0 (from -r requirements.txt (line 4))
  Downloading couchbase-1.2.0.tar.gz (254kB): 254kB downloaded
  Running setup.py egg_info for package couchbase
    couchbase_version.py:75: UserWarning: Malformed tag '17c602b'
      warnings.warn("Malformed tag '{0}'".format(stdout))
    
  Requested couchbase==1.2.0 (from -r requirements.txt (line 4)), but installing version 0.0.0-UNKNOWN-17c602b


$ git log --oneline -1
17c602b ...

$ pip list
...
couchbase (0.0.0-UNKNOWN-17c602b)
...

 Comments   
Comment by Mark Nunberg [ 14/Jan/14 ]
If you're building your module from another git repo, you need to make sure it has been properly tagged, otherwise you'll get this message.

The package version is calculated from the git describe output coupled with the tag
Comment by Mark Nunberg [ 10/Feb/14 ]
https://github.com/couchbase/couchbase-python-client/commit/9298076678e833d3d311cc78bfd54e228c70d113




[PYCBC-219] OBSERVE crashes during rebalance Created: 13/Jan/14  Updated: 25/Feb/14  Resolved: 25/Feb/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.1.0
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: Pavel Paulau Assignee: Mark Nunberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Python 2.7.4
libcouchbase 2.2.0

Issue Links:
Gantt: start-finish
is triggered by CCBC-150 Observe (and possibly other) callback... Resolved

 Description   
Implementation is based on yours:

https://github.com/pavel-paulau/cbagent/blob/master/cbagent/collectors/libstats/pool.py

During rebalance I got:
python-couchbase: self->nremaining at src/callbacks.c:106. AbortAborted (core dumped)

(gdb) bt
#0 0x00007f2ada467f77 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007f2ada46b5e8 in __GI_abort () at abort.c:90
#2 0x00007f2ad6ec61e0 in pycbc_handle_assert (msg=msg@entry=0x7f2ad6ed3b04 "self->nremaining", file=file@entry=0x7f2ad6ed3aa0 "src/callbacks.c", line=line@entry=106)
    at src/exceptions.c:25
#3 0x00007f2ad6ec7d38 in maybe_breakout (self=<optimized out>, self=<optimized out>) at src/callbacks.c:106
#4 0x00007f2ad6ec8529 in observe_callback (instance=<optimized out>, cookie=<optimized out>, err=<optimized out>, resp=0x7f2ab3ffd8d0) at src/callbacks.c:569
#5 0x00007f2ad6c9abc1 in observe_response_handler (server=0x7f2aa805efc0, command_data=<optimized out>, res=<optimized out>) at src/handler.c:600
#6 0x00007f2ad6c9b398 in lcb_dispatch_response (c=0x7f2aa805efc0, ct=0x7f2ab3ffdd40, header=0x7f2aa804f000) at src/handler.c:1268
#7 0x00007f2ad6ca32e5 in lcb_proto_parse_single (c=0x7f2aa805efc0, stop=1389655096344192000) at src/server_parse.c:215
#8 0x00007f2ad6ca2def in do_read_data (allow_read=<optimized out>, c=<optimized out>) at src/server_io.c:45
#9 lcb_server_v0_event_handler (sock=<optimized out>, which=<optimized out>, arg=0x7f2aa805efc0) at src/server_io.c:107
#10 0x00007f2ad6c941c5 in lcb_io_run_event_loop (iops=<optimized out>) at plugins/io/select/plugin-select.c:562
#11 0x00007f2ad6ca592d in lcb_wait (instance=0x26fc130) at src/wait.c:77
#12 0x00007f2ad6ecdeb3 in pycbc_oputil_wait_common (self=self@entry=0x225f050) at src/oputil.c:510
#13 0x00007f2ad6ecdf30 in pycbc_common_vars_wait (cv=cv@entry=0x7f2ab3ffe000, self=self@entry=0x225f050) at src/oputil.c:59
#14 0x00007f2ad6ed05c3 in observe_common (self=0x225f050, args=<optimized out>, kwargs=<optimized out>, argopts=<optimized out>) at src/observe.c:214
#15 0x000000000053bf0b in PyEval_CallObjectWithKeywords ()
#16 0x0000000000595e0c in ?? ()
#17 0x000000000052e3cb in PyEval_EvalFrameEx ()
#18 0x000000000052e672 in PyEval_EvalFrameEx ()
#19 0x000000000052e672 in PyEval_EvalFrameEx ()
#20 0x000000000050697a in ?? ()
#21 0x00000000005301ae in PyEval_EvalFrameEx ()
#22 0x000000000052e672 in PyEval_EvalFrameEx ()
#23 0x000000000052e672 in PyEval_EvalFrameEx ()
#24 0x000000000050697a in ?? ()
#25 0x00000000004d53f4 in ?? ()
#26 0x000000000053bf0b in PyEval_CallObjectWithKeywords ()
#27 0x0000000000579a22 in _start ()




 Comments   
Comment by Mark Nunberg [ 13/Jan/14 ]
Can you try with the libevent plugin?
Comment by Pavel Paulau [ 13/Jan/14 ]
Doesn't help:

(gdb) bt
#0 0x00007fb77861bf77 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007fb77861f5e8 in __GI_abort () at abort.c:90
#2 0x00007fb7750fc1e0 in pycbc_handle_assert (msg=msg@entry=0x7fb775109b04 "self->nremaining", file=file@entry=0x7fb775109aa0 "src/callbacks.c", line=line@entry=106)
    at src/exceptions.c:25
#3 0x00007fb7750fdd38 in maybe_breakout (self=<optimized out>, self=<optimized out>) at src/callbacks.c:106
#4 0x00007fb7750fe529 in observe_callback (instance=<optimized out>, cookie=<optimized out>, err=<optimized out>, resp=0x7fb760ff7c10) at src/callbacks.c:569
#5 0x00007fb774ed74a1 in lcb_failout_observe_request (server=<optimized out>, command_data=0x7fb760ff7d80, packet=<optimized out>, npacket=<optimized out>,
    err=LCB_ETIMEDOUT) at src/server.c:65
#6 0x00007fb774ed7f57 in failout_single_request (packet=<optimized out>, nkey=<optimized out>, keyptr=<optimized out>, error=<optimized out>, ct=<optimized out>,
    req=<optimized out>, server=<optimized out>) at src/server.c:240
#7 purge_single_server (server=0x7fb7480428b0, error=<optimized out>, min_nonstale=<optimized out>) at src/server.c:351
#8 0x00007fb774ed8420 in lcb_failout_server (server=0x3dfa, error=15884) at src/server.c:399
#9 0x00007fb774ed85cd in server_timeout_handler (conn=<optimized out>, err=15884) at src/server_connect.c:180
#10 0x00007fb772191f53 in event_base_loop () from /usr/lib/libevent-1.4.so.2
#11 0x00007fb774edb92d in lcb_wait (instance=0x2db7930) at src/wait.c:77
#12 0x00007fb775103eb3 in pycbc_oputil_wait_common (self=self@entry=0x2a780f8) at src/oputil.c:510
#13 0x00007fb775103f30 in pycbc_common_vars_wait (cv=cv@entry=0x7fb760ff8000, self=self@entry=0x2a780f8) at src/oputil.c:59
#14 0x00007fb7751065c3 in observe_common (self=0x2a780f8, args=<optimized out>, kwargs=<optimized out>, argopts=<optimized out>) at src/observe.c:214
#15 0x000000000053bf0b in PyEval_CallObjectWithKeywords ()
#16 0x0000000000595e0c in ?? ()
#17 0x000000000052e3cb in PyEval_EvalFrameEx ()
#18 0x000000000052e672 in PyEval_EvalFrameEx ()
#19 0x000000000052e672 in PyEval_EvalFrameEx ()
#20 0x000000000050697a in ?? ()
#21 0x00000000005301ae in PyEval_EvalFrameEx ()
#22 0x000000000052e672 in PyEval_EvalFrameEx ()
#23 0x000000000052e672 in PyEval_EvalFrameEx ()
#24 0x000000000050697a in ?? ()
#25 0x00000000004d53f4 in ?? ()
#26 0x000000000053bf0b in PyEval_CallObjectWithKeywords ()
#27 0x0000000000579a22 in _start ()
Comment by Mark Nunberg [ 13/Jan/14 ]
Then it's likely a bug specific to OBSERVE then. Are you adding a node or removing a node?

We'll be redoing the internal packet send queue soon enough..
Comment by Mark Nunberg [ 13/Jan/14 ]
maybe try with PYCBC_ASSERT_CONTINUE (or similar) in the environment to see if there's an exception being thrown somewhere. This basically looks like LCB telling us that an observe operation as been finished twice
Comment by Pavel Paulau [ 13/Jan/14 ]
It happens in both cases (adding and removing node).

!!! python-couchbase: Assertion failure detected..
!!! Not aborting because os.environ['PYCBC_ASSERT_CONTINUE'] was set
!!! Depending on what went wrong, further exceptions may
!!! still be raised, or the program may abort due to
!!! invalid state
!!! (debuggers should break at pycbc_handle_assert in exceptions.c)
!!! Assertion: 'self->nremaining' at src/callbacks.c:106
!!! python-couchbase: Assertion failure detected..
!!! Not aborting because os.environ['PYCBC_ASSERT_CONTINUE'] was set
!!! Depending on what went wrong, further exceptions may
!!! still be raised, or the program may abort due to
!!! invalid state
!!! (debuggers should break at pycbc_handle_assert in exceptions.c)
!!! Assertion: 'self->nremaining == 0' at src/oputil.c:67
Remaining count != 0. Adjusting
Comment by Pavel Paulau [ 13/Jan/14 ]
Interesting that eventually it failed with other error:

!!! python-couchbase: Assertion failure detected..
!!! Not aborting because os.environ['PYCBC_ASSERT_CONTINUE'] was set
!!! Depending on what went wrong, further exceptions may
!!! still be raised, or the program may abort due to
!!! invalid state
!!! (debuggers should break at pycbc_handle_assert in exceptions.c)
!!! Assertion: 'Py_TYPE(cookie) == &pycbc_MultiResultType' at src/callbacks.c:127
Segmentation fault (core dumped)

#0 maybe_breakout (self=<optimized out>, self=<optimized out>) at src/callbacks.c:106
#1 0x00007fddb67d606d in get_common_objects (cookie=<optimized out>, key=0x7fddac3022a8, nkey=43, err=err@entry=LCB_SUCCESS, conn=conn@entry=0x7fddb3659888,
    res=res@entry=0x7fddb3659890, restype=restype@entry=4, mres=mres@entry=0x7fddb3659898) at src/callbacks.c:132
#2 0x00007fddb67d6d63 in delete_callback (instance=<optimized out>, cookie=<optimized out>, err=LCB_SUCCESS, resp=0x7fddb3659ae0) at src/callbacks.c:380
#3 0x00007fddb65a95d0 in delete_response_handler (res=<optimized out>, command_data=<optimized out>, server=<optimized out>) at src/handler.c:495
#4 lcb_dispatch_response (c=0x7fddac200eb8, ct=0x7fddb3659c50, header=0x7fddac12fa80) at src/handler.c:1230
#5 0x00007fddb65b12e5 in lcb_proto_parse_single (c=0x7fddac200eb8, stop=1389665272839153000) at src/server_parse.c:215
#6 0x00007fddb65b0def in do_read_data (allow_read=<optimized out>, c=<optimized out>) at src/server_io.c:45
#7 lcb_server_v0_event_handler (sock=<optimized out>, which=<optimized out>, arg=0x7fddac200eb8) at src/server_io.c:107
#8 0x00007fddb3869f53 in event_base_loop () from /usr/lib/libevent-1.4.so.2
#9 0x00007fddb65b392d in lcb_wait (instance=0x314e2a0) at src/wait.c:77
#10 0x00007fddb67dbeb3 in pycbc_oputil_wait_common (self=self@entry=0x2f82e18) at src/oputil.c:510
#11 0x00007fddb67dbf30 in pycbc_common_vars_wait (cv=cv@entry=0x7fddb3659f60, self=self@entry=0x2f82e18) at src/oputil.c:59
#12 0x00007fddb67d9563 in set_common (self=0x2f82e18, args=<optimized out>, kwargs=<optimized out>, operation=<optimized out>, argopts=1) at src/store.c:351
#13 0x000000000053bf0b in PyEval_CallObjectWithKeywords ()
#14 0x0000000000595e0c in ?? ()
#15 0x000000000052e3cb in PyEval_EvalFrameEx ()
#16 0x0000000000505b24 in PyEval_EvalCodeEx ()
#17 0x000000000052e237 in PyEval_EvalFrameEx ()
#18 0x000000000052e672 in PyEval_EvalFrameEx ()
#19 0x000000000050697a in ?? ()
#20 0x00000000005301ae in PyEval_EvalFrameEx ()
#21 0x000000000052e672 in PyEval_EvalFrameEx ()
#22 0x000000000052e672 in PyEval_EvalFrameEx ()
#23 0x000000000050697a in ?? ()
#24 0x00000000004d53f4 in ?? ()
#25 0x000000000053bf0b in PyEval_CallObjectWithKeywords ()
#26 0x0000000000579a22 in _start ()
Comment by Mark Nunberg [ 25/Feb/14 ]
This is a libcouchbase issue CCBC-150. Fixed in master




[PYCBC-218] Expose views timeout Created: 08/Jan/14  Updated: 14/Jan/14  Resolved: 14/Jan/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.2.0
Security Level: Public

Type: New Feature Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-213] Expose LCB_CNTL integer constants Created: 30/Dec/13  Updated: 08/Jan/14  Resolved: 08/Jan/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.1.0
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks CCBC-304 mystery query time out and views_timeout Resolved

 Description   
This will expose the raw integer values for lcb_cntl, converting properly from Python number objects.




[PYCBC-211] Multi operation pipeline Created: 17/Dec/13  Updated: 17/Dec/13  Resolved: 17/Dec/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This feature provides a batched operation pipeline allowing multiple operations of different types to be scheduled together for I/O efficiency without explicitly using a 'multi' method.




[PYCBC-210] add access to lcb timings, including ability to enable and disable Created: 10/Dec/13  Updated: 07/Jan/14  Resolved: 07/Jan/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.2.0
Security Level: Public

Type: New Feature Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Underlying libcouchbase has a feature that allows users to enable timings on operations and gather timings information as seen at a probepoint in libcouchbase. This enhancement request is to allow for enabling these timings and getting information back.

As had been discussed earlier, this won't help a user understand the actual overall operation times since there could be significant time going into parsing large documents, etc. Still, the idea here is to be able to have a simple probe point at the client side and at the server side (which exists already with "cbstats timings") to determine where to look next. By giving the user programmatic access to the already existing libcouchbase timings, we'd achieve that goal.

 Comments   
Comment by Mark Nunberg [ 16/Dec/13 ]
http://review.couchbase.org/#/c/31136/




[PYCBC-209] Error on get() when using txcouchbase Created: 05/Dec/13  Updated: 08/Jan/14  Resolved: 08/Jan/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.2.0
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: Joe Hillenbrand Assignee: Mark Nunberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Ubuntu 12.04 64-bit


 Description   
I'm trying to use txcouchbase and I'm getting this error:

{noformat}
data = yield self.cb.get(num)
File "/home/joe/foo/src/couchbase/txcouchbase/connection.py", line 295, in ret
return self._wrap(meth, *args, **kwargs)
File "/home/joe/foo/src/couchbase/txcouchbase/connection.py", line 288, in _wrap
opres = meth(self, *args, **kwargs)
File "/home/joe/foo/src/couchbase/couchbase/connection.py", line 489, in get
return _Base.get(self, key, ttl, quiet, replica, no_format)
couchbase.exceptions.ClientTemporaryFailError: <RC=0x1B[Temporary failure on the client. Try again later], There was a problem scheduling your request, or determining the appropriate server or vBucket for the key(s) requested. This may also be a bug in the SDK if there are no network issues., C Source=(src/get.c,335)>

{noformat}

Any ideas?

 Comments   
Comment by Mark Nunberg [ 08/Jan/14 ]
I think we resolved this?
Comment by Joe Hillenbrand [ 08/Jan/14 ]
Sure. I think the original problem was that my bucket name had extra quotes in it, but the strange part was that it wasn't an error on connection but an error when trying to do a query.

I think an actual fix would be to raise an error when there is an invalid bucket when connecting.




[PYCBC-206] streaming=True - drops last } from json response object resulting in error. Created: 19/Nov/13  Updated: 16/Dec/13  Resolved: 16/Dec/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.1.0
Fix Version/s: 1.2.0
Security Level: Public

Type: Bug Priority: Major
Reporter: Alex Ma Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: libcouchbase 2.1
python client 1.1

Attachments: Text File stream_test1.txt     Text File stream_test2.txt     Text File stream_test.txt    

 Description   
We had been experimenting with using the streaming=True for our view iteration as we do not want to load the entire result set into memory before beginning processing and noticed that if a value is present in the view emission, we get an error in the json scan of the return object. This is the error that python spits back:

Traceback (most recent call last):
  File "/Users/belbis/Desktop/stream_test.py", line 20, in <module>
    for q in query1:
  File "build/bdist.macosx-10.8-intel/egg/couchbase/views/iterator.py", line 390, in __iter__
  File "build/bdist.macosx-10.8-intel/egg/couchbase/views/iterator.py", line 361, in _get_page
  File "build/bdist.macosx-10.8-intel/egg/couchbase/views/iterator.py", line 361, in <genexpr>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting object: line 1 column 108 (char 108)

We did some investigation into the matter and if we catch this exception in the json.loads method and append a '}' to the end of the object being scanned, the error goes away. We are not sure how this occurs but we believe that the streaming=True parameter being passed to the view causes it to drop a the closing json character (or something else we're not exactly sure).

We are able to replicate this behavior in the sample bucket 'beer-sample' with a simple test.

I created a design doc 'b' and added two views 'stream_test1' and 'stream_test2'. The attached stream_test.py will attempt to iterate over the two views (both with streaming enabled and disabled). What you will see is that the view that emits a value will fail with streaming=True enabled. This error will also happen if you use the view iterator constructor so we assume that the problem is in the handling of the result object and not the iterator itself.

We would appreciate any input you guys could give on what's going on here. For the time being we are able to work around this by using only keys in views we need to stream. However certain processes are being bogged down by this issue.


 Comments   
Comment by Mark Nunberg [ 19/Nov/13 ]
I did fix a bit of the streaming stuff in the next release. I'll see if it's broken there too.
Comment by Mark Nunberg [ 03/Dec/13 ]
    def test_pycbc_206(self):
        # Streaming with values
        view = self.cb.query("beer", "by_location", streaming=True, reduce=False)
        rows = list(view)
        self.assertTrue(len(rows))

Seems to work. However I'm quite sure it also works with 1.1.0 - so i'm digging in a bit more..
Comment by Mark Nunberg [ 03/Dec/13 ]
So I've reproduced it by usign the exact view mentioned. Let's see if this still happens in the latest version..
Comment by Mark Nunberg [ 03/Dec/13 ]
And it does..
Comment by Mark Nunberg [ 03/Dec/13 ]
http://review.couchbase.org/30805
Comment by Mark Nunberg [ 16/Dec/13 ]
https://github.com/couchbase/couchbase-python-client/commit/15dd72aa297da40284cc90cc648274c4d0abe132




[PYCBC-205] Query on mapkey_range Created: 07/Nov/13  Updated: 16/Dec/13  Resolved: 16/Dec/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.1.0
Fix Version/s: 1.2.0
Security Level: Public

Type: Bug Priority: Major
Reporter: adonoho Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: customer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Ubuntu 13.10 or OS X 10.8.5 both using CB v2.2.0.


 Description   
Gentlefolk,

The following method worked under Python Client SDK v1.0.0.

def by_timestamp_and_text_and_text(cb, timestamp, period):

    q = Query()

    q.stale = STALE_UPDATE_BEFORE
    q.mapkey_range = [[timestamp, 'A', 'a'], [timestamp + period, q.STRING_RANGE_END, q.STRING_RANGE_END]]
    q.inclusive_end = False
    q.reduce = False

    results = cb.query("a_design_document", "by_timestamp_and_text_and_text", include_docs=False, query=q)

    return results

## by_timestamp_and_text_and_text()


It is looking for keys of the form: [(int)timestamp, (str)allCapsText, (str)text]


Using the Python client SDK v 1.1.0, it throws the following error:

HttpResult<RC=0x0, Value={'reason': 'invalid UTF-8 JSON: {{error,{9,"lexical error: invalid char in json text.\\n"}},\n <<"{\\"keys\\":None}">>}', 'error': 'bad_request'}, HTTP=400



Here's the query string throwing the above:

reduce=false&endkey=%5B1381122000%2C%20%22%5Cu0fff%22%2C%20%22%5Cu0fff%22%5D&startkey=%5B1381118400%2C%20%22A%22%2C%20%22a%22%5D&stale=false&inclusive_end=false



Here it is URL decoded:

reduce=false&endkey=[1381122000, "\u0fff", "\u0fff"]&startkey=[1381118400, "A", "a"]&stale=false&inclusive_end=false



An important query in my app no longer functions. Any suggested work arounds?

Anon,
Andrew

 Comments   
Comment by Mark Nunberg [ 07/Nov/13 ]
See https://github.com/couchbase/couchbase-python-client/commit/0f400567a7f5e83d5da35347a4b9fb2684128f1c for a fix. This will be bundled with the next release

Tell me if this fixes your issue
Comment by adonoho [ 07/Nov/13 ]
Mark,

Yes, this fixes the issue on both OS X and Ubuntu.

Thank you.

Anon,
Andrew
Comment by Larry Liu [ 09/Dec/13 ]
Hi, Mark

Is this gonna available in next release?

Larry




[PYCBC-203] View API does not work correctly when using a long key (more than 150 chars) Created: 21/Oct/13  Updated: 03/Nov/13  Resolved: 03/Nov/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.1.0
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Tug Grall (Inactive) Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Tested with :
SDK 1.1.0 / LibCouchbsae 2.3.1
Couchbase Server 2.2 and 2.1.1
All on OS X


 Description   
See http://www.couchbase.com/communities/q-and-a/python-sdk-bug-query-loooong-key

Create a view that generate an index with a long key, more than 151 chars. For example I have created the following documents:

{code}
{
  "key": "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567899999",
  "name": "tug"
}
{code}
I have created a view that use the key attribute
{code}
function (doc, meta) {
  emit(doc.key);
}
{code}
Using this key in a query does not work:

{code}
#!/usr/bin/env python
from couchbase import Couchbase
from couchbase.views.params import UNSPEC, Query
cb = Couchbase.connect(bucket='default')
k = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567899999",

rows = cb.query("test", "test", key=k)

for row in rows:
    print "Key \"%s\". ID '%s'" % (row.key, row.docid)
{code}

I have tested in Java and REST and it is working




[PYCBC-200] persist_to/replicate_to in set not respecting negative values Created: 18/Oct/13  Updated: 22/Oct/13  Resolved: 22/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.1.0
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
If negative values are passed in for persist_to/replicate_to, the callbacks.c code does not honor it, and is further not able to handle a negative return code from the server correctly.




[PYCBC-199] Handle non-keys long URIs Created: 18/Oct/13  Updated: 22/Oct/13  Resolved: 22/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.1.0
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
We need to handle long URIs where the long component is not just keys but perhaps other fields.

Do we need to issue a POST request still?

 Comments   
Comment by Mark Nunberg [ 22/Oct/13 ]
duplicate of PYCBC-203 (using my bug as duplicate in favor of user bug)




[PYCBC-202] Create tests for embedded ensure i.e. set(..persist_to Created: 18/Oct/13  Updated: 22/Oct/13  Resolved: 22/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Currently the two code paths aren't that similar, so we need tests for the embedded endure scenario as well




[PYCBC-201] Provide 'endure pipeline' Created: 18/Oct/13  Updated: 22/Oct/13  Resolved: 22/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Provide an endure context manager (similar to the pipeline context manager)




[PYCBC-197] Failure on lcb_wait() triggers assertion Created: 10/Oct/13  Updated: 17/Oct/13  Resolved: 17/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.0 Beta, 1.0.0, 1.1.0
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: customer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
https://github.com/couchbase/couchbase-python-client/blob/1.0.0/src/oputil.c#L60-65

The code assumes that a failure of lcb_wait() means it could not run the event loop, while this is not true. The failure means that the last operation resulted in error

 Comments   
Comment by Mark Nunberg [ 10/Oct/13 ]
http://review.couchbase.org/#/c/29459/




[PYCBC-194] Twisted support Created: 02/Oct/13  Updated: 17/Oct/13  Resolved: 17/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.2.0
Security Level: Public

Type: Epic Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This adds twisted support.




[PYCBC-192] lockmode not being propagated to Connection ctor Created: 30/Sep/13  Updated: 01/Oct/13  Resolved: 01/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt: start-finish




[PYCBC-185] Installation instructions are a little vauge Created: 11/Sep/13  Updated: 25/Sep/13  Resolved: 25/Sep/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 1.0.0
Fix Version/s: None
Security Level: Public

Type: Improvement Priority: Major
Reporter: Perry Krug Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The docs mention requirements for a C compiler and the Python development packages but don't really give clear instructions or examples of what needs to be installed.

Including something like:
"yum install python-devel" (and whatever else is needed) would be very helpful to new users who are looking for simple copy-paste instructions.




Update documentation for 1.1.0 (PYCBC-163)

[PYCBC-168] Document new get_replica API Created: 30/Jul/13  Updated: 01/Aug/13  Resolved: 01/Aug/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 1.1.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Technical task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





Update documentation for 1.1.0 (PYCBC-163)

[PYCBC-164] Document new Item API Created: 30/Jul/13  Updated: 01/Aug/13  Resolved: 01/Aug/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: None
Fix Version/s: 1.1.0
Security Level: Public

Type: Technical task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-195] delete method lacks persist_to/replicate_to options. Created: 02/Oct/13  Updated: 22/Oct/13  Resolved: 22/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.1.0
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Currently this may be acheived by explicitly calling endure/endure_multi




[PYCBC-196] Item should feature a convenience wrapper from which to create a collection Created: 02/Oct/13  Updated: 17/Oct/13  Resolved: 17/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.1.0
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-193] Long URIs should have "keys" as POST requests for views Created: 01/Oct/13  Updated: 01/Oct/13  Resolved: 01/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Matt Ingenthron [ 01/Oct/13 ]
Note that I later learned this is ONLY valid with keys as a parameter. Everything else has to go through GET.

I don't have documentation to back that up, but you should check with Filipe or Alk on the specific interface.
Comment by Mark Nunberg [ 01/Oct/13 ]
Alright, fixed up
Comment by Mark Nunberg [ 01/Oct/13 ]
http://review.couchbase.org/#/c/29276/




[PYCBC-184] incorrect statement about dev design documents Created: 06/Sep/13  Updated: 25/Sep/13  Resolved: 25/Sep/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
"While the design documents are in development, the index is applied only on the local node." is in the tutorial. That's not actually true. It's on a "deterministic subset of the data" in the bucket, not just on the local node. The actual (current) implementation is that it's a single vbucket, but we reserve the right to change that as long as the deterministic subset remains the same.

 Comments   
Comment by Mark Nunberg [ 07/Sep/13 ]
This likely exists in Java too
Comment by Mark Nunberg [ 25/Sep/13 ]
https://github.com/mnunberg/pycbc-docs/commit/c8876418bda4cfddc56019a7858f22e59b71b7db




[PYCBC-175] Expose lcb_cntl(..., LCB_CNTL_SKIP_CONFIGURATION_ERRORS_ON_CONNECT, ..) Created: 21/Aug/13  Updated: 08/Jan/14  Resolved: 08/Jan/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.0
Security Level: Public

Type: Task Priority: Major
Reporter: Sergey Avseyev Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
depends on CCBC-192 Failure to handle host that has been ... Resolved

 Description   
There is a special mode which helps users to manage stale bootstrap node list.

Use case:

1) setup and deploy application to bootstrap with node1,node2,node3
2) over the time, admins eject node1 and it might still be listening on 8091
3) the application should skip LCB_AUTH_ERROR errors and LCB_BUCKET_ENOENT on node1 and continue with node2

Obviously after successful bootstrap, the list of "known" nodes will be updated for the particular connection. The problem in on-disk configuration

 Comments   
Comment by Mark Nunberg [ 08/Jan/14 ]
Resolved as part of PYCBC-213




[PYCBC-171] Too many open connections when running view queries Created: 09/Aug/13  Updated: 03/Sep/13  Resolved: 03/Sep/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0.0
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: Pavel Paulau Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: CentOS 6.4, libcouchbase 2.0.7, there 4 nodes in target cluster.

Issue Links:
Dependency
depends on CCBC-226 Support HTTP keepalive semantics for ... Resolved

 Description   
I start multiple clients so that they perform about 2000 queries per second.

Eventually I receive lots of errors:

[09/Aug/2013 02:18:20] WARNING - <RC=0x18[Connection failure], There was a problem scheduling your request, or determining the appropriate server or vBucket for the key(s) requested. This may also be a bug in the SDK if there are no network issues., C Source=(src/http.c,317)>

Apparently I see many connections in TIME_WAIT state (60000-80000 connections):

tcp 0 0 172.23.96.10:52484 172.23.96.18:8092 TIME_WAIT -
tcp 0 0 172.23.96.10:52996 172.23.96.16:8092 TIME_WAIT -
tcp 0 0 172.23.96.10:52997 172.23.96.16:8092 TIME_WAIT -
tcp 0 0 172.23.96.10:52994 172.23.96.16:8092 TIME_WAIT -

 Comments   
Comment by Mark Nunberg [ 09/Aug/13 ]
Libcouchbase doesn't have keepalive implemented yet, but we're working on it..
Comment by Pavel Paulau [ 09/Aug/13 ]
Is it expected any time soon?
Comment by Mark Nunberg [ 09/Aug/13 ]
It's probably going to be in version 2.2 of libcouchbase.. so give about a month - :)
Comment by Sergey Avseyev [ 15/Aug/13 ]
Fixed in libcouchbase http://review.couchbase.org/28085
Will be released in 2.1

(not really keep-alive implemented, but rather asking server to close the connection)
Comment by Mark Nunberg [ 03/Sep/13 ]
fixed as LCB




[PYCBC-172] Implement Connection._close Created: 09/Aug/13  Updated: 17/Aug/13  Resolved: 17/Aug/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.1.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This experimental feature will remove all resources used by the underlying libcouchbase instance.

Implementation details - in order to make sure a NULL pointer isn't being used for the various SDK APIs, a new "empty" object will be created - however it will not be initialized.

The reason for the underscore is:

1) This is not considered a normal feature. This is a rather internal aspect of the SDK and may cause the application to perform in unexpected (though not undetermined) state.
2) We don't want to mandate calling 'close()' as part of the API. For normal usage no specific 'close()' functionality is needed

 Comments   
Comment by Mark Nunberg [ 14/Aug/13 ]
In progress

http://review.couchbase.org/#/c/28228/




[PYCBC-156] Create Item API Created: 23/Jul/13  Updated: 24/Jul/13  Resolved: 24/Jul/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0
Security Level: Public

Type: New Feature Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The new "Item" API relates somewhat to some community postings about being able to properly track the values from mutation operations.

The Item structure itself is fairly simple and is simply a logical extension of the ValueResult API (no defaults are changed and the Item object can be used as a ValueResult object).

The changes are in the ability to pass an already-created Item and receive it back, therefore eliminating a potential "conversion" step.

Another thing this API does is add a consistent means by which to specify per-item options for *_multi operations.




[PYCBC-158] Restore get-with-format Created: 23/Jul/13  Updated: 24/Jul/13  Resolved: 24/Jul/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt: start-finish
is triggering PYCBC-153 Appending strings results in ValueFor... Resolved

 Description   
Get-with-format was present in 0.9, but no longer in 1.0.0. Rather than forcing a specific format, the option will be a localized form of 'data_passthrough'; i.e. get(..., no_format=True)

 Comments   
Comment by Mark Nunberg [ 23/Jul/13 ]
http://review.couchbase.org/27623




[PYCBC-157] Provide 'FMT_AUTO' pseudo format flag Created: 23/Jul/13  Updated: 06/Aug/13  Resolved: 06/Aug/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt: start-finish
is triggering PYCBC-153 Appending strings results in ValueFor... Resolved

 Description   
See comments in PYCBC-153 for more description

 Comments   
Comment by Mark Nunberg [ 23/Jul/13 ]
http://review.couchbase.org/#/c/27652/
Comment by Mark Nunberg [ 06/Aug/13 ]
https://github.com/couchbase/couchbase-python-client/commit/5cd562d616430f6c72d23bedf638e77791f3827b




[PYCBC-153] Appending strings results in ValueFormatError on get Created: 12/Jul/13  Updated: 23/Jul/13  Resolved: 23/Jul/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Bug Priority: Major
Reporter: Leo Tindle Assignee: Mark Nunberg
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Couchbase 2.0.1 Community Edition, couchbase Python client 1.0.0 (not beta)

Issue Links:
Gantt: start-finish
is triggered by PYCBC-157 Provide 'FMT_AUTO' pseudo format flag Resolved
is triggered by PYCBC-158 Restore get-with-format Resolved

 Description   
When storing strings using the `set` command and using `append` to append another string to it results in a ValueFormatError. It appears that string values are actually converted to JSON instead of just being stored as strings. The result being that the appended string is appended after quotation marks. Adding "baz" to "bar" results in "bar"baz in CB and is now unserializable.

I understand why the error is thrown, and I would expect it from JSON serialized objects, but not from standard strings. Other memcached libraries, and the previous version of the python CB client, worked appropriately. Of course, the code workaround is to use format=couchbase.FMT_BYTES on the set command, but this shouldn't be necessary when flags are already used when storing an object to determine the format. If it is a python string, then mark it as such in the flags, but adding additional escaping breaks other commands that should "just work", especially when wanting to make switching to CB easier.

Example:
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import couchbase
>>> c = couchbase.Couchbase.connect(bucket='default', host='192.168.56.70')
>>> c.set("foo", "bar")
OperationResult<RC=0x0, Key=foo, CAS=0x8bac42ea89010000>
>>> c.append("foo", "baz")
OperationResult<RC=0x0, Key=foo, CAS=0x3ae494c68b010000>
>>> c.get("foo")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/[redacted]/usr/local/lib/python2.7/site-packages/couchbase/connection.py", line 325, in get
    return _Base.get(self, key, ttl, quiet)
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 369, in decode
    raise ValueError(errmsg("Extra data", s, end, len(s)))
couchbase.exceptions.ValueFormatError: <Failed to decode bytes, Results=1, inner_cause=Extra data: line 1 column 5 - line 1 column 8
 (char 5 - 8), C Source=(src/convert.c,215), OBJ='"bar"baz'>
>>>


 Comments   
Comment by Mark Nunberg [ 12/Jul/13 ]
There is no auto-detection magic when storing serialized objects. If the format is JSON then the value will *always* be stored as JSON. If the format is Pickle then it will *always* be stored as pickle.

The flags do not express the native python types, but rather the storage format of the value on the server.

Of course there are conflicting semantics of "Just Work". When using views on strings for example, if they're just stored as plain strings, then they won't just work -- so it's really a question of what preferences you have.

In the future we may wish to add a pseudo FMT_AUTO to "do the right thing" depending on the type; i.e. if it's a dict/list/boolean/None; use JSON; if it's a string type (i.e. basestring) use FMT_UTF8; if it's a 'bytes' object, use FMT_BYTES; if it's something else, use FMT_PICKLE.

I believe this is what you are hinting at.
Comment by Leo Tindle [ 12/Jul/13 ]
FMT_AUTO might be a good option. My primary concern was trying to figure out why append wasn't working when I was porting some code to use the new CB client and expected it to work like the MC clients (like the old CB client did). Perhaps a better explanation in the append/prepend documentation highlighting the fact that, by default and unlike memcached clients, strings are automatically stored as FMT_JSON as well and must be explicitly stored with FMT_UTF8 (or FMT_BYTES) in order for data changes using append/prepend to be formatted correctly for retrieval. A similar message exists in the API documentation, but was not clear that strings are stored this way by default as well (differing from other MC/older CB client).

As a side note, it would be nice if there was an option that could be specified in get() to get the raw data instead of having to change a flag for the entire connection then make sure nothing else uses it before switching back. This way, code that requires the raw output could receive it without affecting other code that needs the converted output that use the same connection object.

But if this is "how it should be," then I guess this ticket can be closed.
Comment by Mark Nunberg [ 23/Jul/13 ]
The behavior stated here isn't a bug per se, so there is nothing to fix. PYCBC-157 has the request for "FMT_AUTO"
Comment by Mark Nunberg [ 23/Jul/13 ]
PYCBC-158 filed as well




[PYCBC-151] Provide backdoor option to override assert behavior in various places Created: 10/Jul/13  Updated: 19/Jul/13  Resolved: 19/Jul/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Task Priority: Major
Reporter: Tommie McAfee Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Provide options to override asserts. While continuing application after assertion is "not supported" we should give the user a chance to try

 Comments   
Comment by Mark Nunberg [ 10/Jul/13 ]
http://review.couchbase.org/#/c/27373/




[PYCBC-148] Views don't return results Created: 03/Jul/13  Updated: 03/Jul/13  Resolved: 03/Jul/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0.0
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: Michael Nitschinger Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
I'm creating this ticket on behalf of a user who is not able to login here.

He's able to create and load a view from the UI like so:

View name is „_design/statistics/_view/class_malware“
 
Map is:
function (doc, meta) {
 
  if (doc.malware == null){
    emit("buggy",1)
  }
  else if (doc.malware == true){
                emit("malware",1);
  }
  else{
                emit("clean",1);
  }
}
 
Reduce ist:
_count
 
Via the URL (/<bucket>/_design/statistics/_view/class_malware?stale=update_after&connection_timeout=60000&limit=10&skip=0&group_level=1) I’ll get the correct result:
 
{"rows":[
{"key":"clean","value":1},
{"key":"malware","value":95}
]
}


Now, when he uses it from the python sdk like this:

print self.__CB.conn.query('/statistics', 'class_malware')
or
print self.__CB.conn.query('statistics', 'class_malware', group_level=1, reduce=True)

He always gets

View<Design=statistics, View=class_malware, Query=Query:'', Rows Fetched=0>

.. when reduce is disabled, also no rows fetched.

If its wrong usage, or incomplete information let me know and I'll work it through with him.Thanks!

 Comments   
Comment by Mark Nunberg [ 03/Jul/13 ]
He needs to *iterate* over the returned object :) -
Comment by Mark Nunberg [ 03/Jul/13 ]
I should probably make this clearer in the '__repr__' output though..
Comment by Torsten Feld [ 03/Jul/13 ]
Hi Mark,

I can confirm that. With iterating over the returned object, it's working. I was just irritated, that I got 0 rows. I think it would be nice to have the number of rows returned 'correctly'. With that information (in my case 2 rows) I'd have known, that i have to do something with the result.

But thank you for pointing that out :)

@Michael: thanks for opening this ticket. ;)

Best regards,
Torsten
Comment by Mark Nunberg [ 03/Jul/13 ]
The View object when first created does not actually connect to the network yet. It only begins iterating once - so no rows have been returned yet.




[PYCBC-145] Support other server implementations for testing Created: 25/Jun/13  Updated: 24/Jul/13  Resolved: 24/Jul/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0 Beta
Fix Version/s: 1.1.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
We should support some other server implementations for automated testing - this might include tihngs like CouchbaseMock and cbgb




[PYCBC-142] Clearer docs about buckets on dedicated ports Created: 24/Jun/13  Updated: 24/Jun/13  Resolved: 24/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 1.0 Beta
Fix Version/s: 1.0.0
Security Level: Public

Type: Task Priority: Major
Reporter: Volker Mische Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Current version


 Description   
The docs on Couchbase.connect() are not clear on what to specify when a bucket of type "Couchbase" is set to a dedicated port. I thought you need to specify the "port" in the connection parameters, but you don't.

 Comments   
Comment by Mark Nunberg [ 24/Jun/13 ]
You don't connect to the bucket -- you connect to the REST/configuration port. The REST/configuration info will tell the client which port the bucket resides on.

While it is possible to have the REST port on a different port other than default, this is not very common and pretty much only used internally (afaik couchbase doesn't have any UI functionality for changing the default RESt port).
Comment by Volker Mische [ 24/Jun/13 ]
Someone on IRC had that problem and I was helping out and found out that it wasn't even clear to me. Perhaps the docs should be more explicit that the connection parameter for the port is for the Couchbase instance and not the bucket.
Comment by Mark Nunberg [ 24/Jun/13 ]
https://github.com/couchbase/couchbase-python-client/commit/e8663deb33bcf2ea4d6a43436016d3459103f337




[PYCBC-140] dfl_fmt decremented too early Created: 20/Jun/13  Updated: 23/Jun/13  Resolved: 23/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.0 Beta
Fix Version/s: 1.0.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This causes crashes on a connection failure as it decrefs Py_None without keeping a reference to it.

 Comments   
Comment by Mark Nunberg [ 20/Jun/13 ]
http://review.couchbase.org/27063




[PYCBC-137] Fix up connection.py module to conform to 'pep8' Created: 17/Jun/13  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0 Beta
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Mark Nunberg [ 17/Jun/13 ]
13:31 <+pavelpaulau> $ pep8 couchbase/ | wc -l
13:31 <+pavelpaulau> 207
13:31 <+pavelpaulau> something to fix as well
13:31 <+pavelpaulau> and it's getting worse
Comment by Mark Nunberg [ 17/Jun/13 ]
http://review.couchbase.org/26983




[PYCBC-139] unlock_multi does not complain about missing cas Created: 17/Jun/13  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.11.1
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-135] Allow transcoder to be either an instance or a class Created: 14/Jun/13  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.0.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
There's been some confusion about folks passing a class object instead of an instance. It should be simple enough to check this during construction.




[PYCBC-134] Client will crash if _multi methods are passed lists with duplicate keys Created: 14/Jun/13  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.10.0, 0.11.1
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
c.get_multi(["foo", "foo"])




[PYCBC-132] Lock without TTL fails with 'encoding error' Created: 13/Jun/13  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.11.1
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This should fail with an ArgumentError instead. It also seems the value does end up being sent to the server.




[PYCBC-130] Segmentation fault when specifying hos:port as host params Created: 13/Jun/13  Updated: 17/Jun/13  Resolved: 17/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 0.9.0
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Bug Priority: Major
Reporter: Pavel Paulau Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Ubuntu 13.04 64-bit, CentOS 6.3 64-bit


 Description   
(gdb) bt
#0 0x00007f5f90bcb57f in lcb_destroy () from /usr/lib/libcouchbase.so.2
#1 0x00007f5f90de8f0e in __pyx_pf_9couchbase_12libcouchbase_10Connection_4__dealloc__ (__pyx_v_self=<optimized out>) at couchbase/libcouchbase.c:4657
#2 __pyx_pw_9couchbase_12libcouchbase_10Connection_5__dealloc__ (__pyx_v_self=0x7f5f9230c978) at couchbase/libcouchbase.c:4623
#3 __pyx_tp_dealloc_9couchbase_12libcouchbase_Connection (o=0x7f5f9230c978) at couchbase/libcouchbase.c:10903
#4 0x00000000004b1a53 in ?? ()
#5 0x000000000047c19d in PyEval_EvalFrameEx ()
#6 0x00000000004e09aa in PyEval_EvalCodeEx ()
#7 0x000000000047c034 in PyEval_EvalFrameEx ()
#8 0x00000000004e09aa in PyEval_EvalCodeEx ()
#9 0x0000000000540412 in PyEval_EvalCode ()
#10 0x000000000054088b in ?? ()
#11 0x00000000004f6454 in PyRun_StringFlags ()
#12 0x000000000042a472 in PyRun_SimpleStringFlags ()
#13 0x0000000000466885 in Py_Main ()
#14 0x00007f5f912faea5 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#15 0x00000000004e1635 in _start ()

Using host="127.0.0.1:8091" instead of host="127.0.0.1", port=8091 causes fault. Not sure if it affects the most recent code base.

 Comments   
Comment by Mark Nunberg [ 13/Jun/13 ]
Actually it does, and there is a fix in progress -- see PYCBC-128




[PYCBC-131] Return more informative error on empty string to get Created: 13/Jun/13  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.11.1
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
couchbase.exceptions.CouchbaseError: <RC=0x7[Invalid arguments], Operational Error, Results=1, C Source=(src/multiresult.c,147)>

Should display the key or object.




[PYCBC-129] Develop Content: deliver create the content behind the agreed upon TOC Created: 12/Jun/13  Updated: 18/Jun/13  Resolved: 18/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File json-document.png    
Issue Links:
Relates to
relates to PYCBC-113 TOC for Python 1.0 Resolved

 Description   
Per major docs process, need to come up with all of the content behind our Python 1.0 documentation.

 Comments   
Comment by Mark Nunberg [ 13/Jun/13 ]
Getting Started section (Asciidoc).

Additionally attached is a screenshot used by a section in the 'Getting Started'
Comment by Mark Nunberg [ 14/Jun/13 ]
Still left to do: Tutorial, Logging/Debugging
Comment by Mark Nunberg [ 14/Jun/13 ]
sample HTML output
Comment by Mark Nunberg [ 14/Jun/13 ]
Added contributing and advanced sections
Comment by Mark Nunberg [ 14/Jun/13 ]
Sample HTML output
Comment by Mark Nunberg [ 14/Jun/13 ]
Tutorial
Comment by Mark Nunberg [ 17/Jun/13 ]
Note that I'm working on some newer revisions; deleting existing stuff (as I've heavily modified it locally) -- will post on monday.
Comment by Mark Nunberg [ 17/Jun/13 ]
I've submitted a pull request here:

https://github.com/couchbase/docs/pull/224
Comment by kzeller [ 18/Jun/13 ]
Merged and validated.
Comment by Mark Nunberg [ 18/Jun/13 ]
There will be another PR coming up soon fixing some minor API changes which have taken place during the review process..
Comment by Mark Nunberg [ 18/Jun/13 ]
I think this can be resolved? We might have some other issues in the docs, but I think the bulk of it is done.
Comment by kzeller [ 18/Jun/13 ]
Yes!




[PYCBC-127] ensure appropriate windows releases are posted to pypi in the release process Created: 05/Jun/13  Updated: 20/Jun/13  Resolved: 20/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Matt Ingenthron
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt: start-finish

 Description   
When releasing a new version, we need to ensure that not only the sdist is posted but also bdist for Windows is posted if appropriate.

We hadn't necessarily defined what we need bdist for, but the likely platforms are Windows x64. Let's talk through this as needed.

 Comments   
Comment by Mark Nunberg [ 09/Jun/13 ]
We'll be needing 8 binaries in total -- which should actually not be that difficult:

We'll be needing x86 and x64 binaries of:

2.6, 2.7, 3.1, and 3.2
Comment by Mark Nunberg [ 20/Jun/13 ]
done in scripts




[PYCBC-124] Provide API to change default JSON/Pickle conversion functions Created: 03/Jun/13  Updated: 05/Jun/13  Resolved: 05/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.11.1
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-122] automate publishing of docs for python Created: 31/May/13  Updated: 20/Jun/13  Resolved: 20/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: None
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Task Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Currently, we publish docs to a site published by the python community, but it would be better to publish to our own autodocs site.

 Comments   
Comment by Mark Nunberg [ 20/Jun/13 ]
done in scripts




[PYCBC-119] Add bucket attribute to see currently connected-to bucket Created: 17/May/13  Updated: 21/May/13  Resolved: 21/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 0.11.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-118] Provide nicer __str__/__repr__ for connection object Created: 17/May/13  Updated: 21/May/13  Resolved: 21/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.10.0
Fix Version/s: 0.11.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-116] Review error messages to ensure they're concise, informative, actionable Created: 16/May/13  Updated: 31/May/13  Resolved: 19/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 0.11.0
Fix Version/s: 0.11.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
There are some like "Couldn't connect", which should be more from a user perspective.




[PYCBC-115] Add touch command Created: 15/May/13  Updated: 16/May/13  Resolved: 16/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.10.0
Fix Version/s: 0.11.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-114] Internal base management implementation Created: 15/May/13  Updated: 16/May/13  Resolved: 16/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.11.0
Fix Version/s: 0.11.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This is a 'basic' HTTP implementation. This will be the basis for views as well. As it stands now, this is an unstable API (i.e. the interface may (and probably *will*)) change. This task is just to get the code bits in order so that we're able to do less work when adjusting APIs




[PYCBC-113] TOC for Python 1.0 Created: 15/May/13  Updated: 14/Jun/13  Resolved: 12/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: None
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Bug Priority: Major
Reporter: Matt Ingenthron Assignee: Matt Ingenthron
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates to
relates to PYCBC-129 Develop Content: deliver create the c... Resolved

 Description   
For the upcoming 1.0 Python client, we'll need to come up with a TOC. Likely something like MB-7714.

 Comments   
Comment by kzeller [ 15/May/13 ]
Not sure who is the subject matter expert on Python but we need input on the topics. Here is the TOC for Java-next-gen:


1. Getting Started
1.1 Preparations
1.2 Hello Couchbase
1.3 Next Steps

2. Tutorial
2.1 Preparations
2.2 Quickstart
2.3 Connection Management
2.4 The Welcome Page
2.5 Managing Beers
2.6 Wrapping Up

3. Using the APIs
3.1 Connection Management
3.2 Retreiving Data
3.3 Mutating Data
3.4 Working with Views
3.5 Applying Persistence Constraints
3.6 Error Handling
3.7 JSON & Object Serialization
3.8 Design Document Management

4. Advanced Usage
4.1 Bulk Loading
4.2 Working with Documents
4.3 Advanced Topics
4.4 Logging & Debugging

5. API Reference
5.1 Method Summary
5.2 Connecting & Disconnecting
5.3 Retreiving Data
5.4 Mutating Data
5.5 Management Operations
5.6 Other Useful Operations

A. Release Notes
B. Contributing
B.1 General Information
B.2 Source Code Styleguide
Comment by Matt Ingenthron [ 15/May/13 ]
Mark ist he SME.

Mark: Using this as a base (unless you have feedback to the contrary), can you edit up a TOC for the Python 1.0 release in this ticket?
Comment by Mark Nunberg [ 15/May/13 ]
I'd probably want to nix (for now):

2.3 Connection Management (it's a simple object, there's no global pooling yet)
3.4 Views (we don't have a stable view API yet)
3.8 ""
3.5 ""
4.4 We don't have any significant logging infrastructure in the SDK

We might want to split 'Preparations' into 'Installing the SDK' and 'Installing the cluster'

Thus:
--------------------------------------------------------------------------------------------------------------------------
1. Getting Started
1.1 Setting up the cluster
1.2 Installing the SDK
1.3 Hello Couchbase
1.4 Next Steps

2. Tutorial
2.1 Preparations
2.2 Quickstart
2.3 Connection Management
2.4 The Welcome Page
2.5 Managing Beers
2.6 Wrapping Up

3. Using the APIs
3.1 Connecting
3.2 Retreiving Data
3.3 Mutating Data
3.4 Working with Views [ NYI (Not Yet implemented) ]
3.5 Applying Persistence Constraints [ NYI ]
3.6 Error Handling
3.7 JSON & Object Serialization
3.8 Design Document Management [ NYI ]

4. Advanced Usage
4.1 Bulk Loading
4.2 Notes for using with (and without) threads (maybe this belogns in advanced)?
4.3 Working with Documents
4.4 Advanced Topics
4.5 Logging & Debugging

5. API Reference
5.1 Method Summary
5.2 Initialization
5.3 Retreiving Data
5.4 Mutating Data
5.5 Management Operations
5.6 Other Useful Operations

A. Release Notes
B. Contributing
B.1 General Information
B.2 Source Code Styleguide
Comment by Mark Nunberg [ 15/May/13 ]
Assigning back to you for review
Comment by Matt Ingenthron [ 29/May/13 ]
In response to your comments...

> 2.3 Connection Management (it's a simple object, there's no global pooling yet)

True, but there is a discussion here about to create and manage connection objects. I think that's critical to mention, if only a few paragraphs.

> 3.4 Views (we don't have a stable view API yet)

True, but we will have by 1.0.

> 3.8 ""

Yeah, if this isn't in 1.0, that's fine to leave it out.

> 3.5 ""

This will be needed for 1.0, so it should be in.

> 4.4 We don't have any significant logging infrastructure in the SDK

Okay to leave it out for now then, sure. Should there be a mention about logging in this section though?
Comment by Mark Nunberg [ 29/May/13 ]
Most of the relevant logging would be inside libcouchbase -- which doesn't really support logging yet. I guess with the packet queue fixes this should be doable, though; but that's fairly ahead.
Comment by kzeller [ 30/May/13 ]
TOC Review Feedback:

"3.5 Applying Persistence Constraints [ NYI ] “

I suppose you will be talking about the “PersistTo and ReplicateTo” parameters.

What is the correct “word” for this, I see persistence constraints, persistence requirement, or even durability:
http://www.couchbase.com/docs/couchbase-sdk-java-1.1/couchbase-sdk-java-set-durability.html
http://www.couchbase.com/docs/couchbase-sdk-net-1.2/couchbase-sdk-net-store-set.html

Just to be sure with use the same all the time

[CHANGED TO "Durability Requirements"]
Comment by Matt Ingenthron [ 30/May/13 ]
To Mark's comments:
That's fair, but look at it from a user perspective. Maybe we just need to state there is no logging in the python client and logging of most cases with Python is typically handled by the platform it's running on, flask, etc. Then the developer should just know to/how to log return values that don't make sense.

It's worth a discussion just so a user wondering about logging knows what they need to do.
Comment by Matt Ingenthron [ 12/Jun/13 ]
Reviewed with Mark, and we've settled on this. We'll open the ticket on delivering the pieces for the next step.

----
1. Getting Started
1.1 Setting up the cluster
1.2 Installing the SDK
1.3 Hello Couchbase
1.4 Next Steps

2. Tutorial
2.1 Preparations
2.2 Quickstart
2.3 Connection Management
2.4 The Welcome Page
2.5 Managing Beers
2.6 Wrapping Up

3. Using the APIs
3.1 Connecting
3.2 Retreiving Data
3.3 Mutating Data
3.4 Working with Views [ in review ]
3.5 Error Handling
3.6 JSON & Object Serialization
3.7 Design Document Management

4. Advanced Usage
4.1 Bulk Loading
4.2 Notes for using with (and without) threads (maybe this belogns in advanced)?
4.3 Working with Documents
4.4 Advanced Topics
4.5 Logging & Debugging

5. API Reference (this will not be in the docbook docs, but we'll check that all of these are covered in the python generated docs)
5.1 Method Summary
5.2 Initialization
5.3 Retreiving Data
5.4 Mutating Data
5.5 Management Operations
5.6 Other Useful Operations

A. Release Notes
B. Contributing
B.1 General Information
B.2 Source Code Styleguide




[PYCBC-111] Memory leak on bad arguments Created: 14/May/13  Updated: 16/May/13  Resolved: 16/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.10.0
Fix Version/s: 0.11.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
There may be a memory leak in the MultiResult object if an error is thrown after the MultiResult object is allocated.

 Comments   
Comment by Mark Nunberg [ 14/May/13 ]
http://review.couchbase.org/26289




[PYCBC-108] Pass ascii=False to json.dumps Created: 12/May/13  Updated: 16/May/13  Resolved: 16/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 0.11.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This will decrease the data size for UTF-8 strings. However this will store JSON as non-ascii. Is this supported? (it should be, as JSON says it's utf-8 by definition).




[PYCBC-107] Support py3's 'dict_keys' for multi methods Created: 12/May/13  Updated: 15/May/13  Resolved: 15/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 0.11.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
'dict_keys' should be supported, rather than forcing users to do list(d.keys()).

 Comments   
Comment by Mark Nunberg [ 13/May/13 ]
http://review.couchbase.org/#/c/26276/
Comment by Mark Nunberg [ 15/May/13 ]
https://github.com/couchbase/couchbase-python-client/commit/8ecbc8ec9f84d20f05046063e027083384906f42




[PYCBC-100] add apache 2.0 copyright headers to repo, appropriate files Created: 01/May/13  Updated: 16/May/13  Resolved: 16/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 0.11.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
See summary.




[PYCBC-92] Provide 'codec' options for keys and values Created: 26/Apr/13  Updated: 21/May/13  Resolved: 21/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.9.0
Fix Version/s: 0.11.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This will be a preliminary interface, and would allow users to circumvent (either for interoperability or for bugs in the client) "hard coded" encoding rules (pun intended)

The constructor for the Connection class should accept a 'codec' which is an object providing the
following functions:

To encode:
encode_key(self, key) => key_as_bytearray

To decode:
decode_key(self, bytearray) => whatever

To encode a value; should return the bytearray and flags to use
encode_value(self, value) => (bytearray, flags)

To decode a value, function should look at flags and return a bytearray
possibly examining flags.

decode_value(self, value, flags) => bytearray

 Comments   
Comment by Mark Nunberg [ 30/Apr/13 ]
http://review.couchbase.org/#/c/25948/




[PYCBC-88] Add support for increment/decrement Created: 26/Apr/13  Updated: 30/Apr/13  Resolved: 30/Apr/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 0.9.0
Security Level: Public

Type: New Feature Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Add support for increment and decrement.




[PYCBC-89] Implement add/replace Created: 26/Apr/13  Updated: 30/Apr/13  Resolved: 30/Apr/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.9.0
Fix Version/s: 0.9.0
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[PYCBC-83] Python client fails to encode view parameters Created: 09/Feb/13  Updated: 05/Jun/13  Resolved: 05/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.8.0
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Bug Priority: Major
Reporter: Mike Wiederhold Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
http://www.couchbase.com/forums/thread/reporting-issue-python-client-bucket-viewoptions-needs-encode-options

During querying a view, if the option is not encoded, it generates an error.
Example:
bucket.view("_design/beer/_view/by_name", limit=10, key="##")
The "##" characters generates:
"invalid UTF-8 JSON: {{error,insufficient_data},"[\"NONE"}"
The Couchbase Python client code should encode all the params in the client.py: view() method.

Please follow up with the user who posted the issue on the forums once this issue is resolved.




[PYCBC-82] Error handling documentation Created: 05/Feb/13  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 0.8.0
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Improvement Priority: Major
Reporter: Perry Krug Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Please create some documentation specifying possible error/failures to operations, what they "look" like in the logs/exceptions/stack traces and what our recommendation is on how to handle them.

i.e. tmp_oom, timeouts (connection/operation/java-internal/etc), "get miss" (it's technically a failure, let's make it overly obvious what it means), CAS failure, add() failure, replace() failure,

Some of this should be covered in the API reference, but this bug is specifically for a single page where this information is aggregated that a customer/user could read about how to handle errors.




[PYCBC-70] shutdown in client takes over 2 seconds Created: 08/Nov/12  Updated: 04/May/13  Resolved: 04/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 0.8.0
Fix Version/s: 0.9.0
Security Level: Public

Type: Bug Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The shutdown function in the Couchbase object seems to take over 2 seconds.

From the discussion with the bug reporter:
@ingenthr it looks like the mc_client.done() is the culprit. the bucket is being deleted every request, calling mc_client.done() which is taking 2.3 sec to finish asa @ 2:00

oh? thanks for tracing that down! I'll get an issue filed ingenthr @ 2:00
perezd [~derek@23-24-210-193-static.hfc.comcastbusiness.net] entered the room. 2:00

client.Bucket asa @ 2:01
perezd left the room (quit: Client Quit). 2:01

that's interesting ingenthr @ 2:03
I wonder what it's doing there 2:03
 
is it bad to not properly shutdown? asa @ 2:08
looks like there is self._dispatcher_stopped_event.wait(2) 2:08
 
well, I think there's a configuration thread. it may leak something? I'm not certain to be honest ingenthr @ 2:08

comment it out and suddenly it iis very fast. asa @ 2:08
line 66 in couchbaseclient.py 2:09
 
heh ingenthr @ 2:09
well, this has been the area we need to fix I beleive 2:09
 
asa @ 2:10





[PYCBC-68] cannot delete design doc Created: 18/Sep/12  Updated: 05/Jun/13  Resolved: 05/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 0.8.0
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Bug Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This may be related to the _rev changes with design docs recently. It could also be related to authentication changes.

http://www.couchbase.com/forums/thread/python-client-delete-design-doc

 Comments   
Comment by Matt Ingenthron [ 18/Sep/12 ]
From the bug reporter:

Server is 2.0.0. I've updated the python client to 0.8.0 and the problem remains although with a different error message;

File "/Volumes/DATA/dv/epic/server/venv/lib/python2.7/site-packages/couchbase/client.py", line 254, in delete
rest.delete_view(self.name, view)
AttributeError: 'RestConnection' object has no attribute 'delete_view'

I think the problem lies simply within the Python client; inspecting client.py:254 there's a call to a non existent function delete_view().. probably should be RestConnection.delete_design_doc().




[PYCBC-59] Provide Standardized Logging Created: 24/Aug/12  Updated: 19/May/13  Resolved: 19/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: Public

Type: Improvement Priority: Major
Reporter: Anonymous Assignee: Mark Nunberg
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Provides the consistent level of logging provided by other SDKs. Provide more information on configuring logging for developers.

 Comments   
Comment by Mark Nunberg [ 19/May/13 ]
logging at the sdk level is a task which will be delegated to lcb




[PYCBC-46] Unittests covering > 50% of the code Created: 25/Jul/12  Updated: 25/Jul/12  Resolved: 25/Jul/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 0.7
Security Level: Public

Type: New Feature Priority: Major
Reporter: Benjamin Young Assignee: Benjamin Young
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Benjamin Young [ 25/Jul/12 ]
python setup.py nosetests generates HTML coverage reports in the 'cover' folder of the source folder.

0.7 will be 59% "covered" at the time of release.




[PYCBC-45] Remove Couchbase.save({'_id':'key', 'json':'doc'}) in favor of .set() doing key name detection Created: 24/Jul/12  Updated: 30/Aug/12  Resolved: 30/Aug/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 0.8.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Benjamin Young Assignee: Benjamin Young
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
It seems .save() was added to do some special handling (_design/doc PUTing). It leans on doc._id which is going away in 2.0, so it "smells" if nothing else.

Additionally, leaning on .set() and cb['bucket']['key'] = 'value' for the API will give us great consistency and less confusion.

.save() should be deprecated
.set() should use JSON by default
.set() should handle keys named '_design/(*)' via the HTTP API

 Comments   
Comment by Benjamin Young [ 30/Aug/12 ]
http://review.couchbase.org/#/c/20165/




[PYCBC-43] Update the getting started to match the Beer sample DB Created: 12/Jul/12  Updated: 18/Jun/13  Resolved: 18/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: None
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Once the sample DB has been integrated into the server, update the getting started (both on the web page and in the documentation) to use the sample database.


 Comments   
Comment by Mark Nunberg [ 18/Jun/13 ]
Fixed in the docs.




[PYCBC-41] View error options at query time Created: 12/Jul/12  Updated: 05/Jun/13  Resolved: 05/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks PYCBC-27 support errors on views Resolved

 Description   
At view query time, we need to ensure the developer has the ability to add an "on_error" parameter with values of either "stop" or "continue".





[PYCBC-44] Updated screencast for /develop pages Created: 12/Jul/12  Updated: 10/May/13  Resolved: 10/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Create an updated screencast to ship with the new 2.0 developer SDKs

 Comments   
Comment by Matt Ingenthron [ 10/May/13 ]
We've decided to defer this.




[PYCBC-40] RESTful Bucket Flushing Created: 12/Jul/12  Updated: 30/Aug/12  Resolved: 30/Aug/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 0.8.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Benjamin Young
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Add the ability to call the RESTful bucket flush.


 Comments   
Comment by Benjamin Young [ 30/Aug/12 ]
http://review.couchbase.org/#/c/20389/




[PYCBC-64] Improve design document management error handling Created: 30/Aug/12  Updated: 05/Jun/13  Resolved: 05/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 0.8.0
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Improvement Priority: Major
Reporter: Benjamin Young Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The most likely error that needs better handling is invalid JavaScript.

 Comments   
Comment by Benjamin Young [ 31/Aug/12 ]
Docs for potential errors:
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-designdoc-api-retrieving.html
Comment by Mark Nunberg [ 04/Jun/13 ]
This will be resolved - the exception formatting is much nicer so the reason for error should be quite evident :)




[PYCBC-48] Fatal warning during client installation Created: 31/Jul/12  Updated: 07/Aug/12  Resolved: 07/Aug/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.7
Fix Version/s: 0.7.1
Security Level: Public

Type: Bug Priority: Major
Reporter: Pavel Paulau Assignee: Benjamin Young
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: virtualenv --no-site-packages -p python2.7 test_install_2.7
virtualenv --no-site-packages -p python2.6 test_install_2.6


 Description   
> Steps to reproduce:
pip install couchbase

> Expected output:

Downloading/unpacking couchbase
  Downloading couchbase-0.7.0.tar.gz
  Running setup.py egg_info for package couchbase

> Actual output:

Downloading/unpacking couchbase
  Downloading couchbase-0.7.0.tar.gz
  Running setup.py egg_info for package couchbase
    fatal: Not a git repository (or any of the parent directories): .git

> Tip:
def get_version():
    try:
        p = subprocess.Popen('git describe', stdout=subprocess.PIPE,
                             shell=True)
        version = p.communicate()[0].strip()
    except:
        version = ''
    return version

 Comments   
Comment by Pavel Paulau [ 31/Jul/12 ]
Raising to major because it may fail completely if end user does't have git (not sure about this, though).




[PYCBC-39] Add Design document management, including error handling Created: 12/Jul/12  Updated: 30/Aug/12  Resolved: 30/Aug/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 0.8.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Benjamin Young
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Add the additional functionality needed to create and replace design documents. This will likely be an extension on the Bucket class.


 Comments   
Comment by Matt Ingenthron [ 24/Aug/12 ]
Since this is mostly done, please either complete error handling or file specific bugs on the types that need to be handled and close this.
Comment by Benjamin Young [ 30/Aug/12 ]
Needs further exploration, so throwing to 0.9.0:
http://www.couchbase.com/issues/browse/PYCBC-64




[PYCBC-36] Implement observe command Created: 12/Jul/12  Updated: 18/Jun/13  Resolved: 18/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0 Beta
Security Level: Public

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Add the basic low level observe command





[PYCBC-38] Replica read command Created: 12/Jul/12  Updated: 24/Jul/13  Resolved: 24/Jul/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1.0
Security Level: Public

Type: New Feature Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Implement a simple replica read command





[PYCBC-27] support errors on views Created: 22/Mar/12  Updated: 05/Jun/13  Resolved: 05/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0 Beta
Security Level: Public

Type: New Feature Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
depends on PYCBC-41 View error options at query time Resolved

 Description   
Views now have some options on capturing errors and stopping on errors as documented here:
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-writing-errors.html

The client needs to support these.

 Comments   
Comment by Mark Nunberg [ 04/Jun/13 ]
We need a way to test this properly. Some ideas would be nice.




[PYCBC-20] couchbase client doesn't work against a bucket with dedicated port and no password Created: 26/Dec/11  Updated: 31/Aug/12  Resolved: 31/Aug/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.5
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: Farshid Ghods (Inactive) Assignee: Farshid Ghods (Inactive)
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
this impacts cbworkloadgen

 Comments   
Comment by Farshid Ghods (Inactive) [ 26/Dec/11 ]
this type of bucket is an ascii bucket so python client does not need to support this client
Comment by Matt Ingenthron [ 17/Feb/12 ]
There is no such thing as an ascii bucket, really. Moxi must be talking to it over binary. So what's the auth?

Farshid, you were the reporter here too. Should this be closed?
Comment by Bin Cui [ 13/Aug/12 ]
Reassign back to farshid




[PYCBC-19] use zlib.crc32 in couchbaseclient.py Created: 26/Nov/11  Updated: 07/Dec/11  Resolved: 07/Dec/11

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: Farshid Ghods (Inactive) Assignee: Matt Ingenthron
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Farshid Ghods (Inactive) [ 07/Dec/11 ]
https://github.com/couchbase/couchbase-python-client/commit/a9a0d666835fcde8465e4b78a4561b3c38f78c7a




[PYCBC-61] Provide Get and Lock Created: 24/Aug/12  Updated: 15/May/13  Resolved: 15/May/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 0.11.0
Security Level: Public

Type: Improvement Priority: Major
Reporter: Anonymous Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Provide get and lock as an API method.

 Comments   
Comment by Mark Nunberg [ 13/May/13 ]
http://review.couchbase.org/#/c/26277/
Comment by Mark Nunberg [ 15/May/13 ]
https://github.com/couchbase/couchbase-python-client/commit/9152cfabe257ccc4199f0ab13b298eb84cff840d




[PYCBC-57] Provide Error Handling Consistent with Other SDKs Created: 24/Aug/12  Updated: 18/Jun/13  Resolved: 18/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 0.11.1
Security Level: Public

Type: Improvement Priority: Major
Reporter: Anonymous Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Need to provides consistent error messages and error handling. Needs to be more consistent with other SDKS, and underlying memcached protocol




[PYCBC-53] improve bucket creation defaults Created: 07/Aug/12  Updated: 07/Aug/12  Resolved: 07/Aug/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 0.7.2
Security Level: Public

Type: Improvement Priority: Major
Reporter: Benjamin Young Assignee: Benjamin Young
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Benjamin Young [ 07/Aug/12 ]
http://review.couchbase.org/#change,19287

ramQuotaMB is now set to 100 by default
authType is set to sasl by default

Several asserts were added for better error
catching and reporting on invalid combinations
or values.

Additionally, server-side validation
is now being done to check for port duplicates,
name taken, and similar checks.




[PYCBC-51] install fails owing to missing version Created: 07/Aug/12  Updated: 07/Aug/12  Resolved: 07/Aug/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: 0.7.2
Security Level: Public

Type: Bug Priority: Major
Reporter: Matt Ingenthron Assignee: Benjamin Young
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Trying to install via PyPi with 0.7.1, ran into this issue:


(pyenv)ingenthr-mbp:~ ingenthr$ pip install couchbase
Downloading/unpacking couchbase
  Downloading couchbase-0.7.1.post1.tar.gz
  Running setup.py egg_info for package couchbase
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/Users/ingenthr/opt/pyenv/build/couchbase/setup.py", line 25, in <module>
        from version import get_git_version
    ImportError: No module named version
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/Users/ingenthr/opt/pyenv/build/couchbase/setup.py", line 25, in <module>

    from version import get_git_version

ImportError: No module named version

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /Users/ingenthr/opt/pyenv/build/couchbase
Storing complete log in /Users/ingenthr/.pip/pip.log





[PYCBC-35] Invalid reference made to create_view Created: 02/Jul/12  Updated: 24/Aug/12  Resolved: 24/Aug/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 0.7
Security Level: Public

Type: Bug Priority: Major
Reporter: Mike Wiederhold Assignee: Benjamin Young
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
See this forum post for details.

http://www.couchbase.com/forums/thread/python-client-library-import-bug-and-fix

 Comments   
Comment by Benjamin Young [ 24/Aug/12 ]
Done some time ago.




[PYCBC-31] python SDK disables all logging Created: 21/May/12  Updated: 03/Aug/12  Resolved: 03/Aug/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.0.0
Fix Version/s: 0.7
Security Level: Public

Type: Bug Priority: Major
Reporter: Steve Yen Assignee: Benjamin Young
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
took a few hours to find why logging in my python app stopped working, and it's because I started using the couchbase python SDK which strangely disables logging...

  logging.disable(logging.ERROR)

here...

  https://github.com/couchbase/couchbase-python-client/blob/master/couchbase/client.py#L33

the temporary workaround in my app was to call...

  logging.disable(logging.NOTSET)

but, that's just a hack workaround against a socially awkward (read: rude) implementation.



 Comments   
Comment by Benjamin Young [ 03/Aug/12 ]
Fixed here: http://review.couchbase.org/17039




[PYCBC-16] increment from two clients seems to not work Created: 07/Sep/11  Updated: 30/Aug/12  Resolved: 30/Aug/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.5
Fix Version/s: 0.8.0
Security Level: Public

Type: Bug Priority: Major
Reporter: Matt Ingenthron Assignee: Benjamin Young
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This was originally observed with an older version, and in trying to reproduce it the latest change seems to show incr/decr is further broken. Still, this should be an easy test to add since it's been verified to fail.

from pymembase.membaseclient import VBucketAwareMembaseClient
client_one = VBucketAwareMembaseClient('http://host/pools/default&#39;,&#39;default&#39;,&#39;&#39;)
client_two = VBucketAwareMembaseClient('http://host/pools/default&#39;,&#39;default&#39;,&#39;&#39;)

# Client one sets a numeric key
client_one.set('jacob',0,0,'20')
client_one.get('jacob')

# Client two tries to increment this numeric key
client_two.incr('jacob')
# This returns (0, cas) - it should be 21!
# Client two can keep incrementing this weird key
client_two.incr('jacob')
# Returns (1, cas)

# However - if client two gets the key...
client_two.get('jacob')
client_two.incr('jacob')
# (21, cas)
# !!!

p.s.: want to thank oliland from IRC on reporting this

 Comments   
Comment by Matt Ingenthron [ 07/Sep/11 ]
Could not reproduce this with another client.
Comment by Oli Kingshott [ 08/Sep/11 ]
Analyzing the binary protocol in Wireshark shows that the VBucketID is not set for the second client when it calls incr() without doing a get() first. Will try and see how this relates to the source code.
Comment by Benjamin Young [ 01/Jun/12 ]
I've added the above code (nearly) as a test case here:
https://github.com/BigBlueHat/couchbase-python-client/commit/e3e31cdf7950abb35012fa06195ffea4c6710019

I'd love to get a few others to test it. It was failing, now it isn't. I've only tested it against 1.8.0 thus far.
Comment by Matt Ingenthron [ 24/Aug/12 ]
@benjamin to run this test again with current codebase and current server, then close if it can't be duplicated.
Comment by Benjamin Young [ 30/Aug/12 ]
http://review.couchbase.org/#/c/20369/




[PYCBC-17] client does not exit cleanly on interpreter exit Created: 08/Sep/11  Updated: 06/Apr/12  Resolved: 06/Apr/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.5
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: Oli Kingshott Assignee: Farshid Ghods (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: all


 Description   
The couchbase client does not exit cleanly when the interpreter exits - i.e. does not disconnect unless you call client.done()

This can be fixed by daemonizing the CommandDispatcher threads. See http://docs.python.org/library/threading.html#threading.Thread.daemon

 Comments   
Comment by Benjamin Young [ 06/Apr/12 ]
Looks like this patch date 8/11/11 (merged on the 25th) does the "daemonization":
http://review.couchbase.org/#change,8889




[PYCBC-14] incr() and decr() not working with VBucketAwareMembaseClient / Membase 1.7 Created: 06/Sep/11  Updated: 31/May/12  Resolved: 31/May/12

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 0.5
Fix Version/s: 0.7
Security Level: Public

Type: Bug Priority: Major
Reporter: Oli Kingshott Assignee: Farshid Ghods (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Client platform: Linux / Windows
Server platform: Membase Server 1.7.1 with 1 active server with a Membase VBucket - any authentication

Attachments: File incr.py    

 Description   
See reproduction code attached. When executed it spits out a lot of errors ('amount') and eventually times out while still erroring in the background.

 Comments   
Comment by Matt Ingenthron [ 06/Sep/11 ]
Oli described what he'd found on investigation to me, and I've now posted a change for review:
http://review.couchbase.org/#change,9404
Comment by Matt Ingenthron [ 07/Sep/11 ]
Fix went through, but seems to have been incorrect (testing 0.5-19-g0680cfe):


>>> client_one.incr('jacob')
Exception in thread dispatcher-thread:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 522, in __bootstrap_inner
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 477, in run
    self.__target(*self.__args, **self.__kwargs)
  File "couchbaseclient.py", line 651, in _start_dispatcher
    self.dispatcher.dispatch()
  File "couchbaseclient.py", line 954, in dispatch
    self.do(item)
  File "couchbaseclient.py", line 1089, in do
    amount = item["amt"]
KeyError: 'amt'

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "couchbaseclient.py", line 908, in incr
    return self._respond(item, event)
  File "couchbaseclient.py", line 820, in _respond
    raise MemcachedTimeoutException(item, timeout)
exception.MemcachedTimeoutException: timeout - memcached did not return in 30 second during incr operation for key jacob
Comment by Oli Kingshott [ 08/Sep/11 ]
This must be for a later build as I can confirm the patch works for release 0.5.
Comment by Benjamin Young [ 31/May/12 ]
The patch Matt mentioned does seem to have fixed the issue. Current incr() tests pass just fine.




[PYCBC-9] an interface to paginate across large view results is needed Created: 22/Aug/11  Updated: 19/Jun/13  Resolved: 19/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.0 Beta
Security Level: Public

Type: New Feature Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
There can be some situations where querying a view returns results that way too large for the client to handle. In these cases, either the client library API or implementation of some Python specific API can allow for one to iterate over Views which have very large results.

The Ruby client does this with streaming. The Java client does this with traditional pagination:
http://guide.couchdb.org/draft/recipes.html#pagination




[PYCBC-3] decr() function fails gracelessly Created: 11/Aug/11  Updated: 12/Aug/11  Resolved: 12/Aug/11

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: Tyler Mitchell Assignee: Keith Batten (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: OSX 10.6, Python 2.6


 Description   
While learning more about the functions in the vbucketawareclient I tried .decr() with minimal parameters. I lost control of my Python session as it didn't really fail gracefully. I wasn't really trying to make it work, but think this is broken :) and really hard to test further because of this tie-up.

Test script:

from couchbase.couchbaseclient import VBucketAwareCouchbaseClient as client
server = "http://localhost:8091/pools/default"
v = client(server,"default","")
# returns 11210
v.set("TESTKEY",0,0,"TESTVALUE")
# returns (4020540899, 602, '')
v.decr("TESTKEY",1)
#[2011-08-11 16:51:52,415] - [couchbaseclient] [4320661504] - ERROR - 'amount'
#[2011-08-11 16:51:52,627] - [couchbaseclient] [4320661504] - ERROR - 'amount'
#[2011-08-11 16:51:52,827] - [couchbaseclient] [4320661504] - ERROR - 'amount'
#.. never ends

 Comments   
Comment by Farshid Ghods (Inactive) [ 12/Aug/11 ]
Assigning to Keith.
Comment by Tyler Mitchell [ 12/Aug/11 ]
Latest fix did the trick. http://review.couchbase.org/#change,8915




[PYCBC-253] Try to handle non-CouchbaseErrors received in callbacks more gracefully Created: 17/Jul/14  Updated: 17/Jul/14  Resolved: 17/Jul/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.2.3
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates to

 Description   
If the library receives a non-pycbc error it will crash due to an assertion failure. We can handle this a bit better - though unfortunately, still no good way to test this




[PYCBC-257] Twisted timer events may sometimes not be propagated, causing hangs in the client Created: 26/Aug/14  Updated: 28/Aug/14  Resolved: 28/Aug/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.2.0
Fix Version/s: 1.2.3
Security Level: Public

Type: Task Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Due to a bug in the current implementation, a timer event which is rearmed within its C handler is not rescheduled becuase it is immediately cancelled back in the Python code. I found this issue observing that the twisted client did not properly switch over providers when one provider failed.




[PYCBC-258] Describe TTL format in documentation Created: 02/Oct/14  Updated: 06/Oct/14  Resolved: 06/Oct/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: apidocs
Affects Version/s: 1.2.3
Fix Version/s: 1.2.4
Security Level: Public

Type: Bug Priority: Major
Reporter: fridental Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Range of possible values for the ttl parameter is documented misleadingly possibly causing inadvertent data loss. For example, when setting ttl for 100 days, according to the doc, one would use the value 100*24*60*60. In fact, this value is above of 30 days, will be converted to unix epoch, resulting a date somewhere in the 1970ies and thereby removing the document.

Check all mentions of the ttl parameter on http://docs.couchbase.com/sdk-api/couchbase-python-client-1.2.3/api/couchbase.html and update the documentation.




[PYCBC-259] design_publish should not delete old design document Created: 06/Oct/14  Updated: 06/Oct/14  Resolved: 06/Oct/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.2.4
Security Level: Public

Type: Bug Priority: Major
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates to

 Description   
This should mimic the behavior of the "publish" button within the web UI




[PYCBC-254] Lock TTL=0 fails. Created: 29/Jul/14  Updated: 31/Jul/14  Resolved: 31/Jul/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: 1.2.2
Fix Version/s: 1.2.3
Security Level: Public

Type: Bug Priority: Major
Reporter: Patrick Varley Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The documentation says "If set to 0 it will use the default lock timeout on the server."

http://pythonhosted.org/couchbase/api/couchbase.html#couchbase.connection.Connection.lock

However when I use ttl=0 I get this error:

Using PYCBC=1.2.2, LCB=('2.1.2', 131330)
Setting
6425942093814169600
Locking with: lock = cb.lock("lock", ttl=0)
Traceback (most recent call last):
  File "./lock.py", line 12, in <module>
    lock = cb.lock("lock", ttl=0)
  File "/Library/Python/2.7/site-packages/couchbase/connection.py", line 594, in lock
    return _Base.lock(self, key, ttl=ttl)
couchbase.exceptions.ArgumentError: <Lock must have an expiry, C Source=(src/get.c,107)>


Code example:

#!/usr/bin/python
import couchbase
from couchbase import Couchbase, Connection

print "Using PYCBC={0}, LCB={1}".format(couchbase.__version__, Connection.lcb_version())
cb = Couchbase.connect(bucket='default', host='localhost')

print "Setting"
doc = cb.set("lock","test")
print doc.cas
print "Locking with: " + 'lock = cb.lock("lock", ttl=0)'
lock = cb.lock("lock", ttl=0)
print lock.cas


 Comments   
Comment by Mark Nunberg [ 29/Jul/14 ]
hrm, I'll consider this a documentation bug since lock should always be used with a timeout to make the code easier to read (most things that "Lock", if not passed a timeout, lock indefinitely, while in the server there is always a maximum limit)
Comment by Mark Nunberg [ 30/Jul/14 ]
http://review.couchbase.org/#/c/40057/




[PYCBC-239] Docs: transcoder improvement Created: 25/Mar/14  Updated: 04/Jun/14  Resolved: 02/May/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Task Priority: Minor
Reporter: Perry Krug Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File patch.diff    

 Description   
I think there's an error in the Python SDK Advanced
Usage page.
Under the Custom Transcoder Objects section:
http://docs.couchbase.com/couchbase-sdk-python-1.2/#custom-transcoder-objects

New to Python and to Couchbase I've been playing around, but was struggling
to get this to work.
I believe the problem is two folds (ignoring the lack of 1import Couchbase`
and `import FMT_BYTES` as this is only a snippet):
- use of `format` instead of `flags` in `decode_value()`
- not converting "long value" to bytes

Please find attached a patch which, if I am correct, I think would save
time, and avoid confusion, to newcomers like me.

 Comments   
Comment by Mark Nunberg [ 01/May/14 ]
https://github.com/couchbaselabs/docs-ng/pull/116




[PYCBC-221] add a configuration cache parameter to connect() and deprecate conncache Created: 14/Jan/14  Updated: 04/Jun/14  Resolved: 19/Feb/14

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 1.1.0, 1.2.0
Fix Version/s: 1.2.1
Security Level: Public

Type: Improvement Priority: Minor
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
When searching for the feature known as "configuration cache", I couldn't find it in the documentation because it's called conncache.

Please change it to reflect the name of the feature. PHP seems to call it config_cache:
http://docs.couchbase.com/couchbase-sdk-php-1.2/

 Comments   
Comment by Mark Nunberg [ 19/Feb/14 ]
http://review.couchbase.org/#/c/32385/11




[PYCBC-189] Add intro to Python SDK guide Created: 24/Sep/13  Updated: 01/Oct/13  Resolved: 01/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 1.0.0
Fix Version/s: 1.0.0
Security Level: Public

Type: Task Priority: Minor
Reporter: Amy Kurtzman Assignee: Gwen Leong (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The SDK guides currently begin with the Getting Started section. They need an introduction and meaningful web page title so customers know what guide they are reading.

For each version of the SDK guide, please:

1. Add a short introduction (# Introduction) before the Getting Started section. Sample intro:
    This guide provides information for developers who want to use the Couchbase <language> SDK to
    build applications that use Couchbase Server.

2. In the corresponding index.erb file, change the title to one that follows this naming pattern:
    Couchbase <language> SDK <version> Guide

 Comments   
Comment by Gwen Leong (Inactive) [ 01/Oct/13 ]
Added.
http://docs.couchbase.com/couchbase-sdk-python-1.0/




[PYCBC-190] CAS missing from ValueResult return in docs. Created: 25/Sep/13  Updated: 25/Sep/13  Resolved: 25/Sep/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Improvement Priority: Minor
Reporter: Robin Johnson (Inactive) Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
A chap has correctly pointed out in our Python docs, we don't include info on the CAS value we get returned in a ValueResult.

http://www.couchbase.com/communities/q-and-a/documentation-omission-cas-valueresult

 Comments   
Comment by Mark Nunberg [ 25/Sep/13 ]
5dc5916aa0940a46df47ef02997327f8e658dbfd




[PYCBC-150] Log REST queries made by the Python client Created: 10/Jul/13  Updated: 24/Jul/13  Resolved: 24/Jul/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.1.0
Security Level: Public

Type: New Feature Priority: Minor
Reporter: Tug Grall (Inactive) Assignee: Mark Nunberg
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Based on the question from the community:
http://www.couchbase.com/communities/q-and-a/feature-request-log-rest-queries-made-python-client

It would be good to log the HTTP call that are made when calling a view, for example in debug mode.



 Comments   
Comment by Mark Nunberg [ 10/Jul/13 ]
I've answered on the forum;

The answer is basically that no logging is required - in Python applications it's generally better that the user provide his own logging (we can use the standard 'logging' module, but that will not print anything by default.

In any event, all the components necessary for logging view requests is present. Perhaps more documentation is in order?

Should this be present in the Couchbase docs? or in the API reference




[PYCBC-141] Add operation is described twice in docs Created: 21/Jun/13  Updated: 24/Jun/13  Resolved: 24/Jun/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: docs
Affects Version/s: 1.0 Beta
Fix Version/s: 1.0.0
Security Level: Public

Type: Bug Priority: Minor
Reporter: Pavel Paulau Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
http://pythonhosted.org/couchbase/api/couchbase.html#couchbase.connection.Connection.add

 Comments   
Comment by Mark Nunberg [ 24/Jun/13 ]
https://github.com/couchbase/couchbase-python-client/commit/e5360d9e820a4d7eaab1a0f8a3110b79e67cd90b




[PYCBC-121] warnings from clang when building Created: 30/May/13  Updated: 01/Oct/13  Resolved: 01/Oct/13

Status: Resolved
Project: Couchbase Python Client Library
Component/s: None
Affects Version/s: 0.11.0
Fix Version/s: 1.1.0
Security Level: Public

Type: Task Priority: Minor
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Mac OS X 10.8, libcouchase 2.0.x, python 2.7.2 (apple installed) under virtualenv


 Description   
Trying a new system, I got several warnings during build.

See below...

(py27)Matts-MacBook-Pro:~ ingenthr$ pip install couchbase
Downloading/unpacking couchbase
  Running setup.py egg_info for package couchbase
    
Installing collected packages: couchbase
  Running setup.py install for couchbase
    building 'couchbase._libcouchbase' extension
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/argument.c -o build/temp.macosx-10.8-intel-2.7/src/argument.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/exceptions.c -o build/temp.macosx-10.8-intel-2.7/src/exceptions.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/ext.c -o build/temp.macosx-10.8-intel-2.7/src/ext.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/result.c -o build/temp.macosx-10.8-intel-2.7/src/result.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/opresult.c -o build/temp.macosx-10.8-intel-2.7/src/opresult.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/callbacks.c -o build/temp.macosx-10.8-intel-2.7/src/callbacks.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/convert.c -o build/temp.macosx-10.8-intel-2.7/src/convert.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    src/convert.c:434:48: warning: implicit conversion loses integer precision: 'unsigned long' to 'lcb_uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
            return encode_common(value, buf, nbuf, flags_stackval);
                   ~~~~~~~~~~~~~ ^~~~~~~~~~~~~~
    src/convert.c:477:14: warning: implicit conversion loses integer precision: 'unsigned long' to 'lcb_uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
        *flags = flags_stackval;
               ~ ^~~~~~~~~~~~~~
    2 warnings generated.
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/connection.c -o build/temp.macosx-10.8-intel-2.7/src/connection.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/store.c -o build/temp.macosx-10.8-intel-2.7/src/store.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/constants.c -o build/temp.macosx-10.8-intel-2.7/src/constants.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/multiresult.c -o build/temp.macosx-10.8-intel-2.7/src/multiresult.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/miscops.c -o build/temp.macosx-10.8-intel-2.7/src/miscops.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/typeutil.c -o build/temp.macosx-10.8-intel-2.7/src/typeutil.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/oputil.c -o build/temp.macosx-10.8-intel-2.7/src/oputil.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/get.c -o build/temp.macosx-10.8-intel-2.7/src/get.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/arithmetic.c -o build/temp.macosx-10.8-intel-2.7/src/arithmetic.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/http.c -o build/temp.macosx-10.8-intel-2.7/src/http.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/htresult.c -o build/temp.macosx-10.8-intel-2.7/src/htresult.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/ctranscoder.c -o build/temp.macosx-10.8-intel-2.7/src/ctranscoder.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    src/ctranscoder.c:94:53: warning: implicit conversion loses integer precision: 'unsigned long' to 'lcb_uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
        rv = pycbc_tc_simple_encode(&vobj, &buf, &nbuf, flags);
             ~~~~~~~~~~~~~~~~~~~~~~ ^~~~~
    src/ctranscoder.c:135:51: warning: implicit conversion loses integer precision: 'unsigned long' to 'lcb_uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
        rv = pycbc_tc_simple_decode(&vobj, buf, nbuf, flags);
             ~~~~~~~~~~~~~~~~~~~~~~ ^~~~~
    2 warnings generated.
    clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch x86_64 build/temp.macosx-10.8-intel-2.7/src/argument.o build/temp.macosx-10.8-intel-2.7/src/exceptions.o build/temp.macosx-10.8-intel-2.7/src/ext.o build/temp.macosx-10.8-intel-2.7/src/result.o build/temp.macosx-10.