Skip to content

Continuation of ndb Property implementation (part 5)#6333

Merged
dhermes merged 7 commits into
googleapis:masterfrom
dhermes:ndb-Property-part-5
Oct 30, 2018
Merged

Continuation of ndb Property implementation (part 5)#6333
dhermes merged 7 commits into
googleapis:masterfrom
dhermes:ndb-Property-part-5

Conversation

@dhermes

@dhermes dhermes commented Oct 29, 2018

Copy link
Copy Markdown
Contributor

This is still incomplete, it's a very large class.

In particular, this implements:

  • Property._get_value
  • Property._delete_value
  • Property._is_initialized
  • Descriptors for Property (i.e. __get__, __set__ and __delete__)
  • Property._prepare_for_put
  • Property._check_property
  • Property._get_for_dict

Luckily this class is almost finished, with _serialize, _deserialize, _prepare_for_put (a no-op), _check_property and _get_for_dict the last remaining methods. I think I'll be able to port _serialize|_deserialize to the new protobuf definitions but I haven't looked into it deeply.

I'll probably update this PR with the implementations for _prepare_for_put, _check_property and _get_for_dict as well.

@dhermes dhermes requested a review from chrisrossi October 29, 2018 21:46
@dhermes dhermes requested a review from crwilcox as a code owner October 29, 2018 21:46
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 29, 2018
Also filling in some missing / incomplete docstrings on recently
implemented `Property` methods.
Also cleaning up the `Property._FIND_METHODS_CACHE` in
`test_instance_descriptors()`.
Comment thread ndb/src/google/cloud/ndb/model.py
@dhermes dhermes merged commit 433dcf9 into googleapis:master Oct 30, 2018
@dhermes dhermes deleted the ndb-Property-part-5 branch October 30, 2018 15:50
chrisrossi pushed a commit to chrisrossi/google-cloud-python that referenced this pull request Feb 22, 2019
This is still incomplete, it's a very large class.

In particular, this implements:

- `Property._get_value`
- `Property._delete_value`
- `Property._is_initialized`
- Descriptors for `Property` (i.e. `__get__`, `__set__` and `__delete__`)
- `Property._prepare_for_put`
- `Property._check_property`
- `Property._get_for_dict`
parthea pushed a commit that referenced this pull request Nov 24, 2025
This is still incomplete, it's a very large class.

In particular, this implements:

- `Property._get_value`
- `Property._delete_value`
- `Property._is_initialized`
- Descriptors for `Property` (i.e. `__get__`, `__set__` and `__delete__`)
- `Property._prepare_for_put`
- `Property._check_property`
- `Property._get_for_dict`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: ndb cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants