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 — Fix #533: add key and entity equality methods by tseaver · Pull Request #615 · googleapis/google-cloud-python

Conversation

@tseaver

@tseaver tseaver commented Feb 10, 2015

Copy link
Copy Markdown
Contributor

Add Key.{__eq__,__ne__,__hash__}, including correct handling of prefixed dataset IDs.

Move helpers._dataset_ids_equal -> key, for better separation of concerns (and to avoid a cycle).

Add Entity.{__eq__,__ne__}.

Fixes #533

Sorry, something went wrong.

Uh oh!

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

All reactions
tseaver added 3 commits February 10, 2015 17:14
@tseaver
Add 'Key.{__eq__,__ne__,__hash__}.
e369445
See #533
@tseaver
Compare prefixed dataset IDs correctly.
81025a1
Move '_dataset_ids_equal' from 'helpers' -> 'key', because it is only
useful for keys, and we don't want the cycle.
@tseaver
Add 'Entity.{__eq__,__ne__}.
5badbc4
Closes #533.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 10, 2015
@tseaver tseaver changed the title 533 key and entity equality Fix #533: add key and entity equality methods Feb 10, 2015
@tseaver

tseaver commented Feb 10, 2015

Copy link
Copy Markdown
Contributor Author

Note that this PR assumes my "incomplete keys never compare equal" simplification.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dhermes

dhermes commented Feb 12, 2015

Copy link
Copy Markdown
Contributor

I like the simplification. Reviewing now.

All reactions

Sorry, something went wrong.

Uh oh!

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

dhermes
dhermes reviewed Feb 12, 2015
View reviewed changes
Comment thread gcloud/datastore/entity.py Outdated

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.

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.

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.

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.

@dhermes

dhermes commented Feb 12, 2015

Copy link
Copy Markdown
Contributor

Overall looks good, pending my comments.

All reactions

Sorry, something went wrong.

Uh oh!

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

tseaver added 2 commits February 12, 2015 13:56
@tseaver
Return 'NotImplemented', rather than raising 'NotImplementedError', f…
f5e4b40
…rom eq.

See:  https://docs.python.org/2/reference/datamodel.html#the-standard-type-hierarchy.
@tseaver
Fix typo.
1e5d955
@dhermes

dhermes commented Feb 12, 2015

Copy link
Copy Markdown
Contributor

@tseaver

>>> bool(NotImplemented)
True

Hence key == object() is truthy (UPDATE: I missed @tseaver comment.)

All reactions

Sorry, something went wrong.

Uh oh!

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

tseaver added 2 commits February 12, 2015 14:08
@tseaver
Update tests to account for f5e4b40.
7d7c94a
@tseaver
Add tests for 'Entity.__{eq,ne}__' w/ keys/entities as values.
680800d
Per: https://github.com/GoogleCloudPlatform/gcloud-python/pull/615/files#r24562366.
@coveralls

coveralls commented Feb 12, 2015

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 680800d on tseaver:533-key_and_entity_equality into b395360 on GoogleCloudPlatform:master.

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 Feb 12, 2015
@tseaver
Merge pull request #615 from tseaver/533-key_and_entity_equality
9a918cf
Fix #533:  add key and entity equality methods
@tseaver
tseaver merged commit 9a918cf into googleapis:master Feb 12, 2015
@tseaver
tseaver deleted the 533-key_and_entity_equality branch February 12, 2015 19:19
dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Feb 12, 2015
@dhermes
Update datastore regression to use Entity/Key equality.
1ac2a13
Utilizing changes in googleapis#615.
This was referenced Feb 12, 2015
Update datastore regression to use Entity/Key equality. #619
Merged
Upgrading version to 0.4.1. #640
Merged
parthea pushed a commit that referenced this pull request Aug 21, 2025
@gcf-owl-bot
chore: Update gapic-generator-python to v1.11.2 (#615)
28dfd91
* chore: Update gapic-generator-python to v1.11.2

PiperOrigin-RevId: 546510849

Source-Link: googleapis/googleapis@736073a

Source-Link: googleapis/googleapis-gen@deb64e8
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGViNjRlOGVjMTlkMTQxZTMxMDg5ZmU5MzJiM2E5OTdhZDU0MWM0ZCJ9

* 🦉 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 Sep 16, 2025
@gcf-owl-bot @parthea
chore: Update gapic-generator-python to v1.11.2 (#615)
ca27352
* chore: Update gapic-generator-python to v1.11.2

PiperOrigin-RevId: 546510849

Source-Link: googleapis/googleapis@736073a

Source-Link: googleapis/googleapis-gen@deb64e8
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGViNjRlOGVjMTlkMTQxZTMxMDg5ZmU5MzJiM2E5OTdhZDU0MWM0ZCJ9

* 🦉 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 Sep 18, 2025
@gcf-owl-bot
chore(python): upgrade gcp-releasetool in .kokoro [autoapprove] (#615)
57defb6
Source-Link: googleapis/synthtool@5f2a608
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8555f0e37e6261408f792bfd6635102d2da5ad73f8f09bcb24f25e6afb5fac97

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
@software-dov
fix: operation module is properly aliased if necessary (#615)
eb95832
Some APIs define their own module named 'operation' that naively
clashes with google.api_core.operation.
Both modules are imported with a disambiguating alias, but the alias
was not always referenced for the api_core submodule.

This change fixes that issue. Fix for #610
parthea pushed a commit that referenced this pull request Nov 24, 2025
@release-please @gcf-owl-bot
chore(main): release 2.18.0 (#615)
5f46cd2
* chore(main): release 2.18.0

* 🦉 Updates from OwlBot post-processor

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

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
@gcf-owl-bot
chore(python): update .kokoro/requirements.txt (#615)
8923f2f
Source-Link: googleapis/synthtool@703554a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:94961fdc5c9ca6d13530a6a414a49d2f607203168215d074cdb0a1df9ec31c0b
parthea pushed a commit that referenced this pull request Nov 24, 2025
Chris Rossi
fix: fix bug with compressed blob property (#615)
7e3b7aa
There was a bug when using a compressed blob property as a child of a structured
property while using the legacy data format for structured properties.

Fixes #602
parthea pushed a commit that referenced this pull request Nov 25, 2025
@gcf-owl-bot
chore(python): update .kokoro/requirements.txt (#615)
f34ff47
Source-Link: googleapis/synthtool@703554a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:94961fdc5c9ca6d13530a6a414a49d2f607203168215d074cdb0a1df9ec31c0b
parthea pushed a commit that referenced this pull request Nov 26, 2025
@release-please
chore: release 1.22.0 (#615)
b18d06b
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea added a commit that referenced this pull request Mar 2, 2026
@parthea
ci: use python 3.7 for pubsublite samples testing (#615)
2e5b778
parthea pushed a commit that referenced this pull request Mar 6, 2026
@vi3k6i5
feat: update workflow files to uniformly distribute the test modules …
cf7f68f
…by time taken by each test module (#615)

* fix: lint_setup_py was failing in Kokoro is not fixed

* feat: rearranged test modules in workflow to uniformly distribute the time taken
parthea pushed a commit that referenced this pull request Mar 9, 2026
@renovate-bot
chore(deps): update dependency alembic to v1.15.1 (#615)
058b2ae
parthea added a commit that referenced this pull request Mar 9, 2026
@tseaver @parthea
feat: add support for Python 3.10 (#615)
d88a546
Co-authored-by: Anthonios Partheniou <[email protected]>
parthea pushed a commit that referenced this pull request Mar 9, 2026
@release-please
chore: release 1.43.0 (#618)
81a408a
🤖 I have created a release \*beep\* \*boop\*
---
## [1.43.0](https://www.github.com/googleapis/python-storage/compare/v1.42.3...v1.43.0) (2021-11-15)


### Features

* add ignore_flush parameter to BlobWriter ([#644](https://www.github.com/googleapis/python-storage/issues/644)) ([af9c9dc](https://www.github.com/googleapis/python-storage/commit/af9c9dc83d8582167b74105167af17c9809455de))
* add support for Python 3.10 ([#615](https://www.github.com/googleapis/python-storage/issues/615)) ([f81a2d0](https://www.github.com/googleapis/python-storage/commit/f81a2d054616c1ca1734997a16a8f47f98ab346b))


### Bug Fixes

* raise a ValueError in BucketNotification.create() if a topic name is not set ([#617](https://www.github.com/googleapis/python-storage/issues/617)) ([9dd78df](https://www.github.com/googleapis/python-storage/commit/9dd78df444d21af51af7858e8958b505a26c0b79))


### Documentation

* add contributing and authoring guides under samples/ ([#633](https://www.github.com/googleapis/python-storage/issues/633)) ([420591a](https://www.github.com/googleapis/python-storage/commit/420591a2b71f823dbe80f4a4405d8a514f87e0fb))
* add links to samples and how to guides ([#641](https://www.github.com/googleapis/python-storage/issues/641)) ([49f78b0](https://www.github.com/googleapis/python-storage/commit/49f78b09fed6d9f486639fd0a72542c30a0df084))
* add README to samples subdirectory ([#639](https://www.github.com/googleapis/python-storage/issues/639)) ([58af882](https://www.github.com/googleapis/python-storage/commit/58af882c047c31f59486513c568737082bca6350))
* update samples readme with cli args ([#651](https://www.github.com/googleapis/python-storage/issues/651)) ([75dda81](https://www.github.com/googleapis/python-storage/commit/75dda810e808074d18dfe7915f1403ad01bf2f02))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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

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.

DISCUSSION: Implement Key.__eq__ and Entity.__eq__

Uh oh!

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

4 participants

@tseaver @dhermes @coveralls @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.