Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DISCUSSION: Remove Entity.reload() #490

Closed
dhermes opened this issue Jan 6, 2015 · 3 comments
Closed

DISCUSSION: Remove Entity.reload() #490

dhermes opened this issue Jan 6, 2015 · 3 comments
Assignees
Labels
api: datastore Issues related to the Datastore API. type: question Request for information or clarification. Not an issue.

Comments

@dhermes
Copy link
Contributor

dhermes commented Jan 6, 2015

@jgeewax We never use Entity.reload() within the library and it doesn't seem to be particularly useful and can even be replaced in a one liner:

entity.update(entity.key.get())

What did you have in mind when you implemented it?


To give some more context, we have been discussing / making a case for removing Entity and just using a dict (as in gcloud-node) since most of the logic lives elsewhere. Entity.save() can be moved to gcloud.datastore.__init__ and so reload() is the only remaining blocker.

@dhermes dhermes added the api: datastore Issues related to the Datastore API. label Jan 6, 2015
@jgeewax
Copy link
Contributor

jgeewax commented Jan 6, 2015

AFAI remember, reload was intended as a shortcut for the code you mentioned. I wanted a quick way to say "I recognize that this data probably changed from when I first grabbed the object."

I'd be on board for getting rid of the concept of an Entity -- however that "entity.save()" thing is pretty important. What's the plan for that? (Feel free to move this conversation elsewhere if you think this isn't the right place.)

@jgeewax jgeewax added the type: question Request for information or clarification. Not an issue. label Jan 6, 2015
@dhermes
Copy link
Contributor Author

dhermes commented Jan 6, 2015

Yes we'll be sure to make sure entity.save() is an easily accesible concept if we are to remove Entity.

I'll cc you on any PRs / discussions we have before Entity is removed. Just wanted to make I wasn't missing anything with Entity.reload().

Thanks

dhermes added a commit to dhermes/google-cloud-python that referenced this issue Jan 8, 2015
Removed Entity.reload() because it relied on the existence
of Key.get(). Replacing it would have required import
gcloud.datastore.get in entity.py, which would have again
been a cyclic import.

With an eye on removing the Entity class (see googleapis#490),
removing Entity.reload() is not such a big deal.

Fixes googleapis#477.
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Jan 8, 2015
Removed Entity.reload() because it relied on the existence
of Key.get(). Replacing it would have required import
gcloud.datastore.get in entity.py, which would have again
been a cyclic import.

With an eye on removing the Entity class (see googleapis#490),
removing Entity.reload() is not such a big deal.

Fixes googleapis#477.
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Jan 8, 2015
Removed Entity.reload() because it relied on the existence
of Key.get(). Replacing it would have required import
gcloud.datastore.get in entity.py, which would have again
been a cyclic import.

With an eye on removing the Entity class (see googleapis#490),
removing Entity.reload() is not such a big deal.

Fixes googleapis#477.
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Jan 8, 2015
Removed Entity.reload() because it relied on the existence
of Key.get(). Replacing it would have required import
gcloud.datastore.get in entity.py, which would have again
been a cyclic import.

With an eye on removing the Entity class (see googleapis#490),
removing Entity.reload() is not such a big deal.

Fixes googleapis#517.
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Jan 8, 2015
Removed Entity.reload() because it relied on the existence
of Key.get(). Replacing it would have required import
gcloud.datastore.get in entity.py, which would have again
been a cyclic import.

With an eye on removing the Entity class (see googleapis#490),
removing Entity.reload() is not such a big deal.

Fixes googleapis#517.
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Jan 8, 2015
Removed Entity.reload() because it relied on the existence
of Key.get(). Replacing it would have required import
gcloud.datastore.get in entity.py, which would have again
been a cyclic import.

With an eye on removing the Entity class (see googleapis#490),
removing Entity.reload() is not such a big deal.

Fixes googleapis#517.
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Jan 8, 2015
Removed Entity.reload() because it relied on the existence
of Key.get(). Replacing it would have required import
gcloud.datastore.get in entity.py, which would have again
been a cyclic import.

With an eye on removing the Entity class (see googleapis#490),
removing Entity.reload() is not such a big deal.

Fixes googleapis#517.
@dhermes
Copy link
Contributor Author

dhermes commented Jan 13, 2015

Was removed in #517.

@dhermes dhermes closed this as completed Jan 13, 2015
@jgeewax jgeewax modified the milestone: Datastore Stable Jan 30, 2015
vchudnov-g pushed a commit that referenced this issue Sep 20, 2023
* docs: added explanation for SuggestionResult

PiperOrigin-RevId: 435670355

Source-Link: googleapis/googleapis@5d85995

Source-Link: googleapis/googleapis-gen@1b913e4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWI5MTNlNDQ4NGE2NmIzZjRkMDFjNTViZTE3NDcwNDI3MjQ2NjI2NCJ9

* 🦉 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>
parthea added a commit that referenced this issue Sep 22, 2023
* fix(deps): allow protobuf 3.19.5

* explicitly exclude protobuf 4.21.0
parthea pushed a commit that referenced this issue Oct 21, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 472561635

Source-Link: googleapis/googleapis@332ecf5

Source-Link: googleapis/googleapis-gen@4313d68
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDMxM2Q2ODI4ODBmZDlkNzI0NzI5MTE2NGQ0ZTlkM2Q1YmQ5ZjE3NyJ9
parthea added a commit that referenced this issue Oct 21, 2023
* chore: exclude requirements.txt file from renovate-bot

Source-Link: googleapis/synthtool@f58d313
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7a40313731a7cb1454eef6b33d3446ebb121836738dc3ab3d2d3ded5268c35b6

* update constraints files

* fix(deps): require protobuf 3.20.2

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this issue Oct 21, 2023
* fix: Add async context manager return types

chore: Mock return_value should not populate oneof message fields

chore: Support snippet generation for services that only support REST transport

chore: Update gapic-generator-python to v1.11.0
PiperOrigin-RevId: 545430278

Source-Link: googleapis/googleapis@601b532

Source-Link: googleapis/googleapis-gen@b3f18d0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjNmMThkMGY2NTYwYTg1NTAyMmZkMDU4ODY1ZTc2MjA0NzlkN2FmOSJ9

* 🦉 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants