From 77591b35aab3db4deb1cc7ef24798ad8ec6b8bca Mon Sep 17 00:00:00 2001 From: Bob Hogg Date: Fri, 4 Aug 2023 15:52:37 +0000 Subject: [PATCH 1/3] docs: Mark database argument for get_by_id and its async counterpart as ignored The Client class should be used to set the database instead. --- google/cloud/ndb/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google/cloud/ndb/model.py b/google/cloud/ndb/model.py index b780f6a5..4a396acd 100644 --- a/google/cloud/ndb/model.py +++ b/google/cloud/ndb/model.py @@ -5764,8 +5764,7 @@ def _get_by_id( ``global_cache_timeout``. max_memcache_items (int): No longer supported. force_writes (bool): No longer supported. - database (Optional[str]): Database for the entity to load. If not - passed, uses the client's value. + database (Optional[str]): Ignored. Please set the database on the Client instead. Returns: Optional[Model]: The retrieved entity, if one is found. @@ -5851,6 +5850,7 @@ def _get_by_id_async( ``global_cache_timeout``. max_memcache_items (int): No longer supported. force_writes (bool): No longer supported. + database (Optional[str]): Ignored. Please set the database on the Client instead. Returns: tasklets.Future: Optional[Model]: The retrieved entity, if one is From 73891f056ba1de138edc548770d0a2adbcc1bae6 Mon Sep 17 00:00:00 2001 From: "Bob \"Wombat\" Hogg" Date: Wed, 9 Aug 2023 13:02:22 -0400 Subject: [PATCH 2/3] Update google/cloud/ndb/model.py Co-authored-by: Anthonios Partheniou --- google/cloud/ndb/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/cloud/ndb/model.py b/google/cloud/ndb/model.py index 4a396acd..d37fc935 100644 --- a/google/cloud/ndb/model.py +++ b/google/cloud/ndb/model.py @@ -5764,7 +5764,7 @@ def _get_by_id( ``global_cache_timeout``. max_memcache_items (int): No longer supported. force_writes (bool): No longer supported. - database (Optional[str]): Ignored. Please set the database on the Client instead. + database (Optional[str]): This parameter is ignored. Please set the database on the Client instead. Returns: Optional[Model]: The retrieved entity, if one is found. From a12ece6a5c5325e84c4637f4758f5c39bcaa13dd Mon Sep 17 00:00:00 2001 From: "Bob \"Wombat\" Hogg" Date: Wed, 9 Aug 2023 13:02:29 -0400 Subject: [PATCH 3/3] Update google/cloud/ndb/model.py Co-authored-by: Anthonios Partheniou --- google/cloud/ndb/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/cloud/ndb/model.py b/google/cloud/ndb/model.py index d37fc935..42fe044b 100644 --- a/google/cloud/ndb/model.py +++ b/google/cloud/ndb/model.py @@ -5850,7 +5850,7 @@ def _get_by_id_async( ``global_cache_timeout``. max_memcache_items (int): No longer supported. force_writes (bool): No longer supported. - database (Optional[str]): Ignored. Please set the database on the Client instead. + database (Optional[str]): This parameter is ignored. Please set the database on the Client instead. Returns: tasklets.Future: Optional[Model]: The retrieved entity, if one is