-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Labels
api: datastoreIssues related to the googleapis/python-datastore API.Issues related to the googleapis/python-datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
This new behavior causes an error: run_query() got an unexpected keyword argument 'request'
because when the GOOGLE_CLOUD_DISABLE_GRPC
environment variable is set (which is a requirement in some runtimes, e.g., when using gunicorn with gevent), the underlying HTTPDatastoreAPI#run_query method does not accept a request
parameter.
Example:
# run_query.py
from google.cloud import datastore
client = datastore.Client() # Assuming an auth'd environment
results = [entity for entity in client.query(kind="Foo").fetch()]
I feel like this can be fixed by updating the signature for the HTTPDatastoreAPI#run_query to accept request
and only subsequently build the request object if it's not passed in, so that the signatures match for all implementations.
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the googleapis/python-datastore API.Issues related to the googleapis/python-datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.