google-cloud-ndb 2.3.1__tar.gz → 2.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. {google-cloud-ndb-2.3.1/google_cloud_ndb.egg-info → google_cloud_ndb-2.3.3}/PKG-INFO +8 -3
  2. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/README.md +5 -0
  3. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_datastore_types.py +2 -2
  4. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/context.py +2 -2
  5. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/key.py +3 -3
  6. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/model.py +58 -46
  7. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/query.py +2 -2
  8. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/version.py +1 -1
  9. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3/google_cloud_ndb.egg-info}/PKG-INFO +8 -3
  10. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google_cloud_ndb.egg-info/requires.txt +2 -2
  11. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/setup.py +2 -2
  12. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/AUTHORS +0 -0
  13. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/LICENSE +0 -0
  14. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/__init__.py +0 -0
  15. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_batch.py +0 -0
  16. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_cache.py +0 -0
  17. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_datastore_api.py +0 -0
  18. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_datastore_query.py +0 -0
  19. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_eventloop.py +0 -0
  20. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_gql.py +0 -0
  21. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_legacy_entity_pb.py +0 -0
  22. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_legacy_protocol_buffer.py +0 -0
  23. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_options.py +0 -0
  24. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_remote.py +0 -0
  25. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_retry.py +0 -0
  26. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/_transaction.py +0 -0
  27. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/blobstore.py +0 -0
  28. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/client.py +0 -0
  29. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/django_middleware.py +0 -0
  30. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/exceptions.py +0 -0
  31. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/global_cache.py +0 -0
  32. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/metadata.py +0 -0
  33. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/msgprop.py +0 -0
  34. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/polymodel.py +0 -0
  35. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/stats.py +0 -0
  36. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/tasklets.py +0 -0
  37. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google/cloud/ndb/utils.py +0 -0
  38. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google_cloud_ndb.egg-info/SOURCES.txt +0 -0
  39. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google_cloud_ndb.egg-info/dependency_links.txt +0 -0
  40. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google_cloud_ndb.egg-info/not-zip-safe +0 -0
  41. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/google_cloud_ndb.egg-info/top_level.txt +0 -0
  42. {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-cloud-ndb
3
- Version: 2.3.1
3
+ Version: 2.3.3
4
4
  Summary: NDB library for Google Cloud Datastore
5
5
  Home-page: https://github.com/googleapis/python-ndb
6
6
  Author: Google LLC
@@ -27,20 +27,25 @@ Description-Content-Type: text/markdown
27
27
  License-File: LICENSE
28
28
  License-File: AUTHORS
29
29
  Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0
30
- Requires-Dist: google-cloud-datastore<3.0.0dev,>=2.16.0
31
- Requires-Dist: protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5
30
+ Requires-Dist: google-cloud-datastore!=2.20.2,<3.0.0dev,>=2.16.0
31
+ Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2
32
32
  Requires-Dist: pymemcache<5.0.0dev,>=2.1.0
33
33
  Requires-Dist: pytz>=2018.3
34
34
  Requires-Dist: redis<6.0.0dev,>=3.0.0
35
35
 
36
36
  # Google Cloud Datastore `ndb` Client Library
37
37
 
38
+ [![stable](https://img.shields.io/badge/support-stable-gold.svg)](https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels)
39
+ [![pypi](https://img.shields.io/pypi/v/google-cloud-ndb.svg)](https://pypi.org/project/google-cloud-ndb/)
40
+ [![versions](https://img.shields.io/pypi/pyversions/google-cloud-ndb.svg)](https://pypi.org/project/google-cloud-ndb/)
41
+
38
42
  ## Introduction
39
43
 
40
44
  This is an updated version of the `ndb` client library for use with
41
45
  [Google Cloud Datastore][0].
42
46
 
43
47
  * [Client Library Documentation](https://googleapis.dev/python/python-ndb/latest)
48
+ * [Product Documentation](https://cloud.google.com/datastore/docs)
44
49
 
45
50
  The original Python 2 version of `ndb` was designed specifically for the
46
51
  [Google App Engine][1] `python27` runtime and can be found at
@@ -1,11 +1,16 @@
1
1
  # Google Cloud Datastore `ndb` Client Library
2
2
 
3
+ [![stable](https://img.shields.io/badge/support-stable-gold.svg)](https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels)
4
+ [![pypi](https://img.shields.io/pypi/v/google-cloud-ndb.svg)](https://pypi.org/project/google-cloud-ndb/)
5
+ [![versions](https://img.shields.io/pypi/pyversions/google-cloud-ndb.svg)](https://pypi.org/project/google-cloud-ndb/)
6
+
3
7
  ## Introduction
4
8
 
5
9
  This is an updated version of the `ndb` client library for use with
6
10
  [Google Cloud Datastore][0].
7
11
 
8
12
  * [Client Library Documentation](https://googleapis.dev/python/python-ndb/latest)
13
+ * [Product Documentation](https://cloud.google.com/datastore/docs)
9
14
 
10
15
  The original Python 2 version of `ndb` was designed specifically for the
11
16
  [Google App Engine][1] `python27` runtime and can be found at
@@ -46,8 +46,8 @@ class BlobKey(object):
46
46
  blob_key (Optional[bytes]): The key used for the blobstore.
47
47
 
48
48
  Raises:
49
- .BadValueError: If the ``blob_key`` exceeds 1500 bytes.
50
- .BadValueError: If the ``blob_key`` is not :data:`None` or a
49
+ exceptions.BadValueError: If the ``blob_key`` exceeds 1500 bytes.
50
+ exceptions.BadValueError: If the ``blob_key`` is not :data:`None` or a
51
51
  :class:`bytes` instance.
52
52
  """
53
53
 
@@ -105,7 +105,7 @@ def get_context(raise_context_error=True):
105
105
  Context: The current context.
106
106
 
107
107
  Raises:
108
- .ContextError: If called outside of a context
108
+ exceptions.ContextError: If called outside of a context
109
109
  established by :meth:`google.cloud.ndb.client.Client.context` and
110
110
  ``raise_context_error`` is :data:`True`.
111
111
  """
@@ -139,7 +139,7 @@ def get_toplevel_context(raise_context_error=True):
139
139
  Context: The current context.
140
140
 
141
141
  Raises:
142
- .ContextError: If called outside of a context
142
+ exceptions.ContextError: If called outside of a context
143
143
  established by :meth:`google.cloud.ndb.client.Client.context` and
144
144
  ``raise_context_error`` is :data:`True`.
145
145
  """
@@ -716,13 +716,13 @@ class Key(object):
716
716
  >>> key = ndb.Key("Trampoline", 88, project="xy", database="wv", namespace="zt")
717
717
  >>> key.reference()
718
718
  app: "xy"
719
- name_space: "zt"
720
719
  path {
721
720
  element {
722
721
  type: "Trampoline"
723
722
  id: 88
724
723
  }
725
724
  }
725
+ name_space: "zt"
726
726
  database_id: "wv"
727
727
  <BLANKLINE>
728
728
  """
@@ -1408,7 +1408,7 @@ def _parse_from_args(
1408
1408
  ~.datastore.Key: The constructed key.
1409
1409
 
1410
1410
  Raises:
1411
- .BadValueError: If ``parent`` is passed but is not a ``Key``.
1411
+ exceptions.BadValueError: If ``parent`` is passed but is not a ``Key``.
1412
1412
  """
1413
1413
  # Avoid circular import in Python 2.7
1414
1414
  from google.cloud.ndb import context as context_module
@@ -1514,7 +1514,7 @@ def _clean_flat_path(flat):
1514
1514
 
1515
1515
  Raises:
1516
1516
  TypeError: If the kind in a pair is an invalid type.
1517
- .BadArgumentError: If a key ID is :data:`None` (indicating a partial
1517
+ exceptions.BadArgumentError: If a key ID is :data:`None` (indicating a partial
1518
1518
  key), but in a pair other than the last one.
1519
1519
  TypeError: If a key ID is not a string or integer.
1520
1520
  """
@@ -1487,7 +1487,7 @@ class Property(ModelAttribute):
1487
1487
  Raises:
1488
1488
  ReadonlyPropertyError: If the ``entity`` is the result of a
1489
1489
  projection query.
1490
- .BadValueError: If the current property is repeated but the
1490
+ exceptions.BadValueError: If the current property is repeated but the
1491
1491
  ``value`` is not a basic container (:class:`list`,
1492
1492
  :class:`tuple`, :class:`set` or :class:`frozenset`).
1493
1493
  """
@@ -2258,15 +2258,15 @@ def _validate_key(value, entity=None):
2258
2258
  """Validate a key.
2259
2259
 
2260
2260
  Args:
2261
- value (.Key): The key to be validated.
2261
+ value (~google.cloud.ndb.key.Key): The key to be validated.
2262
2262
  entity (Optional[Model]): The entity that the key is being validated
2263
2263
  for.
2264
2264
 
2265
2265
  Returns:
2266
- .Key: The passed in ``value``.
2266
+ ~google.cloud.ndb.key.Key: The passed in ``value``.
2267
2267
 
2268
2268
  Raises:
2269
- .BadValueError: If ``value`` is not a :class:`.Key`.
2269
+ exceptions.BadValueError: If ``value`` is not a :class:`~google.cloud.ndb.key.Key`.
2270
2270
  KindError: If ``entity`` is specified, but the kind of the entity
2271
2271
  doesn't match the kind of ``value``.
2272
2272
  """
@@ -2315,7 +2315,7 @@ class ModelKey(Property):
2315
2315
  comparison.
2316
2316
 
2317
2317
  Raises:
2318
- .BadValueError: If ``value`` is :data:`None`.
2318
+ exceptions.BadValueError: If ``value`` is :data:`None`.
2319
2319
  """
2320
2320
  if value is not None:
2321
2321
  return super(ModelKey, self)._comparison(op, value)
@@ -2326,10 +2326,10 @@ class ModelKey(Property):
2326
2326
  """Validate a ``value`` before setting it.
2327
2327
 
2328
2328
  Args:
2329
- value (.Key): The value to check.
2329
+ value (~google.cloud.ndb.key.Key): The value to check.
2330
2330
 
2331
2331
  Returns:
2332
- .Key: The passed-in ``value``.
2332
+ ~google.cloud.ndb.key.Key: The passed-in ``value``.
2333
2333
  """
2334
2334
  return _validate_key(value)
2335
2335
 
@@ -2339,7 +2339,7 @@ class ModelKey(Property):
2339
2339
 
2340
2340
  Args:
2341
2341
  entity (Model): An entity to set the entity key on.
2342
- value (.Key): The key to be set on the entity.
2342
+ value (~google.cloud.ndb.key.Key): The key to be set on the entity.
2343
2343
  """
2344
2344
  if value is not None:
2345
2345
  value = _validate_key(value, entity=entity)
@@ -2355,7 +2355,7 @@ class ModelKey(Property):
2355
2355
  entity (Model): An entity to get the entity key from.
2356
2356
 
2357
2357
  Returns:
2358
- .Key: The entity key stored on ``entity``.
2358
+ ~google.cloud.ndb.key.Key: The entity key stored on ``entity``.
2359
2359
  """
2360
2360
  return entity._entity_key
2361
2361
 
@@ -2385,7 +2385,7 @@ class BooleanProperty(Property):
2385
2385
  bool: The passed-in ``value``.
2386
2386
 
2387
2387
  Raises:
2388
- .BadValueError: If ``value`` is not a :class:`bool`.
2388
+ exceptions.BadValueError: If ``value`` is not a :class:`bool`.
2389
2389
  """
2390
2390
  if not isinstance(value, bool):
2391
2391
  raise exceptions.BadValueError(
@@ -2431,7 +2431,7 @@ class IntegerProperty(Property):
2431
2431
  int: The passed-in ``value``.
2432
2432
 
2433
2433
  Raises:
2434
- .BadValueError: If ``value`` is not an :class:`int` or convertible
2434
+ exceptions.BadValueError: If ``value`` is not an :class:`int` or convertible
2435
2435
  to one.
2436
2436
  """
2437
2437
  if not isinstance(value, int):
@@ -2463,7 +2463,7 @@ class FloatProperty(Property):
2463
2463
  :class:`float`.
2464
2464
 
2465
2465
  Raises:
2466
- .BadValueError: If ``value`` is not a :class:`float` or convertible
2466
+ exceptions.BadValueError: If ``value`` is not a :class:`float` or convertible
2467
2467
  to one.
2468
2468
  """
2469
2469
  if not isinstance(value, (float, int)):
@@ -2595,8 +2595,8 @@ class BlobProperty(Property):
2595
2595
  value (bytes): The value to check.
2596
2596
 
2597
2597
  Raises:
2598
- .BadValueError: If ``value`` is not a :class:`bytes`.
2599
- .BadValueError: If the current property is indexed but the value
2598
+ exceptions.BadValueError: If ``value`` is not a :class:`bytes`.
2599
+ exceptions.BadValueError: If the current property is indexed but the value
2600
2600
  exceeds the maximum length (1500 bytes).
2601
2601
  """
2602
2602
  if not isinstance(value, bytes):
@@ -2698,14 +2698,26 @@ class BlobProperty(Property):
2698
2698
  Need to check the ds_entity for a compressed meaning that would
2699
2699
  indicate we are getting a compressed value.
2700
2700
  """
2701
- if self._name in ds_entity._meanings:
2702
- meaning = ds_entity._meanings[self._name][0]
2703
- if meaning == _MEANING_COMPRESSED and not self._compressed:
2704
- if self._repeated:
2705
- for sub_value in value:
2706
- sub_value.b_val = zlib.decompress(sub_value.b_val)
2707
- else:
2708
- value.b_val = zlib.decompress(value.b_val)
2701
+ if self._name in ds_entity._meanings and not self._compressed:
2702
+ root_meaning = ds_entity._meanings[self._name][0]
2703
+ sub_meanings = None
2704
+ # meaning may be a tuple. Attempt unwrap
2705
+ if isinstance(root_meaning, tuple):
2706
+ root_meaning, sub_meanings = root_meaning
2707
+ # decompress values if needed
2708
+ if root_meaning == _MEANING_COMPRESSED and not self._repeated:
2709
+ value.b_val = zlib.decompress(value.b_val)
2710
+ elif root_meaning == _MEANING_COMPRESSED and self._repeated:
2711
+ for sub_value in value:
2712
+ sub_value.b_val = zlib.decompress(sub_value.b_val)
2713
+ elif isinstance(sub_meanings, list) and self._repeated:
2714
+ for idx, sub_value in enumerate(value):
2715
+ try:
2716
+ if sub_meanings[idx] == _MEANING_COMPRESSED:
2717
+ sub_value.b_val = zlib.decompress(sub_value.b_val)
2718
+ except IndexError:
2719
+ # value list size exceeds sub_meanings list
2720
+ break
2709
2721
  return value
2710
2722
 
2711
2723
  def _db_set_compressed_meaning(self, p):
@@ -2776,11 +2788,11 @@ class CompressedTextProperty(BlobProperty):
2776
2788
  value (Union[bytes, str]): The value to check.
2777
2789
 
2778
2790
  Raises:
2779
- .BadValueError: If ``value`` is :class:`bytes`, but is not a valid
2791
+ exceptions.BadValueError: If ``value`` is :class:`bytes`, but is not a valid
2780
2792
  UTF-8 encoded string.
2781
- .BadValueError: If ``value`` is neither :class:`bytes` nor
2793
+ exceptions.BadValueError: If ``value`` is neither :class:`bytes` nor
2782
2794
  :class:`str`.
2783
- .BadValueError: If the current property is indexed but the UTF-8
2795
+ exceptions.BadValueError: If the current property is indexed but the UTF-8
2784
2796
  encoded value exceeds the maximum length (1500 bytes).
2785
2797
  """
2786
2798
  if not isinstance(value, str):
@@ -2938,11 +2950,11 @@ class TextProperty(Property):
2938
2950
  value (Union[bytes, str]): The value to check.
2939
2951
 
2940
2952
  Raises:
2941
- .BadValueError: If ``value`` is :class:`bytes`, but is not a valid
2953
+ exceptions.BadValueError: If ``value`` is :class:`bytes`, but is not a valid
2942
2954
  UTF-8 encoded string.
2943
- .BadValueError: If ``value`` is neither :class:`bytes` nor
2955
+ exceptions.BadValueError: If ``value`` is neither :class:`bytes` nor
2944
2956
  :class:`str`.
2945
- .BadValueError: If the current property is indexed but the UTF-8
2957
+ exceptions.BadValueError: If the current property is indexed but the UTF-8
2946
2958
  encoded value exceeds the maximum length (1500 bytes).
2947
2959
  """
2948
2960
  if isinstance(value, bytes):
@@ -3056,7 +3068,7 @@ class GeoPtProperty(Property):
3056
3068
  check.
3057
3069
 
3058
3070
  Raises:
3059
- .BadValueError: If ``value`` is not a :attr:`.GeoPt`.
3071
+ exceptions.BadValueError: If ``value`` is not a :attr:`.GeoPt`.
3060
3072
  """
3061
3073
  if not isinstance(value, GeoPt):
3062
3074
  raise exceptions.BadValueError(
@@ -3478,7 +3490,7 @@ class UserProperty(Property):
3478
3490
  value (User): The value to check.
3479
3491
 
3480
3492
  Raises:
3481
- .BadValueError: If ``value`` is not a :class:`User`.
3493
+ exceptions.BadValueError: If ``value`` is not a :class:`User`.
3482
3494
  """
3483
3495
  # Might be GAE User or our own version
3484
3496
  if type(value).__name__ != "User":
@@ -3552,7 +3564,7 @@ class UserProperty(Property):
3552
3564
 
3553
3565
 
3554
3566
  class KeyProperty(Property):
3555
- """A property that contains :class:`.Key` values.
3567
+ """A property that contains :class:`~google.cloud.ndb.key.Key` values.
3556
3568
 
3557
3569
  The constructor for :class:`KeyProperty` allows at most two positional
3558
3570
  arguments. Any usage of :data:`None` as a positional argument will
@@ -3595,10 +3607,10 @@ class KeyProperty(Property):
3595
3607
  multiple values.
3596
3608
  required (bool): Indicates if this property is required on the given
3597
3609
  model type.
3598
- default (.Key): The default value for this property.
3599
- choices (Iterable[.Key]): A container of allowed values for this
3610
+ default (~google.cloud.ndb.key.Key): The default value for this property.
3611
+ choices (Iterable[~google.cloud.ndb.key.Key]): A container of allowed values for this
3600
3612
  property.
3601
- validator (Callable[[~google.cloud.ndb.model.Property, .Key], bool]): A
3613
+ validator (Callable[[~google.cloud.ndb.model.Property, ~google.cloud.ndb.key.Key], bool]): A
3602
3614
  validator to be used to check values.
3603
3615
  verbose_name (str): A longer, user-friendly name for this property.
3604
3616
  write_empty_list (bool): Indicates if an empty list should be written
@@ -3686,13 +3698,13 @@ class KeyProperty(Property):
3686
3698
  """Validate a ``value`` before setting it.
3687
3699
 
3688
3700
  Args:
3689
- value (.Key): The value to check.
3701
+ value (~google.cloud.ndb.key.Key): The value to check.
3690
3702
 
3691
3703
  Raises:
3692
- .BadValueError: If ``value`` is not a :class:`.Key`.
3693
- .BadValueError: If ``value`` is a partial :class:`.Key` (i.e. it
3704
+ exceptions.BadValueError: If ``value`` is not a :class:`.Key`.
3705
+ exceptions.BadValueError: If ``value`` is a partial :class:`.Key` (i.e. it
3694
3706
  has no name or ID set).
3695
- .BadValueError: If the current property has an associated ``kind``
3707
+ exceptions.BadValueError: If the current property has an associated ``kind``
3696
3708
  and ``value`` does not match that kind.
3697
3709
  """
3698
3710
  if not isinstance(value, Key):
@@ -3758,7 +3770,7 @@ class BlobKeyProperty(Property):
3758
3770
  value (~google.cloud.ndb.model.BlobKey): The value to check.
3759
3771
 
3760
3772
  Raises:
3761
- .BadValueError: If ``value`` is not a
3773
+ exceptions.BadValueError: If ``value`` is not a
3762
3774
  :class:`~google.cloud.ndb.model.BlobKey`.
3763
3775
  """
3764
3776
  if not isinstance(value, BlobKey):
@@ -3877,7 +3889,7 @@ class DateTimeProperty(Property):
3877
3889
  value (~datetime.datetime): The value to check.
3878
3890
 
3879
3891
  Raises:
3880
- .BadValueError: If ``value`` is not a :class:`~datetime.datetime`.
3892
+ exceptions.BadValueError: If ``value`` is not a :class:`~datetime.datetime`.
3881
3893
  """
3882
3894
  if not isinstance(value, datetime.datetime):
3883
3895
  raise exceptions.BadValueError(
@@ -3976,7 +3988,7 @@ class DateProperty(DateTimeProperty):
3976
3988
  value (~datetime.date): The value to check.
3977
3989
 
3978
3990
  Raises:
3979
- .BadValueError: If ``value`` is not a :class:`~datetime.date`.
3991
+ exceptions.BadValueError: If ``value`` is not a :class:`~datetime.date`.
3980
3992
  """
3981
3993
  if not isinstance(value, datetime.date):
3982
3994
  raise exceptions.BadValueError(
@@ -4036,7 +4048,7 @@ class TimeProperty(DateTimeProperty):
4036
4048
  value (~datetime.time): The value to check.
4037
4049
 
4038
4050
  Raises:
4039
- .BadValueError: If ``value`` is not a :class:`~datetime.time`.
4051
+ exceptions.BadValueError: If ``value`` is not a :class:`~datetime.time`.
4040
4052
  """
4041
4053
  if not isinstance(value, datetime.time):
4042
4054
  raise exceptions.BadValueError(
@@ -4440,7 +4452,7 @@ class LocalStructuredProperty(BlobProperty):
4440
4452
  Args:
4441
4453
  value: The value to check.
4442
4454
  Raises:
4443
- .BadValueError: If ``value`` is not a given class.
4455
+ exceptions.BadValueError: If ``value`` is not a given class.
4444
4456
  """
4445
4457
  if isinstance(value, dict):
4446
4458
  # A dict is assumed to be the result of a _to_dict() call.
@@ -4869,7 +4881,7 @@ class Model(_NotEqualMixin, metaclass=MetaModel):
4869
4881
  to properties of this model.
4870
4882
 
4871
4883
  Raises:
4872
- .BadArgumentError: If the constructor is called with ``key`` and one
4884
+ exceptions.BadArgumentError: If the constructor is called with ``key`` and one
4873
4885
  of ``id``, ``app``, ``namespace``, ``database``, or ``parent`` specified.
4874
4886
  """
4875
4887
 
@@ -5371,10 +5383,10 @@ class Model(_NotEqualMixin, metaclass=MetaModel):
5371
5383
  """Validation for ``_key`` attribute (designed to be overridden).
5372
5384
 
5373
5385
  Args:
5374
- key (.Key): Proposed key to use for this entity.
5386
+ key (~google.cloud.ndb.key.Key): Proposed key to use for this entity.
5375
5387
 
5376
5388
  Returns:
5377
- .Key: The validated ``key``.
5389
+ ~google.cloud.ndb.key.Key: The validated ``key``.
5378
5390
  """
5379
5391
  return key
5380
5392
 
@@ -338,7 +338,7 @@ class Parameter(ParameterizedThing):
338
338
  Any: The bound value for the current parameter.
339
339
 
340
340
  Raises:
341
- .BadArgumentError: If the current parameter is not in ``bindings``.
341
+ exceptions.BadArgumentError: If the current parameter is not in ``bindings``.
342
342
  """
343
343
  key = self._key
344
344
  if key not in bindings:
@@ -565,7 +565,7 @@ class ParameterNode(Node):
565
565
  post (bool): Indicates if this is a post-filter node.
566
566
 
567
567
  Raises:
568
- .BadArgumentError: Always. This is because this node represents
568
+ exceptions.BadArgumentError: Always. This is because this node represents
569
569
  a parameter, i.e. no value exists to be filtered on.
570
570
  """
571
571
  raise exceptions.BadArgumentError(
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
  #
15
- __version__ = "2.3.1"
15
+ __version__ = "2.3.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-cloud-ndb
3
- Version: 2.3.1
3
+ Version: 2.3.3
4
4
  Summary: NDB library for Google Cloud Datastore
5
5
  Home-page: https://github.com/googleapis/python-ndb
6
6
  Author: Google LLC
@@ -27,20 +27,25 @@ Description-Content-Type: text/markdown
27
27
  License-File: LICENSE
28
28
  License-File: AUTHORS
29
29
  Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0
30
- Requires-Dist: google-cloud-datastore<3.0.0dev,>=2.16.0
31
- Requires-Dist: protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5
30
+ Requires-Dist: google-cloud-datastore!=2.20.2,<3.0.0dev,>=2.16.0
31
+ Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2
32
32
  Requires-Dist: pymemcache<5.0.0dev,>=2.1.0
33
33
  Requires-Dist: pytz>=2018.3
34
34
  Requires-Dist: redis<6.0.0dev,>=3.0.0
35
35
 
36
36
  # Google Cloud Datastore `ndb` Client Library
37
37
 
38
+ [![stable](https://img.shields.io/badge/support-stable-gold.svg)](https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels)
39
+ [![pypi](https://img.shields.io/pypi/v/google-cloud-ndb.svg)](https://pypi.org/project/google-cloud-ndb/)
40
+ [![versions](https://img.shields.io/pypi/pyversions/google-cloud-ndb.svg)](https://pypi.org/project/google-cloud-ndb/)
41
+
38
42
  ## Introduction
39
43
 
40
44
  This is an updated version of the `ndb` client library for use with
41
45
  [Google Cloud Datastore][0].
42
46
 
43
47
  * [Client Library Documentation](https://googleapis.dev/python/python-ndb/latest)
48
+ * [Product Documentation](https://cloud.google.com/datastore/docs)
44
49
 
45
50
  The original Python 2 version of `ndb` was designed specifically for the
46
51
  [Google App Engine][1] `python27` runtime and can be found at
@@ -1,6 +1,6 @@
1
1
  google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0
2
- google-cloud-datastore<3.0.0dev,>=2.16.0
3
- protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5
2
+ google-cloud-datastore!=2.20.2,<3.0.0dev,>=2.16.0
3
+ protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2
4
4
  pymemcache<5.0.0dev,>=2.1.0
5
5
  pytz>=2018.3
6
6
  redis<6.0.0dev,>=3.0.0
@@ -41,8 +41,8 @@ def main():
41
41
  readme = readme_file.read()
42
42
  dependencies = [
43
43
  "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*",
44
- "google-cloud-datastore >= 2.16.0, < 3.0.0dev",
45
- "protobuf >= 3.19.5, <5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
44
+ "google-cloud-datastore >= 2.16.0, != 2.20.2, < 3.0.0dev",
45
+ "protobuf >= 3.20.2, <6.0.0dev,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
46
46
  "pymemcache >= 2.1.0, < 5.0.0dev",
47
47
  "pytz >= 2018.3",
48
48
  "redis >= 3.0.0, < 6.0.0dev",