google-cloud-ndb 2.5.1__tar.gz → 2.6.0__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.
- {google_cloud_ndb-2.5.1/google_cloud_ndb.egg-info → google_cloud_ndb-2.6.0}/PKG-INFO +1 -1
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/__init__.py +5 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_datastore_api.py +9 -7
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/tasklets.py +1 -2
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/version.py +1 -1
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0/google_cloud_ndb.egg-info}/PKG-INFO +1 -1
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/AUTHORS +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/LICENSE +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/README.md +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_batch.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_cache.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_datastore_query.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_datastore_types.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_eventloop.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_gql.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_legacy_entity_pb.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_legacy_protocol_buffer.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_options.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_remote.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_retry.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_transaction.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/blobstore.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/client.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/context.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/django_middleware.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/exceptions.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/global_cache.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/key.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/metadata.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/model.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/msgprop.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/polymodel.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/query.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/stats.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/utils.py +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google_cloud_ndb.egg-info/SOURCES.txt +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google_cloud_ndb.egg-info/dependency_links.txt +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google_cloud_ndb.egg-info/not-zip-safe +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google_cloud_ndb.egg-info/requires.txt +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google_cloud_ndb.egg-info/top_level.txt +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/setup.cfg +0 -0
- {google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/setup.py +0 -0
|
@@ -21,6 +21,8 @@ version of the ``db`` API (hence ``ndb``).
|
|
|
21
21
|
.. autodata:: __all__
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
|
+
import google.api_core as api_core
|
|
25
|
+
|
|
24
26
|
from google.cloud.ndb import version
|
|
25
27
|
|
|
26
28
|
__version__: str = version.__version__
|
|
@@ -135,6 +137,9 @@ from google.cloud.ndb.tasklets import (
|
|
|
135
137
|
wait_any,
|
|
136
138
|
)
|
|
137
139
|
|
|
140
|
+
api_core.check_python_version(__name__)
|
|
141
|
+
api_core.check_dependency_versions(__name__)
|
|
142
|
+
|
|
138
143
|
__all__ = [
|
|
139
144
|
"__version__",
|
|
140
145
|
"AutoBatcher",
|
|
@@ -434,6 +434,7 @@ def delete(key, options):
|
|
|
434
434
|
use_global_cache = context._use_global_cache(key, options)
|
|
435
435
|
use_datastore = context._use_datastore(key, options)
|
|
436
436
|
transaction = context.transaction
|
|
437
|
+
lock = None
|
|
437
438
|
|
|
438
439
|
if use_global_cache:
|
|
439
440
|
cache_key = _cache.global_cache_key(key)
|
|
@@ -450,17 +451,18 @@ def delete(key, options):
|
|
|
450
451
|
yield batch.delete(key)
|
|
451
452
|
|
|
452
453
|
if use_global_cache:
|
|
453
|
-
if
|
|
454
|
+
if lock is not None:
|
|
455
|
+
if transaction:
|
|
454
456
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
+
def callback():
|
|
458
|
+
_cache.global_unlock_for_write(cache_key, lock).result()
|
|
457
459
|
|
|
458
|
-
|
|
460
|
+
context.call_on_transaction_complete(callback)
|
|
459
461
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
+
else:
|
|
463
|
+
yield _cache.global_unlock_for_write(cache_key, lock)
|
|
462
464
|
|
|
463
|
-
|
|
465
|
+
elif not use_datastore:
|
|
464
466
|
yield _cache.global_delete(cache_key)
|
|
465
467
|
|
|
466
468
|
|
|
@@ -314,8 +314,7 @@ class _TaskletFuture(Future):
|
|
|
314
314
|
with self.context.use():
|
|
315
315
|
# Send the next value or exception into the generator
|
|
316
316
|
if error:
|
|
317
|
-
|
|
318
|
-
yielded = self.generator.throw(type(error), error, traceback)
|
|
317
|
+
yielded = self.generator.throw(error)
|
|
319
318
|
|
|
320
319
|
else:
|
|
321
320
|
# send_value will be None if this is the first time
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google/cloud/ndb/_legacy_protocol_buffer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_ndb-2.5.1 → google_cloud_ndb-2.6.0}/google_cloud_ndb.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|