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

fix: resurrect support for compressed text property #342

Merged
merged 4 commits into from
Feb 24, 2020

Conversation

chrisrossi
Copy link
Contributor

Way back in PR #35 (a fix for #32), I accidentally disabled support for passing compressed=True to TextProperty. Because #35 involved refactoring TextProperty so that it no longer inherited from BlobProperty, the older version of TextProperty needed to be brought back and has now become CompressedTextProperty, which will store text properties as UTF-8 compressed blobs, as was the case with GAE NDB. I've overridden __new__ for TextProperty so I can substitute CompressedTextProperty for TextProperty when compressed=True is passed.

Fixes #277

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 21, 2020
Copy link
Contributor

@cguardia cguardia left a comment

Choose a reason for hiding this comment

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

Looks all right.

value (Union[bytes, str]): The value to be converted.

Returns:
Optional[str]: The converted value. If ``value`` is a a valid UTF-8
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo. Double "a".

@chrisrossi chrisrossi merged commit 5a86456 into googleapis:master Feb 24, 2020
@chrisrossi chrisrossi deleted the fix-277 branch February 24, 2020 16:12
snarfed added a commit to snarfed/bridgy that referenced this pull request Mar 5, 2020
...now that it's fixed. reverts a6deb95 in favor of the google-cloud-ndb fix in googleapis/python-ndb#342, released in v1.1.0. (thanks guys!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add compressed=True support to TextProperty
3 participants