Skip to content

Conversation

@tseaver
Copy link
Contributor

@tseaver tseaver commented Oct 17, 2014

This PR also removes use of the 'Entity.key()' getter/setter inside Entity methods, replacing with either the bare '_key' attribute, or a new '_must_key' property, and removes the pylint 'maybe-no-member' toggles.

Rework of #252.

Instead, use '_key' directly, adding a '_must_key' property which
raises a NoKey exception if None (for use in cases which require a key).

Allows removal of the pylint 'maybe-no-member' comments.
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 64c711e on tseaver:174-verify_entity_repr into 906700b on GoogleCloudPlatform:master.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Oct 17, 2014

By using self._key internally instead of self.key() we are very much making it possible to satisfy #188 at least for this specific attribute of a datastore entity.

Thoughts?

@tseaver
Copy link
Contributor Author

tseaver commented Oct 17, 2014

I'm using 'self._key' where I'm willing to allow for None, and 'self._must_key' where the method cannot proceed without one. I ditched using 'self.key()' within those methods for clarity and performance (de-confusing pylint was a nice bonus).

I was avoiding having an opinion about #188 for the external API. That style seems common in JS land, but seems less "Pythonic" to me. Dunno that this PR should be hung up on that question, though. :)

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 961e695 on tseaver:174-verify_entity_repr into 906700b on GoogleCloudPlatform:master.

@dhermes
Copy link
Contributor

dhermes commented Oct 17, 2014

LGTM

tseaver added a commit that referenced this pull request Oct 17, 2014
@tseaver tseaver merged commit 08deef5 into googleapis:master Oct 17, 2014
@tseaver tseaver deleted the 174-verify_entity_repr branch October 17, 2014 19:59
@dhermes dhermes added the api: datastore Issues related to the Datastore API. label Dec 31, 2015
urshala pushed a commit to urshala/google-cloud-python that referenced this pull request Jan 17, 2020
Event Location now works properly
Bumped version
urshala pushed a commit to urshala/google-cloud-python that referenced this pull request Jan 17, 2020
Event Location now works properly
Bumped version
atulep pushed a commit that referenced this pull request Apr 3, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 6, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 6, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 18, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea added a commit that referenced this pull request Jun 4, 2023
* chore: Update to gapic-generator-python 1.6.0

feat(python): Add typing to proto.Message based class attributes

feat(python): Snippetgen handling of repeated enum field

PiperOrigin-RevId: 487326846

Source-Link: googleapis/googleapis@da380c7

Source-Link: googleapis/googleapis-gen@61ef576
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: new APIs added to reflect updates to the filestore service

- Add ENTERPRISE Tier
- Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot
- Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare
- Add ConnectMode to NetworkConfig (for Private Service Access support)
- New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING)
- Add SuspensionReason (for KMS related suspension)
- Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled

PiperOrigin-RevId: 487492758

Source-Link: googleapis/googleapis@5be5981

Source-Link: googleapis/googleapis-gen@ab0e217
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9

* 🦉 Updates from OwlBot post-processor

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

* fix docs build

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
parthea pushed a commit that referenced this pull request Jun 4, 2023
…253)

Source-Link: https://togithub.com/googleapis/synthtool/commit/b4fe62efb5114b6738ad4b13d6f654f2bf4b7cc0
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:3bf87e47c2173d7eed42714589dc4da2c07c3268610f1e47f8e1a30decbfc7f1
parthea added a commit that referenced this pull request Jun 4, 2023
* fix(deps): allow protobuf 3.19.5

* explicitly exclude protobuf 4.21.0
parthea pushed a commit that referenced this pull request Jun 4, 2023
* docs: Add documentation for enums

fix: Add context manager return types

chore: Update gapic-generator-python to v1.8.1
PiperOrigin-RevId: 503210727

Source-Link: googleapis/googleapis@a391fd1

Source-Link: googleapis/googleapis-gen@0080f83
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9

* 🦉 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 pushed a commit that referenced this pull request Jun 4, 2023
Source-Link: https://togithub.com/googleapis/synthtool/commit/5f2a6089f73abf06238fe4310f6a14d6f6d1eed3
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8555f0e37e6261408f792bfd6635102d2da5ad73f8f09bcb24f25e6afb5fac97
parthea added a commit that referenced this pull request Oct 21, 2023
Source-Link: googleapis/synthtool@82f5cb2
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5d8da01438ece4021d135433f2cf3227aa39ef0eaccc941d62aa35e6902832ae

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
parthea pushed a commit that referenced this pull request Oct 21, 2023
parthea pushed a commit that referenced this pull request Oct 21, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 410253233

Source-Link: googleapis/googleapis@11e309d

Source-Link: googleapis/googleapis-gen@b4f3403
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjRmMzQwM2EyOGNjOTljOWM3Y2Y0Y2QyZWZjYTEwNWYyNzlhM2IwZiJ9
parthea pushed a commit that referenced this pull request Oct 21, 2023
parthea added a commit that referenced this pull request Oct 21, 2023
parthea pushed a commit that referenced this pull request Oct 21, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 459858846

Source-Link: googleapis/googleapis@21ef848

Source-Link: googleapis/googleapis-gen@26af3a3
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjZhZjNhMzg0YmU0MDc3YzVmMDEwMDUyMWEyNjNmZDliZDhmYzdlNyJ9

PiperOrigin-RevId: 459095142

Source-Link: googleapis/googleapis@4f1be99

Source-Link: googleapis/googleapis-gen@ae686d9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWU2ODZkOWNkZTRmYzNlMzZkMGFjMDJlZmI4NjQzYjE1ODkwYzFlZCJ9

feat: add audience parameter
PiperOrigin-RevId: 456827138

Source-Link: googleapis/googleapis@23f1a15

Source-Link: googleapis/googleapis-gen@4075a85
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDA3NWE4NTE0ZjY3NjY5MWVjMTU2Njg4YTViYmYxODNhYTk4OTNjZSJ9
parthea pushed a commit that referenced this pull request Oct 21, 2023
Source-Link: googleapis/synthtool@06e8279
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:b3500c053313dc34e07b1632ba9e4e589f4f77036a7cf39e1fe8906811ae0fce
parthea pushed a commit that referenced this pull request Oct 22, 2023
* docs: Minor formatting
chore: Update gapic-generator-python to v1.11.5
build: Update rules_python to 0.24.0

PiperOrigin-RevId: 563436317

Source-Link: googleapis/googleapis@42fd37b

Source-Link: googleapis/googleapis-gen@280264c
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjgwMjY0Y2EwMmZiOTMxNmI0MjM3YTk2ZDBhZjFhMjM0M2E4MWE1NiJ9

* 🦉 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 pushed a commit that referenced this pull request Oct 22, 2023
Source-Link: https://togithub.com/googleapis/synthtool/commit/26c7505b2f76981ec1707b851e1595c8c06e90fc
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f946c75373c2b0040e8e318c5e85d0cf46bc6e61d0a01f3ef94d8de974ac6790
parthea pushed a commit that referenced this pull request Oct 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
Includes generated unit tests, plumbing code unit tests, and system
tests for determining whether a message is a resource, providing an
accessor for one and only one path if it is a resource, and a service
accessor for all message fields that are resources (only one level
deep at the moment).
parthea added a commit that referenced this pull request Nov 24, 2025
* feat: add support for Python 3.11

Signed-off-by: Daniel Ziegenberg <[email protected]>

* add 3.11 to unit_test_python_versions

* run post processor locally

Signed-off-by: Daniel Ziegenberg <[email protected]>
Co-authored-by: Anthonios Partheniou <[email protected]>
parthea added a commit that referenced this pull request Nov 24, 2025
parthea pushed a commit that referenced this pull request Nov 24, 2025
parthea pushed a commit that referenced this pull request Nov 24, 2025
Source-Link: googleapis/synthtool@d52e638
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:4f9b3b106ad0beafc2c8a415e3f62c1a0cc23cabea115dbe841b848f581cfe99

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea added a commit that referenced this pull request Nov 24, 2025
* chore(python): add .github/CODEOWNERS as a templated file

Source-Link: googleapis/synthtool@c5026b3
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:0e18b9475fbeb12d9ad4302283171edebb6baf2dfca1bd215ee3b34ed79d95d7

* 🦉 Updates from OwlBot

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

* 🦉 Updates from OwlBot

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: Anthonios Partheniou <[email protected]>
parthea pushed a commit that referenced this pull request Nov 24, 2025
Source-Link: googleapis/synthtool@db94845
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:a8a80fc6456e433df53fc2a0d72ca0345db0ddefb409f1b75b118dfd1babd952

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
Source-Link: googleapis/synthtool@6fab84a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
parthea pushed a commit that referenced this pull request Nov 24, 2025
* changes without context

        autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.

* chore: fix Node.js TOC for cloud-rad

Source-Author: F. Hinkelmann <[email protected]>
Source-Date: Wed Oct 21 12:01:24 2020 -0400
Source-Repo: googleapis/synthtool
Source-Sha: 901ddd44e9ef7887ee681b9183bbdea99437fdcc
Source-Link: googleapis/synthtool@901ddd4

* chore(docs): update code of conduct of synthtool and templates

Source-Author: Christopher Wilcox <[email protected]>
Source-Date: Thu Oct 22 14:22:01 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 5f6ef0ec5501d33c4667885b37a7685a30d41a76
Source-Link: googleapis/synthtool@5f6ef0e

* docs: add proto-plus to intersphinx mapping

Source-Author: Tim Swast <[email protected]>
Source-Date: Tue Oct 27 12:01:14 2020 -0500
Source-Repo: googleapis/synthtool
Source-Sha: ea52b8a0bd560f72f376efcf45197fb7c8869120
Source-Link: googleapis/synthtool@ea52b8a

* fix(python_library): fix external unit test dependencies

I recently submitted https://github.com/googleapis/synthtool/pull/811/files, allowing external dependencies for unit tests. This fixes a small missing comma bug

Source-Author: Daniel Sanche <[email protected]>
Source-Date: Thu Oct 29 16:58:01 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 6542bd723403513626f61642fc02ddca528409aa
Source-Link: googleapis/synthtool@6542bd7

Co-authored-by: Christopher Wilcox <[email protected]>
parthea pushed a commit that referenced this pull request Nov 24, 2025
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/920075d4-7b9c-4b14-9957-7b33425ad95b/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

Source-Link: googleapis/synthtool@5b5bf6d
parthea pushed a commit that referenced this pull request Nov 24, 2025
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/920075d4-7b9c-4b14-9957-7b33425ad95b/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

Source-Link: googleapis/synthtool@5b5bf6d
parthea pushed a commit that referenced this pull request Nov 24, 2025
parthea pushed a commit that referenced this pull request Nov 25, 2025
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/920075d4-7b9c-4b14-9957-7b33425ad95b/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

Source-Link: googleapis/synthtool@5b5bf6d
parthea pushed a commit that referenced this pull request Nov 25, 2025
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/920075d4-7b9c-4b14-9957-7b33425ad95b/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

Source-Link: googleapis/synthtool@5b5bf6d
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants