Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

Fix argument handling for KeyProperty constructor. - #243

Merged
chrisrossi merged 2 commits into
googleapis:masterfrom
chrisrossi:fix-240
Nov 17, 2019
Merged

Fix argument handling for KeyProperty constructor.#243
chrisrossi merged 2 commits into
googleapis:masterfrom
chrisrossi:fix-240

Conversation

@chrisrossi

Copy link
Copy Markdown
Contributor

The changes for Python 2.7 compatibility broke the constructor for
KeyProperty, making it so you could no longer pass in a string for the
kind argument as a keyword. This reverts back to something more like
what was used in the original version of NDB, but preserving the
documented method signature.

I'm not a huge fan of this style of argument handling. (Maybe the first
argument is name, or maybe it's kind, let's figure it out!) But I
guess we're stuck with it for backwards compatibility.

Thanks to @epluntze for pointing me in the right direction.

Fixes#240.

The changes for Python 2.7 compatibility broke the constructor for
KeyProperty, making it so you could no longer pass in a string for the
`kind` argument as a keyword. This reverts back to something more like
what was used in the original version of NDB, but preserving the
documented method signature.
I'm not a huge fan of this style of argument handling. (Maybe the first
argument is `name`, or maybe it's `kind`, let's figure it out!) But I
guess we're stuck with for backwards compatibility.
Thanks to @epluntze for pointing me in the right direction.
Fixesgoogleapis#240.
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 15, 2019
@chrisrossichrisrossi mentioned this pull request Nov 15, 2019

@cguardiacguardia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This was one of the changes that I wasn't very happy about, so it's great that you fixed it.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyProperties returned from single entity GET have bad data

3 participants

@chrisrossi@cguardia@googlebot