You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 7, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on May 7, 2026. It is now read-only.
query.fetch() fails if GOOGLE_CLOUD_DISABLE_GRPC is set #124
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.pyfromgoogle.cloudimportdatastoreclient=datastore.Client() # Assuming an auth'd environmentresults= [entityforentityinclient.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.
Note that we have a broader issue here: all of the methods of the HTTPDatastoreAPI need to be updated to match the request-only pattern of the new GRPC API.
Activity
tseaver commentedon Dec 9, 2020
@tomthorogood Thanks for the report!
@crwilcox We need to set up CI (maybe periodic, rather than precommit?) to exercise the library with
GOOGLE_CLOUD_DISABLE_GRPCset.crwilcox commentedon Dec 9, 2020
#133
tseaver commentedon Dec 9, 2020
Note that we have a broader issue here: all of the methods of the
HTTPDatastoreAPIneed to be updated to match therequest-only pattern of the new GRPC API.tseaver commentedon Dec 9, 2020
The
HTTPDatastoreAPIis also missingreserve_ids. :(fix: update 'HTTPDatastoreAPI.allocate_ids' to follow request-only pa…
fix: update 'HTTPDatastoreAPI.rollback' to follow request-only pattern
fix: update 'HTTPDatastoreAPI.commit' to follow request-only pattern
fix: update 'HTTPDatastoreAPI.begin_transaction' to follow request-on…
fix: update 'HTTPDatastoreAPI.run_query' to follow request-only pattern
fix: update 'HTTPDatastoreAPI.lookup' to follow request-only pattern
fix: add 'retry' / 'timeout' args to HTTPDatastoreAPI methods
fix: make HTTPDatastoreAPI compatible w/ microgen Gapic API (#136)
tomthorogood commentedon Feb 12, 2021
I am so sorry, I only just saw that this was resolved. Thank you so much! I really appreciate it.