GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move 'datastore.api' functions to 'datastore.client.Client' methods. by tseaver · Pull Request #963 · googleapis/google-cloud-python

Conversation

@tseaver

@tseaver tseaver commented Jul 3, 2015

Copy link
Copy Markdown
Contributor

Remove the 'datastore.api' module altogether.

See #944.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tseaver
Move 'datastore.api' functions to d'atastore.client.Client 'methods.
5d08a76
Remove the 'datastore.api' module altogether.

See #944.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 3, 2015
@tseaver tseaver mentioned this pull request Jul 3, 2015
Implement "client" pattern for datastore #944
Closed
8 tasks done
@dhermes dhermes changed the title Move 'datastore.api' functions to d'atastore.client.Client 'methods. Move 'datastore.api' functions to 'datastore.client.Client 'methods. Jul 3, 2015
@dhermes dhermes changed the title Move 'datastore.api' functions to 'datastore.client.Client 'methods. Move 'datastore.api' functions to 'datastore.client.Client' methods. Jul 3, 2015
dhermes
dhermes reviewed Jul 3, 2015
View reviewed changes
Comment thread gcloud/datastore/client.py

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver
Docstring fixes.
008e4b5
Addresses:
#963 (diff)
#963 (comment)
#963 (comment)
@dhermes

dhermes commented Jul 3, 2015

Copy link
Copy Markdown
Contributor

I did a full review of everything except test_client.py. Any suggestions for how to review?

Also, _require_dataset_id and _require_connection disappeared from api.py. Is this a problem? I suppose _require_dataset_id has been covered partially by the constructor of Client, but _require_connection not really at all (until the AttributeError when the user tries to use the connection None as a Connection).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Jul 3, 2015

Copy link
Copy Markdown
Contributor Author

Any suggestions for how to review test_client.py?

Coverage is still 100%, and I moved the tests which didnt exercise "implicit" dataset / connection over mostly wholesale.

_require_dataset_id and _require_connection disappeared from api.py. Is this a problem?

They were only there to support handling implicit connection / dataset ID for the API methods. We do exercise creating a Client instance with no arguments, which should be sufficient AFAICT.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver
Use a global client instance for system-tests.
f4f7c90
Addresses:
#963 (comment)
dhermes
dhermes reviewed Jul 3, 2015
View reviewed changes
Comment thread gcloud/datastore/client.py

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver tseaver added the api: datastore Issues related to the Datastore API. label Jul 3, 2015
@dhermes

dhermes commented Jul 3, 2015

Copy link
Copy Markdown
Contributor

All right, looks like the last remaining bit is about the raises section of put_multi.

I'd like the "It seems we should be more consistent (not in this PR) about how we do this." to be addressed at some point, but not here (i.e. just raising in _multi when we don't get a list and maybe vice-versa in the singleton methods)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver
Doctring: add ':raises:' for 'Client.put_multi'.
3fc9223
Addresses:
#963 (comment)
@dhermes

dhermes commented Jul 3, 2015

Copy link
Copy Markdown
Contributor

Not sure what ugh was directed at but LGTM 😄

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tseaver added a commit that referenced this pull request Jul 3, 2015
@tseaver
Merge pull request #963 from tseaver/944-move_api_functions_to_client…
675c839
…_methods

Move 'datastore.api' functions to 'datastore.client.Client' methods.
@tseaver
tseaver merged commit 675c839 into googleapis:master Jul 3, 2015
@tseaver
tseaver deleted the 944-move_api_functions_to_client_methods branch July 3, 2015 20:40
@dhermes dhermes mentioned this pull request Jul 10, 2015
Upgrading version to 0.7 #981
Merged
parthea added a commit that referenced this pull request Nov 24, 2025
@parthea
chore: clean up fixup scripts (#963)
32f49fb
Incorporate changes from googleapis/python-dialogflow#351 in templated fixup script files
parthea pushed a commit that referenced this pull request Nov 24, 2025
@gcf-owl-bot @Linchin
feat: add Database.SourceInfo and Database.source_info (information a…
48dd206
…bout database provenance, specifically for restored databases) (#963)

* docs: Clarify maximum retention of backups (max 14 weeks)
docs: Remove note about backups running at a specific time
docs: Standardize on the capitalization of "ID"

PiperOrigin-RevId: 668987834

Source-Link: googleapis/googleapis@296afd1

Source-Link: googleapis/googleapis-gen@f4db040
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjRkYjA0MDA0YzY0ZDUyZjg3YTk5MjZlNzAxODU5NTc3MTNlOGI1YiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add Database.SourceInfo and Database.source_info (information about database provenance, specifically for restored databases)
feat: add Database.CmekConfig and Database.cmek_config (information about CMEK enablement)
feat: allow specifying an encryption_config when restoring a database
feat: add Database.delete_time (the time a database was deleted, if it ever was)
feat: add Database.previous_id (if a database was deleted, what ID it was using beforehand)
docs: fix assorted capitalization issues with the word "ID"
docs: clarify restore details

PiperOrigin-RevId: 671737474

Source-Link: googleapis/googleapis@070b0fd

Source-Link: googleapis/googleapis-gen@9921c68
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTkyMWM2ODIzNzkzNDk4YjI5ZTI1M2Y0ZWY0MWQxMjMzNjEyNWU1NCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Lingqing Gan <[email protected]>
parthea pushed a commit that referenced this pull request Nov 24, 2025
@sorced-jim
docs: Document how to run system tests against the emulator. (#963)
920d350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: datastore Issues related to the Datastore API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@tseaver @dhermes @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.