Add __version__ (and generate it if necessary)

This is primarily useful for builders to generate a version, and for
users to have version information for the SDK itself.

This also avoids having to manually replace the version string for each
release

Change-Id: Ie05f4a3b48ab277f62276b923a841cfe04236dd0
Reviewed-on: http://review.couchbase.org/27092
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Only set transcoder if tc != NULL

Crashes otherwise (for example when creating admin instances)

Change-Id: Ieb32d27eaf272ddb5517e53fab81d5423ea87248
Reviewed-on: http://review.couchbase.org/27093
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
PYCBC-146: Don't crash on OBSERVE with replicas

Change-Id: Ibcc2b032f321f11497cad8eb7d4cb8c005dde5f4
Reviewed-on: http://review.couchbase.org/27177
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Beef up ObserveInfo __repr__ and constants

- Provide LOGICALLY_DELETED
- Fix bugs in __repr__. Specifically, the current function was being
  used as the __str__ and not __repr__, and bugs would arise for some
constants.

Change-Id: Idb19f44e383721184ea57897d273339db5c04ce8
Reviewed-on: http://review.couchbase.org/27183
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Update release 1.0.0 metadata

The version number doesn't need to change since it's defined based on
the tag. However we're moving from beta to stable

Change-Id: I698ef473476f705ad9c37df998bfdb8a37506467
Reviewed-on: http://review.couchbase.org/27257
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Fix missing 'OBS_LOGICALLY_DELETED'

Change-Id: I25e050ca48d52a843e2880be80f8fb76a3951485
Reviewed-on: http://review.couchbase.org/27398
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
PYCBC-154: [docs] fixup OBS_* namespace

Change-Id: Ibb71cdc0b0c780178c738bfedd52651d6d1c0d86
Reviewed-on: http://review.couchbase.org/27400
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
[docs] Document 'cas' property in OperationResult

Change-Id: I8cb80309393c02fb7fe3019c694f6401986670d3
Reviewed-on: http://review.couchbase.org/27401
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Only include couchbase_version after setting up sys.path

Change-Id: I8d0c79dd5bb7f8f67d3c7920e727789899864b19
Reviewed-on: http://review.couchbase.org/27399
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
PYCBC-151: Provide backdoor to circumvent abort()

On assertion failures.
An environment variable, PYCBC_ASSERT_CONTINUE
is provided to allow this backdoor option

Rather a noisy message is printed to the screen. This allows
not-so-fatal errors to not hamper application flow. The errors may still
result in a segfault and hence the warning (as the assertions will only
fire when internal state is determined to be inconsistent).

Change-Id: Ided29df3e71b2677bbb1f0eb20ba05f30ccb06b7
Reviewed-on: http://review.couchbase.org/27373
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Allow to use CouchbaseMock for tests

This currently relies on a version of CouchbaseMock still in
development; nevertheless these are the Python bits required

Binary may be found in the URL provided in the sample file
Change-Id: I0cdc638bc528e7547b9c81b6a7c404974b384715
Reviewed-on: http://review.couchbase.org/27478
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Implement 'minimum LCB version' for tests

Change-Id: Iba9bdbf481c5aab1124168b2b5fa54c4ede4d550
Reviewed-on: http://review.couchbase.org/27487
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
PYCBC-38: Replica read

Note: Due to bugs in the current libcouchbase and/or mock
implementations, the tests fail (and this functionality) does not work
with the upstream libcouchbase version. A new version would be required
to retain proper functionality for the tests

Note that this feature will only be compiled into the extension if
libcouchbase 2.0.7 or greater is used. The feature itself has known
issues in 2.0.7 which will be fixed in the next libcouchbase release.

Change-Id: I1dbd81165450df384c75e2c57a81520e1d741798
Reviewed-on: http://review.couchbase.org/27488
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Don't cancel http_request_t if lcb function fails

http_request_t is only valid if make_http_request itself does not return
an error

Change-Id: Idabf82e1707c0e64df9f83d7932c2ae0687e08df
Reviewed-on: http://review.couchbase.org/27489
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Update .gitignore

Change-Id: I2ec955a406328d81279c57984e8c30da1056eb5d
Reviewed-on: http://review.couchbase.org/27490
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
PYCBC-156: Item API

Item represents a user-subclassable, in/out object which can be passed
instead of an explicit "key-value" pair for most of our APIs.

Change-Id: Iadb54653c464b32bf0373092f0b0a8c0edbcbb94
Reviewed-on: http://review.couchbase.org/27620
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
[convert.c] Return -1 if flag conversion fails

Change-Id: I7b5724b67484d31d044dec5d15377a13a1276315
Reviewed-on: http://review.couchbase.org/27621
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
PYCBC-155 [docs] Fix parameter name mismatch

Change-Id: Icc6a45a35c373ebb9ec16e6676bdb1fded94287b
Reviewed-on: http://review.couchbase.org/27622
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
PYCBC-158: Add 'no_format' argument to get

This is a localized form of 'data_passthrough'

Change-Id: I38908a7e0b0bdaea0d6f38c5ccab04d0a1b9766d
Reviewed-on: http://review.couchbase.org/27623
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
ignore egg-info

Change-Id: I78114fd5892eb695c5cb0bb0c0e22b88e1de4bed
Reviewed-on: http://review.couchbase.org/27624
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>