Permalink
Commits on Feb 14, 2018
  1. PYCBC-458: fix typo in setup.py

    Ellis Breen
    Ellis Breen committed Feb 14, 2018
    Change-Id: I867c42445ff4c03792e3eb8a8707713ab865f1d2
    Reviewed-on: http://review.couchbase.org/89419
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  2. PYCBC-458: Fix Clang and Python warnings during installation

    Ellis Breen
    Ellis Breen committed Feb 13, 2018
    Motivation
    ----------
    There are various Clang compiler warnings that come up during
    installation, which should be addresed. Additionally, the
    acouchbase iterator module is included in Python<3.4 packages,
    but this module relies on the 'yield from' syntax which is only
    available on Python 3.3 and above, and asyncio which is only
    available in Python 3.4 and above. We may backport this to
    Python2.x using Trollius and Trollius.From in future, but
    for now this module should not be included in Python<3.4
    packages.
    
    Modifications
    -------------
    - Fixed various Clang warnings.
    - Change Ping code to only fill the 'details' field when an
      error has occurred, matching the behaviour of the JSON
      code from LCB. Also use the svc->rc field rather than
      svc->status, as for LCB. Adjust JSON schema in
      tests to allow for optional 'details' field.
    - Selective inclusion of acouchbase.iterator module for
      Python>=3.4
    Results
    -------
    All known warnings/errors eradicated. acouchbase package still
    present in Python>=3.4, with all tests passing.
    
    Change-Id: I4ce792fd8e0a1021c2c7fcbff5dfefd9393b5cd0
    Reviewed-on: http://review.couchbase.org/89347
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  3. PYCBC-451: Python SDK Documentation could use example of upsert invol…

    Ellis Breen
    Ellis Breen committed Feb 13, 2018
    …ving JSON text
    
    Added an example where an object is unmarshaled from JSON text
    and then added with the FMT_JSON flag.
    
    Change-Id: Ie27a17f7ac07dca6ef414d941cac529a2f94f316
    Reviewed-on: http://review.couchbase.org/89357
    Reviewed-by: Matt Ingenthron <ingenthr@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
Commits on Jan 15, 2018
  1. PYCBC-463: Make TxIOEvent API compatible with Tornado

    mattcarabine authored and Ellis Breen committed Jan 15, 2018
    Motivation
    ----------
    
    TxCouchbase can be used in a variety of environments, including within
    a Tornado application, which converts twisted objects into native
    Tornado objects.
    When a connection is lost, Tornado tries to execute a callback to
    TxCouchbase to inform it. Unfortunately the API it uses does not match
    the API of the TxIOEvent, this means that the program will crash due to
    an AttributeError.
    
    Modifications
    -------------
    
    Added two new methods to TxIOEvent, readConnectionLost and
    writeConnectionLost.
    Both of these methods redirect to the existing method connectionLost,
    this ensures that the API does not break for any existing users.
    
    Now TxCouchbase will not crash when a connection fails when running in
    Tornado.
    
    Change-Id: Ia9d22731d1531359d2dbf5b73f90633c1b762802
    Reviewed-on: http://review.couchbase.org/87849
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Ellis Breen <ellis.breen@couchbase.com>
Commits on Jan 12, 2018
  1. PYCBC-451: add test and extra documentation for FMT_UTF8 transcoder

    Ellis Breen
    Ellis Breen committed Jan 12, 2018
    As per title.
    
    Change-Id: Ie54a2f771a3a06cad9f7bb8db88e479f0b617844
    Reviewed-on: http://review.couchbase.org/87796
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
  2. PYCBC-453: certificate auth support

    Ellis Breen
    Ellis Breen committed Jan 11, 2018
    Motivation
    ----------
    libcouchbase 2.8.4 supports X509-style certificate
    authentication via the 'keypath' and 'certpath' parts of
    the connection string. This should be exposed from
    Python.
    
    Modifications
    -------------
    - Added some extra options to test.ini handling to allow
    testing of CA throughout test suite
    - Refactored test.ini option handling
    
    Results
    -------
    - Certificate Authentication verified working.
    
    Change-Id: I64e5b0b57d009b81af4b5ca119370fca1d46f4a4
    Reviewed-on: http://review.couchbase.org/87759
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Matt Ingenthron <ingenthr@gmail.com>
    Reviewed-by: Ellis Breen <ellis.breen@couchbase.com>
Commits on Jan 9, 2018
  1. PYCBC-412: update SDK to provide diagnostics/ping support

    Ellis Breen
    Ellis Breen committed Dec 21, 2017
    Motivation
    ----------
    The libcouchbase SDK has evolved in how it provides
    diagnostics pertinent to the health of the cluster.
    Python SDK must be updated to reflect these changes.
    
    Modifications
    -------------
    - Renamed Bucket.get_health to Bucket.ping (to match lcb_ping3)
    from libcouchbase, to better represent the abstraction level
    provided. Users will have to build their own heuristics that
    interpret the information returned from ping.
    - Exposed the lcb_diag function as Bucket.diag, providing
    activity information, connection status per node,
    as well as API/version information from the client.
    
    Results
    -------
    Client now successfully passes through the diag and
    ping result structures, as validated by the schema listed
    in "couchbase.tests.cases.diag_t".
    
    Change-Id: I15909dca1c12d8e79f9f76bc3419f53ec5424b1a
    Reviewed-on: http://review.couchbase.org/87160
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
    Tested-by: Ellis Breen <ellis.breen@couchbase.com>
Commits on Jan 2, 2018
  1. PYCBC-456: Update Travis CI notification email

    Ellis Breen
    Ellis Breen committed Dec 30, 2017
    Update maintainer email address to generic Python developers'
    alias.
    
    Change-Id: I3876423188c9e1e34c4c5a1695af711afe6a6477
    Reviewed-on: http://review.couchbase.org/87295
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Ellis Breen <ellis.breen@couchbase.com>
Commits on Dec 7, 2017
  1. PYCBC-450: N1QL Consistency documentation say default is 'none'

    Ellis Breen
    Ellis Breen committed Nov 17, 2017
    should be 'not_bounded'
    
    Correct UNBOUNDED constant to 'not_bounded' from 'none', which is not
    a recognised consistency level.
    
    Change-Id: I15e24254dabb81ce802d19100c4d4987dd5246c5
    Reviewed-on: http://review.couchbase.org/85693
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Brett Lawson <brett19@gmail.com>
  2. PYCBC-445: Implement/test support for KV with homogenous IPv6

    Ellis Breen
    Ellis Breen committed Dec 5, 2017
    Motivation
    ----------
    Newer versions of libcouchbase support IPV6 via
    addition of 'ipv6=(disabled|allow|both)' in the
    bucket connection string. Expose and test this
    functionality in the Python client.
    
    Modifications
    -------------
    - Update the Admin constructor to provide an 'ipv6' option
      supporting 'disabled', 'allow' or 'both'. Disabled is
      selected by default to provide backward-compatibility.
    - Update the tests to exercise the new 'ipv6=(disabled|
      allow|both)' option in the connstr via an 'ipv6' option
      in ClusterInformation, and an 'ipv6' section in
      tests.ini. Again, 'disabled' is selected by default
      for backward-compatibility.
    - Tag 'Index' and 'View' based tests, as IPv6 support for
      the View and Index services is still in progress.
    
    Results
    -------
    Non-index-or-view tests successfully run against both IPv4
    and IPv6 local clusters. No visible regressions.
    
    Change-Id: Iedd3534e50373c9e32b3ded56db8b2843c30a54d
    Reviewed-on: http://review.couchbase.org/86378
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
Commits on Nov 8, 2017
  1. PYCBC-448: Fix test failures

    Ellis Breen
    Ellis Breen committed Nov 8, 2017
    Revert test credentials to allow tests to pass with the mock.
    
    Change-Id: I6143ad849e1017f0d4b6161b2ce798be381f13f6
    Reviewed-on: http://review.couchbase.org/85252
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Ellis Breen <ellis.breen@couchbase.com>
  2. PYCBC-447: Fix compilation error on Windows

    Ellis Breen
    Ellis Breen committed Nov 8, 2017
    Reinstate encapsulation of variable declaration in scope
    to satisfy Windows compiler in merged code.
    
    Change-Id: Ib6c31046df16f134d849d19f0301ae31e55814e5
    Reviewed-on: http://review.couchbase.org/85245
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
    Tested-by: Ellis Breen <ellis.breen@couchbase.com>
  3. PYCBC-412: add health check function into lcb check

    Ellis Breen
    Ellis Breen committed Nov 7, 2017
    Motivation
    ----------
    Provide a convenient method of checking the health of a cluster
    without requiring client knowledge of the network configuration.
    
    Modifications
    -------------
    - Use the uncommitted Health Check API (i.e. lcb_ping3)
    from libcouchbase to ping the nodes in a cluster and get
    latency/status/type information
    - Marshal the data from the accompanying callback into both
    'services_struct' (from the resp->services field) and
    'services_json' (from the resp->json field). Struct version
    populates latency as a number rather than a string.
    
    Results
    -------
    Client now successfully passes through the healthcheck
    information from the 'services_struct' dictionary.
    'services_json' dictionary is marshalled if present,
    to allow quick adaptation in case of changes in lcb_ping3
    behaviour.
    
    Change-Id: I44b3b96c18c6e2a768a3ab9770bea0fc1a244e33
    Reviewed-on: http://review.couchbase.org/85069
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
    Tested-by: Ellis Breen <ellis.breen@couchbase.com>
Commits on Nov 7, 2017
  1. PYCBC-419: Fast fail View queries for Ephemeral buckets

    Ellis Breen
    Ellis Breen committed Nov 3, 2017
    Motivation
    ----------
    Ephemeral buckets don't support View queries, so
    rather than wait for the server to reject such
    requests, we should fast fail them.
    
    Modifications
    -------------
    - Query and store bucket type in Bucket.btype field on connection
    - Throw a 'NotSupportedError' when a View query is attempted on
      an Ephemeral bucket
    
    Results
    -------
    Client now throws 'NotSupportedError' immediately when
    attempting to perform a View query on an ephemeral bucket.
    Change-Id: Ibcd0ca50c38811b0cf4b9c68fb2d56bc7a12b418
    Reviewed-on: http://review.couchbase.org/85061
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
    Tested-by: Ellis Breen <ellis.breen@couchbase.com>
Commits on Nov 3, 2017
  1. PYCBC-444: Update maintainer email address in setup.py

    Ellis Breen
    Ellis Breen committed Oct 30, 2017
    Using alias instead of specific maintainer name.
    
    Change-Id: I4d9723447612dd79ec90bfb68aace63d5fc430b5
    Reviewed-on: http://review.couchbase.org/84996
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Ellis Breen <ellis.breen@couchbase.com>
Commits on Oct 24, 2017
  1. PYCBC-397: Implement Enhanced Error Messages

    Ellis Breen
    Ellis Breen committed Oct 23, 2017
    Motivation
    ----------
    Couchbase Server 5.0 sends extra information - 'context' and 'reference'
    for certain operations for correlation with server-side logs. This was
    not previously handled by the Python Client.
    
    Modifications
    -------------
     - Pass through 'context' and 'reference' fields when present in an
       error message body
     - Populate fields of the same name in any exception that is raised
       as a result
     - Include these fields in the string representation of such exceptions
    
    Results
    -------
    Client now successfully passes through the extra information via
    exception object member variables and reports it correctly in the
    string representation.
    
    Change-Id: I1fadc6d3d7aa9b41a26ad98b83be993b709fd1c7
    Reviewed-on: http://review.couchbase.org/84695
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
    Tested-by: Ellis Breen <ellis.breen@couchbase.com>
Commits on Oct 22, 2017
  1. PYCBC-435: get_fulldoc and upsert_fulldoc should not be in subdoc API

    Ellis Breen
    Ellis Breen committed Oct 21, 2017
    Change-Id: I2b36c7097bf9103ff3d605a9c1911520a33e2d95
    Reviewed-on: http://review.couchbase.org/84667
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Ellis Breen <ellis.breen@couchbase.com>
Commits on Oct 21, 2017
  1. PYCBC-424: revert 'upsert_document' and 'insert_document' back to 'up…

    Ellis Breen
    Ellis Breen committed Oct 3, 2017
    …sert_doc' and 'insert_doc' to be idiomatic/fit with rest of Python SDK
    
    Change-Id: I7a6eaf9bd1439770ec55a3e8b4bdd5e1d4b5a522
    Reviewed-on: http://review.couchbase.org/84478
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Ellis Breen <ellis.breen@couchbase.com>
Commits on Sep 21, 2017
  1. PYCBC-442: Updated prerequisite libcouchbase version from '2.6.0' to …

    griels authored and MikeGoldsmith committed Sep 20, 2017
    …'2.8.0'.
    
    Change-Id: I41ab44b27da6e828f125c7ef0c673dd499bc7a2c
    Reviewed-on: http://review.couchbase.org/83600
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Commits on Sep 8, 2017
  1. PYCBC-436: Don’t encode forward slash '/' in connection string

    MikeGoldsmith committed Sep 8, 2017
    - decode forward slash after url encoding query params
    - created connstr_t.py with test to verify forward slashes are
      not encoded
    - moved connstr test from cluster_t.py to connstr_t.py
    
    Change-Id: I402374b837742cd1f848875e74f50a256ea8ecf2
    Reviewed-on: http://review.couchbase.org/83210
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
  2. PYCBC-424: Reanme subdoc create / upsert flags to match RFC

    MikeGoldsmith committed Sep 6, 2017
    Renamed ‘insert_doc’ to ‘insert_document’ and ‘upsert_document’ to ‘upsert_doc’
    
    Change-Id: I99e2e9abfaac1e95bd38855aef2b29f45aed2c50
    Reviewed-on: http://review.couchbase.org/83144
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  3. PYCBC-434: Fix bad host test

    MikeGoldsmith committed Sep 6, 2017
    Admin connections are not initialised until they are used, the test
    has been updated to reflect this.
    
    Change-Id: If2ded1ea67cf1eb37cd88f1eeea03dd1297057a6
    Reviewed-on: http://review.couchbase.org/83141
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  4. PYCBC-428: Fix README formatting

    MikeGoldsmith committed Sep 6, 2017
    Change-Id: Ie9d441b96dc8b0750d52c97356b9af0bf42fdae3
    Reviewed-on: http://review.couchbase.org/83139
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  5. PYCBC-433: Add Cluster.Authenticate('username', 'password') shortcut

    MikeGoldsmith committed Sep 6, 2017
    Change-Id: I4924104eab7a86596ec5bfa0c6fb17ac14c65f2b
    Reviewed-on: http://review.couchbase.org/83138
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Commits on Sep 6, 2017
  1. PYCBC-420: Add new N1QL parameters

    MikeGoldsmith committed Sep 6, 2017
    Change-Id: I286d2a11b1c9432ffda18d541911a7ed1930e359
    Reviewed-on: http://review.couchbase.org/83131
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  2. PYCBC-428: Update README to describe server auth

    MikeGoldsmith committed Sep 6, 2017
    Add sections for authenticating with bucket passwords (CB server <5.0) and RBAC (CB server >=5.0)
    
    Change-Id: Ia65a871a1b3949d14b90c43952f0f4d857eff995
    Reviewed-on: http://review.couchbase.org/83136
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Commits on Aug 22, 2017
  1. PYCBC-422: update author email

    MikeGoldsmith committed Aug 22, 2017
    Change-Id: Ide7f2cda92ebc543e63a2a20666d8398c9829770
    Reviewed-on: http://review.couchbase.org/82574
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Commits on Aug 11, 2017
  1. PYCBC-418: Add user management API aliases

    MikeGoldsmith committed Aug 1, 2017
    Adds verb-object aliases for user managment API methods
    
    Change-Id: Iced778f5f72623c6afe560554e08af169719f608
    Reviewed-on: http://review.couchbase.org/78847
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Matt Carabine <matt.carabine@couchbase.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Commits on Jul 31, 2017
  1. PYCBC-410: Add AuthDomain to user management API

    MikeGoldsmith committed Jul 31, 2017
    Change-Id: Id05d023dada7b3de26eb793a65ddfb1783b2020a
    Reviewed-on: http://review.couchbase.org/81594
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Matt Carabine <matt.carabine@couchbase.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Commits on Jul 20, 2017
  1. PYCBC-373: Verify can work with ephemeral buckets

    MikeGoldsmith committed Jul 20, 2017
    Change-Id: I8f3143cbca07fa0de5af56cfcdf666319f3792e7
    Reviewed-on: http://review.couchbase.org/81183
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  2. PYCBC-385: Add test to test enabling error map

    MikeGoldsmith committed Jul 20, 2017
    Add test to prove it’s possible to enable error map.
    Invalid connection string args cause an error when connecting.
    
    Change-Id: I04863cc22e002e5abb0c6e701de3aaea91077b77
    Reviewed-on: http://review.couchbase.org/81182
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  3. PYCBC-416: Update bucket type parameter when creating bucket

    MikeGoldsmith committed Jul 17, 2017
    Change-Id: I7728f2b85a0dfbcfe5d9477cdd4d40ef36d6a91c
    Reviewed-on: http://review.couchbase.org/81012
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Commits on Jul 18, 2017
  1. Remove travis icon

    mnunberg authored and MikeGoldsmith committed Jun 5, 2017
    The builds often 'fail'. While these failures are not true failures
    (they mainly have to do with timing, libcouchbase dependencies and so
    on) it's not very useful to have a blaring red icon there all the time.
    
    Change-Id: I465e7cc04f92df4b4c91190f0c0283d119ca13e8
    Reviewed-on: http://review.couchbase.org/79033
    Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Commits on Jul 17, 2017
  1. PYCBC-414: Make cluster manager compatible with Spock

    MikeGoldsmith committed Jul 7, 2017
    - try and read connection_string parameter, if doesn’t exist, build using host & port
    - add bucket parameter to Admin with default, append to connection_string
    - pass connection_string to Admin when creating manager from cluster
    
    Change-Id: I3d2c161078a1adb16f1cb8dfb0fc2c6e94d69de8
    Reviewed-on: http://review.couchbase.org/80382
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Commits on Jul 7, 2017
  1. PYCBC-415: add .idea folder to git ignore

    MikeGoldsmith committed Jul 7, 2017
    Change-Id: I54c567a7ffc64407ed6c0aa7a2f4d19be1636b95
    Reviewed-on: http://review.couchbase.org/80362
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>