Repository navigation
Closed
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.status: investigatingThe issue is under investigation, which is determined to be non-trivial.The issue is under investigation, which is determined to be non-trivial.
Description
Commit 9246de7 introduced following bug:
File "/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/client.py", line 321, in get
eventual=eventual)
File "/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/client.py", line 376, in get_multi
transaction_id=transaction and transaction.id,
File "/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/client.py", line 138, in _extended_lookup
keys=key_pbs,
TypeError: lookup() got an unexpected keyword argument 'project_id'
Patch
From 7470329ecf13d9f85bfe8af71ee533856ff9ec4c Mon Sep 17 00:00:00 2001
From: mathewcohle <mathewcohle@gmail.com>
Date: Mon, 13 Nov 2017 11:41:01 +0100
Subject: [PATCH] Fix wrong keyword argument name introduced in #4348
---
datastore/google/cloud/datastore/client.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/datastore/google/cloud/datastore/client.py b/datastore/google/cloud/datastore/client.py
index a3d1f9d43..c42c75e32 100644
--- a/datastore/google/cloud/datastore/client.py
+++ b/datastore/google/cloud/datastore/client.py
@@ -133,7 +133,7 @@ def _extended_lookup(datastore_api, project, key_pbs,
while loop_num < _MAX_LOOPS: # loop against possible deferred.
loop_num += 1
lookup_response = datastore_api.lookup(
- project_id=project,
+ project=project,
read_options=read_options,
keys=key_pbs,
)
--
2.15.0Info (datastore installed from current master via pip install git+https://github.com/GoogleCloudPlatform/google-cloud-python.git#subdirectory=datastore)
$ pip freeze | grep google
gapic-google-cloud-error-reporting-v1beta1==0.15.3
gapic-google-cloud-logging-v2==0.91.3
gax-google-logging-v2==0.8.3
gax-google-pubsub-v1==0.8.3
google-api-core==0.1.1
google-api-python-client==1.6.4
google-auth==1.2.0
google-cloud==0.30.1.dev1
google-cloud-bigquery==0.28.0
google-cloud-bigtable==0.28.1
google-cloud-core==0.28.0
google-cloud-datastore==1.4.1.dev1
google-cloud-dns==0.28.0
google-cloud-error-reporting==0.28.0
google-cloud-firestore==0.28.0
google-cloud-language==1.0.0
google-cloud-logging==1.4.0
google-cloud-monitoring==0.28.0
google-cloud-pubsub==0.29.0
google-cloud-resource-manager==0.28.0
google-cloud-runtimeconfig==0.28.0
google-cloud-spanner==0.29.0
google-cloud-speech==0.30.0
google-cloud-storage==1.6.0
google-cloud-trace==0.16.0
google-cloud-translate==1.3.0
google-cloud-videointelligence==0.28.0
google-cloud-vision==0.28.0
google-gax==0.12.5
google-resumable-media==0.3.1
googleapis-common-protos==1.5.3
grpc-google-iam-v1==0.11.4
grpc-google-logging-v2==0.8.1
grpc-google-pubsub-v1==0.8.1
proto-google-cloud-error-reporting-v1beta1==0.15.3
proto-google-cloud-logging-v2==0.91.3
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.status: investigatingThe issue is under investigation, which is determined to be non-trivial.The issue is under investigation, which is determined to be non-trivial.
Activity
dhermes commentedon Nov 13, 2017
@mathewcohle Thanks for reporting. I'll jump on a fix ASAP.
dhermes commentedon Nov 13, 2017
@mathewcohle Did we release this bug or you are just installing from
HEAD?dhermes commentedon Nov 13, 2017
As I suspected, this only applies to the HTTP transport which is why it didn't get picked up by any of our system tests. (Though I'm surprised it didn't get picked up by unit tests.)
/cc @lukesneeringer
Updating datastore HTTP wrapper.
Updating datastore HTTP wrapper. (#4388)
mathewcohle commentedon Nov 13, 2017
@dhermes Thanks for a quick fix!
dhermes commentedon Nov 13, 2017
Sure thing @mathewcohle.
I'm still curious how you're installing, if you'd like to share.
mathewcohle commentedon Nov 13, 2017
I installed via
(i.e. current master) as I wanted to include 69a9840.
I have not found a way to specify Datastore version when installing via
pip install google-cloudas it seemed to install the lowest version specified insetup.py->>= 1.4.0, thus I firstly installeddatastorefrom subdir and then install the rest of libraries.dhermes commentedon Nov 13, 2017
Thanks for the info!
I recommend you never use the
google-cloudpackage. It is much too generic to be helpful. (It's very unlikely that any Python application would use more than 4 packages.)Updating datastore HTTP wrapper. (googleapis#4388)
Updating datastore HTTP wrapper. (googleapis#4388)
Update dependency google-auth to v1.20.0 [(#4387)](GoogleCloudPlatfor…
chore: move samples from python-docs-sample (#66)
move monitoring samples from python-docs-samples (#51)
Update dependency google-auth to v1.20.0 [(#4387)](GoogleCloudPlatfor…
Update dependency google-auth to v1.20.0 [(#4387)](GoogleCloudPlatfor…
Updating datastore HTTP wrapper. (#4388)