Skip to content

Move 'datastore.api' functions to 'datastore.client.Client' methods. - #963

Merged
tseaver merged 4 commits into
googleapis:masterfrom
tseaver:944-move_api_functions_to_client_methods
Jul 3, 2015
Merged

Move 'datastore.api' functions to 'datastore.client.Client' methods.#963
tseaver merged 4 commits into
googleapis:masterfrom
tseaver:944-move_api_functions_to_client_methods

Conversation

@tseaver

Copy link
Copy Markdown
Contributor

Remove the 'datastore.api' module altogether.

See #944.

Remove the 'datastore.api' module altogether.
See #944.
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 3, 2015
@tseavertseaver mentioned this pull request Jul 3, 2015
8 tasks
@dhermesdhermes 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
@dhermesdhermes changed the title Move 'datastore.api' functions to 'datastore.client.Client 'methods.Move 'datastore.api' functions to 'datastore.client.Client' methods.Jul 3, 2015

This comment was marked as spam.

@dhermes

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).

@tseaver

Copy link
Copy Markdown
ContributorAuthor

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.

This comment was marked as spam.

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

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)

@dhermes

Copy link
Copy Markdown
Contributor

Not sure what ugh was directed at but LGTM 😄

tseaver added a commit that referenced this pull request Jul 3, 2015
…_methods
Move 'datastore.api' functions to 'datastore.client.Client' methods.
@tseaver
tseaver merged commit 675c839 into googleapis:masterJul 3, 2015
@tseaver
tseaver deleted the 944-move_api_functions_to_client_methods branch July 3, 2015 20:40
@dhermesdhermes mentioned this pull request Jul 10, 2015
parthea added a commit that referenced this pull request Nov 24, 2025
Incorporate changes from googleapis/python-dialogflow#351 in templated fixup script files
parthea pushed a commit that referenced this pull request Nov 24, 2025
…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 <lingqing.gan@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: datastoreIssues related to the Datastore API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tseaver@dhermes@googlebot