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 — Entity creation type safety · Issue #819 · googleapis/google-cloud-python

Entity creation type safety #819

New issue
Copy link
New issue
Copy link
Closed
#888
Closed
Entity creation type safety#819
#888
Copy link
Assignees
dhermes
Labels
api: datastoreIssues related to the Datastore API.

Description

@pcostell
pcostell
opened on Apr 11, 2015
Issue body actions

Right now, if you create an entity like:

e = datastore.entity.Entity(key, ('data'))

The unindexable properties will be 'd', 'a', or 't'. Obviously in this case the user meant to specify:

e = datastore.entity.Entity(key, ('data',))

Perhaps the Entity constructor should verify that exclude_from_indexes is a list or tuple.

Here is the discussion where the user ran into this: https://groups.google.com/forum/#!topic/gcd-discuss/rqwF8CRdTAY

Activity

  1. pcostell
    added
    api: datastoreIssues related to the Datastore API.
    on Apr 11, 2015
  2. dhermes commented on Apr 11, 2015

    @dhermes
    dhermes
    on Apr 11, 2015
    Contributor
    More actions

    Thanks for the pointer to the discussion! I'm torn on this.

    Getting bit by passing in a string as an iterable is somewhat of a rite of passage in Python (as we saw, the user misunderstood the ('data') syntax as being a way to create a tuple). By whitelisting list and tuple it rules out people that might want to pass in their own custom iterables. On the flipside, this is a really straightforward property so maybe we'd just suggest they pass in list(custom_iterable).

  3. pcostell commented on Apr 11, 2015

    @pcostell
    pcostell
    on Apr 11, 2015
    ContributorAuthor
    More actions

    I'm not partial either way, just wanted to pass it on.

  4. dhermes commented on Apr 12, 2015

    @dhermes
    dhermes
    on Apr 12, 2015
    Contributor
    More actions

    Got it. Thanks.

    @tseaver WDYT?

  5. pcostell commented on Apr 13, 2015

    @pcostell
    pcostell
    on Apr 13, 2015
    ContributorAuthor
    More actions

    One extra thought --

    Maybe it should be an error if you provide properties to exclude_from_indexes that you never actually store in the entity. It could indicate bad application logic.

  6. dhermes commented on Apr 13, 2015

    @dhermes
    dhermes
    on Apr 13, 2015
    Contributor
    More actions

    When do we decide the Entity is "final"?

  7. pcostell commented on Apr 13, 2015

    @pcostell
    pcostell
    on Apr 13, 2015
    ContributorAuthor
    More actions

    In this instance probably on put.

  8. dhermes
    modified the milestone: This milestone has been deleted on Apr 13, 2015
  9. dhermes
    self-assigned this
    on May 20, 2015
  10. dhermes
    added 2 commits that reference this issue on May 20, 2015

    Check exclude from indexes type in Entity ctor.

    This issue will close once commit 7c9bacb is merged into the 'master' branch.
    7c9bacb

    Check exclude from indexes type in Entity ctor.

    This issue will close once commit aa2c138 is merged into the 'master' branch.
    aa2c138
  11. dhermes
    closed this as completedin #888on May 27, 2015
  12. theacodes
    unassigned
    dhermes
    on Sep 28, 2018
  13. JustinBeckwith
    assigned
    dhermes
    on Feb 1, 2021
  14. parthea
    added a commit that references this issue on Sep 18, 2025

    feat: adds the capability to include custom user agent string (#819)

    f7f0795
  15. parthea
    added 7 commits that reference this issue on Nov 22, 2025

    chore: add experimental async data client (#920)

    07c1344

    fix: Update module alias to resolve naming conflict (#820)

    e01022a

    chore: release 0.43.2 (#823)

    a206187

    build: treat warnings as errors (#819)

    c1dda23

    docs: Add note that ProtoRPC message classes are unimplemented (#819)

    95a2570

    build: treat warnings as errors (#819)

    76de168

    fix: add SAML challenge to reauth (#819)

    0e20efd
  16. parthea
    added 4 commits that reference this issue on Mar 2, 2026

    chore: add experimental async data client (#920)

    5cd2349

    chore(python): update dependencies in .kokoro/requirements.txt (#819)

    e151a19

    chore: release 2.23.0 (#819)

    7e180a0

    feat: Custom Placement Config Dual Region Support (#819)

    0c745e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dhermes
    dhermes

Labels

api: datastoreIssues related to the Datastore API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.