Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.0.0
-
None
-
Python library 3.0.0
-
1
Description
Old Python library supported a way to authenticate when there were arbitrary bucket names. When there is only bucket 'bucket-name', I can still use this with version 2.5
>>> from couchbase.cluster import Cluster, PasswordAuthenticator
>>> cluster = Cluster('couchbase://localhost')
>>> cluster.authenticate(PasswordAuthenticator('username', 'password'))
>>> bucket = cluster.open_bucket('bucket-name')
That works perfectly fine.
However, when I try the example from version 3.0
>>> from couchbase.cluster import Cluster, PasswordAuthenticator, ClusterOptions
>>> from couchbase.auth import PasswordAuthenticator
>>> cluster = Cluster('couchbase://localhost', ClusterOptions(PasswordAuthenticator('username', 'password')))
>>> bucket = cluster.bucket('bucket-name')
>>> collection = bucket.default_collection()
it fails on line with Cluster() and URI. It tries to connect to bucket "default" based on couchbase/management/admin.py:87. Its caller in couchbase/cluster.py:518 doesn't allow specification of the bucket. That is called from couchbase/cluster.py:533.
Request: please add a way to connect when there is no "default" bucket.
Attachments
For Gerrit Dashboard: PYCBC-918 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
127360,29 | PYCBC-918: Centralise mock auth workaround code | master | couchbase-python-client | Status: MERGED | +2 | +1 |
127641,6 | PYCBC-918 Admin connection had default bucket in it. | master | couchbase-python-client | Status: MERGED | +2 | +1 |
127695,4 | PYCBC-918:Convergence between admin and Cluster, async fixes | master | couchbase-python-client | Status: ABANDONED | -1 | 0 |
127696,3 | PYCBC-918: Dave's admin changes - CHERRYPICK | master | couchbase-python-client | Status: ABANDONED | -1 | 0 |
127783,2 | PYCBC_918: Misc async fixes for handling open-bucket req | master | couchbase-python-client | Status: ABANDONED | -1 | 0 |
127785,1 | PYCBC-918: ROLLUP: Async Fixes/Admin still was passing in a bucket name | master | couchbase-python-client | Status: ABANDONED | -1 | 0 |
129041,1 | PYCBC-918: Centralise mock auth workaround code | master | couchbase-python-client | Status: ABANDONED | -1 | 0 |
129067,1 | PYCBC-918: Centralise mock auth workaround code | master | couchbase-python-client | Status: ABANDONED | 0 | +1 |
129069,3 | PYCBC-918: Centralise mock auth workaround code (mk2) | master | couchbase-python-client | Status: ABANDONED | 0 | +1 |