diff --git a/.flake8 b/.flake8 index 2e438749..87f6e408 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 98994f47..a3da1b0d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd -# created: 2023-06-28T17:03:33.371210701Z + digest: sha256:3e3800bb100af5d7f9e810d48212b37812c1856d20ffeafb99ebe66461b61fc7 +# created: 2023-08-02T10:53:29.114535628Z diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml index 41bff0b5..b2016d11 100644 --- a/.github/auto-label.yaml +++ b/.github/auto-label.yaml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 3ca0a226..3795bde0 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/docker/docs/Dockerfile b/.kokoro/docker/docs/Dockerfile index f8137d0a..8e39a2cc 100644 --- a/.kokoro/docker/docs/Dockerfile +++ b/.kokoro/docker/docs/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh index f5251425..6f397214 100755 --- a/.kokoro/populate-secrets.sh +++ b/.kokoro/populate-secrets.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC. +# Copyright 2023 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index 1c4d6237..9eafe0be 100755 --- a/.kokoro/publish-docs.sh +++ b/.kokoro/publish-docs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release.sh b/.kokoro/release.sh index 0235f8de..c236e3cf 100755 --- a/.kokoro/release.sh +++ b/.kokoro/release.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index c7929db6..029bd342 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -20,9 +20,9 @@ cachetools==5.2.0 \ --hash=sha256:6a94c6402995a99c3970cc7e4884bb60b4a8639938157eeed436098bf9831757 \ --hash=sha256:f9f17d2aec496a9aa6b76f53e3b614c965223c061982d434d160f930c698a9db # via google-auth -certifi==2022.12.7 \ - --hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \ - --hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18 +certifi==2023.7.22 \ + --hash=sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082 \ + --hash=sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9 # via requests cffi==1.15.1 \ --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ @@ -113,26 +113,30 @@ commonmark==0.9.1 \ --hash=sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60 \ --hash=sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9 # via rich -cryptography==41.0.0 \ - --hash=sha256:0ddaee209d1cf1f180f1efa338a68c4621154de0afaef92b89486f5f96047c55 \ - --hash=sha256:14754bcdae909d66ff24b7b5f166d69340ccc6cb15731670435efd5719294895 \ - --hash=sha256:344c6de9f8bda3c425b3a41b319522ba3208551b70c2ae00099c205f0d9fd3be \ - --hash=sha256:34d405ea69a8b34566ba3dfb0521379b210ea5d560fafedf9f800a9a94a41928 \ - --hash=sha256:3680248309d340fda9611498a5319b0193a8dbdb73586a1acf8109d06f25b92d \ - --hash=sha256:3c5ef25d060c80d6d9f7f9892e1d41bb1c79b78ce74805b8cb4aa373cb7d5ec8 \ - --hash=sha256:4ab14d567f7bbe7f1cdff1c53d5324ed4d3fc8bd17c481b395db224fb405c237 \ - --hash=sha256:5c1f7293c31ebc72163a9a0df246f890d65f66b4a40d9ec80081969ba8c78cc9 \ - --hash=sha256:6b71f64beeea341c9b4f963b48ee3b62d62d57ba93eb120e1196b31dc1025e78 \ - --hash=sha256:7d92f0248d38faa411d17f4107fc0bce0c42cae0b0ba5415505df72d751bf62d \ - --hash=sha256:8362565b3835ceacf4dc8f3b56471a2289cf51ac80946f9087e66dc283a810e0 \ - --hash=sha256:84a165379cb9d411d58ed739e4af3396e544eac190805a54ba2e0322feb55c46 \ - --hash=sha256:88ff107f211ea696455ea8d911389f6d2b276aabf3231bf72c8853d22db755c5 \ - --hash=sha256:9f65e842cb02550fac96536edb1d17f24c0a338fd84eaf582be25926e993dde4 \ - --hash=sha256:a4fc68d1c5b951cfb72dfd54702afdbbf0fb7acdc9b7dc4301bbf2225a27714d \ - --hash=sha256:b7f2f5c525a642cecad24ee8670443ba27ac1fab81bba4cc24c7b6b41f2d0c75 \ - --hash=sha256:b846d59a8d5a9ba87e2c3d757ca019fa576793e8758174d3868aecb88d6fc8eb \ - --hash=sha256:bf8fc66012ca857d62f6a347007e166ed59c0bc150cefa49f28376ebe7d992a2 \ - --hash=sha256:f5d0bf9b252f30a31664b6f64432b4730bb7038339bd18b1fafe129cfc2be9be +cryptography==41.0.3 \ + --hash=sha256:0d09fb5356f975974dbcb595ad2d178305e5050656affb7890a1583f5e02a306 \ + --hash=sha256:23c2d778cf829f7d0ae180600b17e9fceea3c2ef8b31a99e3c694cbbf3a24b84 \ + --hash=sha256:3fb248989b6363906827284cd20cca63bb1a757e0a2864d4c1682a985e3dca47 \ + --hash=sha256:41d7aa7cdfded09b3d73a47f429c298e80796c8e825ddfadc84c8a7f12df212d \ + --hash=sha256:42cb413e01a5d36da9929baa9d70ca90d90b969269e5a12d39c1e0d475010116 \ + --hash=sha256:4c2f0d35703d61002a2bbdcf15548ebb701cfdd83cdc12471d2bae80878a4207 \ + --hash=sha256:4fd871184321100fb400d759ad0cddddf284c4b696568204d281c902fc7b0d81 \ + --hash=sha256:5259cb659aa43005eb55a0e4ff2c825ca111a0da1814202c64d28a985d33b087 \ + --hash=sha256:57a51b89f954f216a81c9d057bf1a24e2f36e764a1ca9a501a6964eb4a6800dd \ + --hash=sha256:652627a055cb52a84f8c448185922241dd5217443ca194d5739b44612c5e6507 \ + --hash=sha256:67e120e9a577c64fe1f611e53b30b3e69744e5910ff3b6e97e935aeb96005858 \ + --hash=sha256:6af1c6387c531cd364b72c28daa29232162010d952ceb7e5ca8e2827526aceae \ + --hash=sha256:6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34 \ + --hash=sha256:7efe8041897fe7a50863e51b77789b657a133c75c3b094e51b5e4b5cec7bf906 \ + --hash=sha256:84537453d57f55a50a5b6835622ee405816999a7113267739a1b4581f83535bd \ + --hash=sha256:8f09daa483aedea50d249ef98ed500569841d6498aa9c9f4b0531b9964658922 \ + --hash=sha256:95dd7f261bb76948b52a5330ba5202b91a26fbac13ad0e9fc8a3ac04752058c7 \ + --hash=sha256:a74fbcdb2a0d46fe00504f571a2a540532f4c188e6ccf26f1f178480117b33c4 \ + --hash=sha256:a983e441a00a9d57a4d7c91b3116a37ae602907a7618b882c8013b5762e80574 \ + --hash=sha256:ab8de0d091acbf778f74286f4989cf3d1528336af1b59f3e5d2ebca8b5fe49e1 \ + --hash=sha256:aeb57c421b34af8f9fe830e1955bf493a86a7996cc1338fe41b30047d16e962c \ + --hash=sha256:ce785cf81a7bdade534297ef9e490ddff800d956625020ab2ec2780a556c313e \ + --hash=sha256:d0d651aa754ef58d75cec6edfbd21259d93810b73f6ec246436a21b7841908de # via # gcp-releasetool # secretstorage @@ -392,9 +396,9 @@ pycparser==2.21 \ --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 # via cffi -pygments==2.13.0 \ - --hash=sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1 \ - --hash=sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42 +pygments==2.15.0 \ + --hash=sha256:77a3299119af881904cd5ecd1ac6a66214b6e9bed1f2db16993b54adede64094 \ + --hash=sha256:f7e36cffc4c517fbc252861b9a6e4644ca0e5abadf9a113c72d1358ad09b9500 # via # readme-renderer # rich diff --git a/.kokoro/test-samples-against-head.sh b/.kokoro/test-samples-against-head.sh index ba3a707b..63ac41df 100755 --- a/.kokoro/test-samples-against-head.sh +++ b/.kokoro/test-samples-against-head.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/test-samples-impl.sh b/.kokoro/test-samples-impl.sh index 2c6500ca..5a0f5fab 100755 --- a/.kokoro/test-samples-impl.sh +++ b/.kokoro/test-samples-impl.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index 11c042d3..50b35a48 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index f39236e9..d85b1f26 100755 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2017 Google Inc. +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/trampoline_v2.sh b/.kokoro/trampoline_v2.sh index 4af6cdc2..59a7cf3a 100755 --- a/.kokoro/trampoline_v2.sh +++ b/.kokoro/trampoline_v2.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5405cc8f..19409cbd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,6 +26,6 @@ repos: hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 3.9.2 + rev: 6.1.0 hooks: - id: flake8 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f122d158..882f663e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.16.1" + ".": "2.17.0" } \ No newline at end of file diff --git a/.trampolinerc b/.trampolinerc index 0eee72ab..a7dfeb42 100644 --- a/.trampolinerc +++ b/.trampolinerc @@ -1,4 +1,4 @@ -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Template for .trampolinerc - # Add required env vars here. required_envvars+=( ) diff --git a/CHANGELOG.md b/CHANGELOG.md index 907be34a..05e37195 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://pypi.org/project/google-cloud-datastore/#history +## [2.17.0](https://github.com/googleapis/python-datastore/compare/v2.16.1...v2.17.0) (2023-08-09) + + +### Features + +* Publish proto definitions for SUM/AVG in Datastore ([cfcd0c2](https://github.com/googleapis/python-datastore/commit/cfcd0c2552c5dcf503cb3dee8c57b1e82be2d432)) + + +### Documentation + +* Minor formatting in Datastore Admin API ([cfcd0c2](https://github.com/googleapis/python-datastore/commit/cfcd0c2552c5dcf503cb3dee8c57b1e82be2d432)) +* Specify limit for `properties` in `Index` message in Datastore Admin API ([cfcd0c2](https://github.com/googleapis/python-datastore/commit/cfcd0c2552c5dcf503cb3dee8c57b1e82be2d432)) + ## [2.16.1](https://github.com/googleapis/python-datastore/compare/v2.16.0...v2.16.1) (2023-07-05) diff --git a/MANIFEST.in b/MANIFEST.in index e783f4c6..e0a66705 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/README.rst b/README.rst index 392bfd8c..0d5b7f26 100644 --- a/README.rst +++ b/README.rst @@ -40,21 +40,24 @@ In order to use this library, you first need to go through the following steps: Installation ~~~~~~~~~~~~ -Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to -create isolated Python environments. The basic problem it addresses is one of -dependencies and versions, and indirectly permissions. +Install this library in a virtual environment using `venv`_. `venv`_ is a tool that +creates isolated Python environments. These isolated environments can have separate +versions of Python packages, which allows you to isolate one project's dependencies +from the dependencies of other projects. -With `virtualenv`_, it's possible to install this library without needing system +With `venv`_, it's possible to install this library without needing system install permissions, and without clashing with the installed system dependencies. -.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ +.. _`venv`: https://docs.python.org/3/library/venv.html Code samples and snippets ~~~~~~~~~~~~~~~~~~~~~~~~~ -Code samples and snippets live in the `samples/` folder. +Code samples and snippets live in the `samples/`_ folder. + +.. _samples/: https://github.com/googleapis/python-datastore/tree/main/samples Supported Python Versions @@ -81,10 +84,9 @@ Mac/Linux .. code-block:: console - pip install virtualenv - virtualenv + python3 -m venv source /bin/activate - /bin/pip install google-cloud-datastore + pip install google-cloud-datastore Windows @@ -92,10 +94,9 @@ Windows .. code-block:: console - pip install virtualenv - virtualenv - \Scripts\activate - \Scripts\pip.exe install google-cloud-datastore + py -m venv + .\\Scripts\activate + pip install google-cloud-datastore Next Steps ~~~~~~~~~~ diff --git a/docs/conf.py b/docs/conf.py index febe857a..3e814f57 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore/client.py b/google/cloud/datastore/client.py index fe25a0e0..3f5041d6 100644 --- a/google/cloud/datastore/client.py +++ b/google/cloud/datastore/client.py @@ -334,7 +334,7 @@ def __init__( else: api_endpoint = _DATASTORE_BASE_URL if client_options: - if type(client_options) == dict: + if isinstance(client_options, dict): client_options = google.api_core.client_options.from_dict( client_options ) diff --git a/google/cloud/datastore/gapic_version.py b/google/cloud/datastore/gapic_version.py index da0da672..6de7a69b 100644 --- a/google/cloud/datastore/gapic_version.py +++ b/google/cloud/datastore/gapic_version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.16.1" # {x-release-please-version} +__version__ = "2.17.0" # {x-release-please-version} diff --git a/google/cloud/datastore/version.py b/google/cloud/datastore/version.py index 61e0c0a8..422b383c 100644 --- a/google/cloud/datastore/version.py +++ b/google/cloud/datastore/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.16.1" +__version__ = "2.17.0" diff --git a/google/cloud/datastore_admin/__init__.py b/google/cloud/datastore_admin/__init__.py index 6e5cd0cd..17ff436e 100644 --- a/google/cloud/datastore_admin/__init__.py +++ b/google/cloud/datastore_admin/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_admin/gapic_version.py b/google/cloud/datastore_admin/gapic_version.py index 8edfaef7..8d4f4cfb 100644 --- a/google/cloud/datastore_admin/gapic_version.py +++ b/google/cloud/datastore_admin/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.16.1" # {x-release-please-version} +__version__ = "2.17.0" # {x-release-please-version} diff --git a/google/cloud/datastore_admin/py.typed b/google/cloud/datastore_admin/py.typed index dc48a544..e82a9319 100644 --- a/google/cloud/datastore_admin/py.typed +++ b/google/cloud/datastore_admin/py.typed @@ -1,2 +1,2 @@ # Marker file for PEP 561. -# The google-cloud-datastore-admin package uses inline types. +# The google-cloud-datastore package uses inline types. diff --git a/google/cloud/datastore_admin_v1/__init__.py b/google/cloud/datastore_admin_v1/__init__.py index d2b8b534..b909402e 100644 --- a/google/cloud/datastore_admin_v1/__init__.py +++ b/google/cloud/datastore_admin_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_admin_v1/gapic_version.py b/google/cloud/datastore_admin_v1/gapic_version.py index 8a60bdde..7a84223d 100644 --- a/google/cloud/datastore_admin_v1/gapic_version.py +++ b/google/cloud/datastore_admin_v1/gapic_version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.16.1" # {x-release-please-version} +__version__ = "2.17.0" # {x-release-please-version} diff --git a/google/cloud/datastore_admin_v1/py.typed b/google/cloud/datastore_admin_v1/py.typed index dc48a544..e82a9319 100644 --- a/google/cloud/datastore_admin_v1/py.typed +++ b/google/cloud/datastore_admin_v1/py.typed @@ -1,2 +1,2 @@ # Marker file for PEP 561. -# The google-cloud-datastore-admin package uses inline types. +# The google-cloud-datastore package uses inline types. diff --git a/google/cloud/datastore_admin_v1/services/__init__.py b/google/cloud/datastore_admin_v1/services/__init__.py index e8e1c384..89a37dc9 100644 --- a/google/cloud/datastore_admin_v1/services/__init__.py +++ b/google/cloud/datastore_admin_v1/services/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_admin_v1/services/datastore_admin/__init__.py b/google/cloud/datastore_admin_v1/services/datastore_admin/__init__.py index 6e5bb3d1..bbf2af15 100644 --- a/google/cloud/datastore_admin_v1/services/datastore_admin/__init__.py +++ b/google/cloud/datastore_admin_v1/services/datastore_admin/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_admin_v1/services/datastore_admin/async_client.py b/google/cloud/datastore_admin_v1/services/datastore_admin/async_client.py index 818fb6bf..fb112508 100644 --- a/google/cloud/datastore_admin_v1/services/datastore_admin/async_client.py +++ b/google/cloud/datastore_admin_v1/services/datastore_admin/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -58,11 +58,8 @@ class DatastoreAdminAsyncClient: """Google Cloud Datastore Admin API The Datastore Admin API provides several admin services for Cloud Datastore. - ----------------------------------------------------------------------------- - ## Concepts - - Project, namespace, kind, and entity as defined in the Google - Cloud Datastore API. + Concepts: Project, namespace, kind, and entity as defined in the + Google Cloud Datastore API. Operation: An Operation represents work being performed in the background. @@ -70,49 +67,45 @@ class DatastoreAdminAsyncClient: project. This is specified as a combination of kinds and namespaces (either or both of which may be all). - ----------------------------------------------------------------------------- - ## Services - - # Export/Import - - The Export/Import service provides the ability to copy all or a - subset of entities to/from Google Cloud Storage. - - Exported data may be imported into Cloud Datastore for any - Google Cloud Platform project. It is not restricted to the - export source project. It is possible to export from one project - and then import into another. - Exported data can also be loaded into Google BigQuery for - analysis. - Exports and imports are performed asynchronously. An Operation - resource is created for each export/import. The state (including - any errors encountered) of the export/import may be queried via - the Operation resource. - # Index - - The index service manages Cloud Datastore composite indexes. - Index creation and deletion are performed asynchronously. An - Operation resource is created for each such asynchronous - operation. The state of the operation (including any errors - encountered) may be queried via the Operation resource. - - # Operation - - The Operations collection provides a record of actions performed - for the specified project (including any operations in - progress). Operations are not created directly but through calls - on other collections or resources. - An operation that is not yet done may be cancelled. The request - to cancel is asynchronous and the operation may continue to run - for some time after the request to cancel is made. - - An operation that is done may be deleted so that it is no longer - listed as part of the Operation collection. - - ListOperations returns all pending operations, but not completed - operations. - Operations are created by service DatastoreAdmin, - but are accessed via service google.longrunning.Operations. + Export/Import Service: + + - The Export/Import service provides the ability to copy all or + a subset of entities to/from Google Cloud Storage. + - Exported data may be imported into Cloud Datastore for any + Google Cloud Platform project. It is not restricted to the + export source project. It is possible to export from one + project and then import into another. + - Exported data can also be loaded into Google BigQuery for + analysis. + - Exports and imports are performed asynchronously. An Operation + resource is created for each export/import. The state + (including any errors encountered) of the export/import may be + queried via the Operation resource. + + Index Service: + + - The index service manages Cloud Datastore composite indexes. + - Index creation and deletion are performed asynchronously. An + Operation resource is created for each such asynchronous + operation. The state of the operation (including any errors + encountered) may be queried via the Operation resource. + + Operation Service: + + - The Operations collection provides a record of actions + performed for the specified project (including any operations + in progress). Operations are not created directly but through + calls on other collections or resources. + - An operation that is not yet done may be cancelled. The + request to cancel is asynchronous and the operation may + continue to run for some time after the request to cancel is + made. + - An operation that is done may be deleted so that it is no + longer listed as part of the Operation collection. + - ListOperations returns all pending operations, but not + completed operations. + - Operations are created by service DatastoreAdmin, but are + accessed via service google.longrunning.Operations. """ _client: DatastoreAdminClient diff --git a/google/cloud/datastore_admin_v1/services/datastore_admin/client.py b/google/cloud/datastore_admin_v1/services/datastore_admin/client.py index f160915d..fabdcecf 100644 --- a/google/cloud/datastore_admin_v1/services/datastore_admin/client.py +++ b/google/cloud/datastore_admin_v1/services/datastore_admin/client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -100,58 +100,54 @@ class DatastoreAdminClient(metaclass=DatastoreAdminClientMeta): """Google Cloud Datastore Admin API The Datastore Admin API provides several admin services for Cloud Datastore. - ## Concepts - - Project, namespace, kind, and entity as defined in the Google - Cloud Datastore API. + Concepts: Project, namespace, kind, and entity as defined in the + Google Cloud Datastore API. Operation: An Operation represents work being performed in the background. EntityFilter: Allows specifying a subset of entities in a project. This is specified as a combination of kinds and namespaces (either or both of which may be all). - ## Services - - # Export/Import - - The Export/Import service provides the ability to copy all or a - subset of entities to/from Google Cloud Storage. - - Exported data may be imported into Cloud Datastore for any - Google Cloud Platform project. It is not restricted to the - export source project. It is possible to export from one project - and then import into another. - Exported data can also be loaded into Google BigQuery for - analysis. - Exports and imports are performed asynchronously. An Operation - resource is created for each export/import. The state (including - any errors encountered) of the export/import may be queried via - the Operation resource. - # Index - - The index service manages Cloud Datastore composite indexes. - Index creation and deletion are performed asynchronously. An - Operation resource is created for each such asynchronous - operation. The state of the operation (including any errors - encountered) may be queried via the Operation resource. - - # Operation - - The Operations collection provides a record of actions performed - for the specified project (including any operations in - progress). Operations are not created directly but through calls - on other collections or resources. - An operation that is not yet done may be cancelled. The request - to cancel is asynchronous and the operation may continue to run - for some time after the request to cancel is made. - - An operation that is done may be deleted so that it is no longer - listed as part of the Operation collection. - - ListOperations returns all pending operations, but not completed - operations. - Operations are created by service DatastoreAdmin, - but are accessed via service google.longrunning.Operations. + + Export/Import Service: + + - The Export/Import service provides the ability to copy all or + a subset of entities to/from Google Cloud Storage. + - Exported data may be imported into Cloud Datastore for any + Google Cloud Platform project. It is not restricted to the + export source project. It is possible to export from one + project and then import into another. + - Exported data can also be loaded into Google BigQuery for + analysis. + - Exports and imports are performed asynchronously. An Operation + resource is created for each export/import. The state + (including any errors encountered) of the export/import may be + queried via the Operation resource. + + Index Service: + + - The index service manages Cloud Datastore composite indexes. + - Index creation and deletion are performed asynchronously. An + Operation resource is created for each such asynchronous + operation. The state of the operation (including any errors + encountered) may be queried via the Operation resource. + + Operation Service: + + - The Operations collection provides a record of actions + performed for the specified project (including any operations + in progress). Operations are not created directly but through + calls on other collections or resources. + - An operation that is not yet done may be cancelled. The + request to cancel is asynchronous and the operation may + continue to run for some time after the request to cancel is + made. + - An operation that is done may be deleted so that it is no + longer listed as part of the Operation collection. + - ListOperations returns all pending operations, but not + completed operations. + - Operations are created by service DatastoreAdmin, but are + accessed via service google.longrunning.Operations. """ @staticmethod diff --git a/google/cloud/datastore_admin_v1/services/datastore_admin/pagers.py b/google/cloud/datastore_admin_v1/services/datastore_admin/pagers.py index 9a2d05ad..139e1983 100644 --- a/google/cloud/datastore_admin_v1/services/datastore_admin/pagers.py +++ b/google/cloud/datastore_admin_v1/services/datastore_admin/pagers.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_admin_v1/services/datastore_admin/transports/__init__.py b/google/cloud/datastore_admin_v1/services/datastore_admin/transports/__init__.py index e31fda23..d1930caa 100644 --- a/google/cloud/datastore_admin_v1/services/datastore_admin/transports/__init__.py +++ b/google/cloud/datastore_admin_v1/services/datastore_admin/transports/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_admin_v1/services/datastore_admin/transports/base.py b/google/cloud/datastore_admin_v1/services/datastore_admin/transports/base.py index bd0b94b4..83b6167e 100644 --- a/google/cloud/datastore_admin_v1/services/datastore_admin/transports/base.py +++ b/google/cloud/datastore_admin_v1/services/datastore_admin/transports/base.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc.py b/google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc.py index ce244dbc..24ca17c7 100644 --- a/google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc.py +++ b/google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -38,11 +38,8 @@ class DatastoreAdminGrpcTransport(DatastoreAdminTransport): Google Cloud Datastore Admin API The Datastore Admin API provides several admin services for Cloud Datastore. - ----------------------------------------------------------------------------- - ## Concepts - - Project, namespace, kind, and entity as defined in the Google - Cloud Datastore API. + Concepts: Project, namespace, kind, and entity as defined in the + Google Cloud Datastore API. Operation: An Operation represents work being performed in the background. @@ -50,49 +47,45 @@ class DatastoreAdminGrpcTransport(DatastoreAdminTransport): project. This is specified as a combination of kinds and namespaces (either or both of which may be all). - ----------------------------------------------------------------------------- - ## Services - - # Export/Import - - The Export/Import service provides the ability to copy all or a - subset of entities to/from Google Cloud Storage. - - Exported data may be imported into Cloud Datastore for any - Google Cloud Platform project. It is not restricted to the - export source project. It is possible to export from one project - and then import into another. - Exported data can also be loaded into Google BigQuery for - analysis. - Exports and imports are performed asynchronously. An Operation - resource is created for each export/import. The state (including - any errors encountered) of the export/import may be queried via - the Operation resource. - # Index - - The index service manages Cloud Datastore composite indexes. - Index creation and deletion are performed asynchronously. An - Operation resource is created for each such asynchronous - operation. The state of the operation (including any errors - encountered) may be queried via the Operation resource. - - # Operation - - The Operations collection provides a record of actions performed - for the specified project (including any operations in - progress). Operations are not created directly but through calls - on other collections or resources. - An operation that is not yet done may be cancelled. The request - to cancel is asynchronous and the operation may continue to run - for some time after the request to cancel is made. - - An operation that is done may be deleted so that it is no longer - listed as part of the Operation collection. - - ListOperations returns all pending operations, but not completed - operations. - Operations are created by service DatastoreAdmin, - but are accessed via service google.longrunning.Operations. + Export/Import Service: + + - The Export/Import service provides the ability to copy all or + a subset of entities to/from Google Cloud Storage. + - Exported data may be imported into Cloud Datastore for any + Google Cloud Platform project. It is not restricted to the + export source project. It is possible to export from one + project and then import into another. + - Exported data can also be loaded into Google BigQuery for + analysis. + - Exports and imports are performed asynchronously. An Operation + resource is created for each export/import. The state + (including any errors encountered) of the export/import may be + queried via the Operation resource. + + Index Service: + + - The index service manages Cloud Datastore composite indexes. + - Index creation and deletion are performed asynchronously. An + Operation resource is created for each such asynchronous + operation. The state of the operation (including any errors + encountered) may be queried via the Operation resource. + + Operation Service: + + - The Operations collection provides a record of actions + performed for the specified project (including any operations + in progress). Operations are not created directly but through + calls on other collections or resources. + - An operation that is not yet done may be cancelled. The + request to cancel is asynchronous and the operation may + continue to run for some time after the request to cancel is + made. + - An operation that is done may be deleted so that it is no + longer listed as part of the Operation collection. + - ListOperations returns all pending operations, but not + completed operations. + - Operations are created by service DatastoreAdmin, but are + accessed via service google.longrunning.Operations. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation diff --git a/google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc_asyncio.py b/google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc_asyncio.py index 1519b53f..9c37e074 100644 --- a/google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc_asyncio.py +++ b/google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc_asyncio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,11 +39,8 @@ class DatastoreAdminGrpcAsyncIOTransport(DatastoreAdminTransport): Google Cloud Datastore Admin API The Datastore Admin API provides several admin services for Cloud Datastore. - ----------------------------------------------------------------------------- - ## Concepts - - Project, namespace, kind, and entity as defined in the Google - Cloud Datastore API. + Concepts: Project, namespace, kind, and entity as defined in the + Google Cloud Datastore API. Operation: An Operation represents work being performed in the background. @@ -51,49 +48,45 @@ class DatastoreAdminGrpcAsyncIOTransport(DatastoreAdminTransport): project. This is specified as a combination of kinds and namespaces (either or both of which may be all). - ----------------------------------------------------------------------------- - ## Services - - # Export/Import - - The Export/Import service provides the ability to copy all or a - subset of entities to/from Google Cloud Storage. - - Exported data may be imported into Cloud Datastore for any - Google Cloud Platform project. It is not restricted to the - export source project. It is possible to export from one project - and then import into another. - Exported data can also be loaded into Google BigQuery for - analysis. - Exports and imports are performed asynchronously. An Operation - resource is created for each export/import. The state (including - any errors encountered) of the export/import may be queried via - the Operation resource. - # Index - - The index service manages Cloud Datastore composite indexes. - Index creation and deletion are performed asynchronously. An - Operation resource is created for each such asynchronous - operation. The state of the operation (including any errors - encountered) may be queried via the Operation resource. - - # Operation - - The Operations collection provides a record of actions performed - for the specified project (including any operations in - progress). Operations are not created directly but through calls - on other collections or resources. - An operation that is not yet done may be cancelled. The request - to cancel is asynchronous and the operation may continue to run - for some time after the request to cancel is made. - - An operation that is done may be deleted so that it is no longer - listed as part of the Operation collection. - - ListOperations returns all pending operations, but not completed - operations. - Operations are created by service DatastoreAdmin, - but are accessed via service google.longrunning.Operations. + Export/Import Service: + + - The Export/Import service provides the ability to copy all or + a subset of entities to/from Google Cloud Storage. + - Exported data may be imported into Cloud Datastore for any + Google Cloud Platform project. It is not restricted to the + export source project. It is possible to export from one + project and then import into another. + - Exported data can also be loaded into Google BigQuery for + analysis. + - Exports and imports are performed asynchronously. An Operation + resource is created for each export/import. The state + (including any errors encountered) of the export/import may be + queried via the Operation resource. + + Index Service: + + - The index service manages Cloud Datastore composite indexes. + - Index creation and deletion are performed asynchronously. An + Operation resource is created for each such asynchronous + operation. The state of the operation (including any errors + encountered) may be queried via the Operation resource. + + Operation Service: + + - The Operations collection provides a record of actions + performed for the specified project (including any operations + in progress). Operations are not created directly but through + calls on other collections or resources. + - An operation that is not yet done may be cancelled. The + request to cancel is asynchronous and the operation may + continue to run for some time after the request to cancel is + made. + - An operation that is done may be deleted so that it is no + longer listed as part of the Operation collection. + - ListOperations returns all pending operations, but not + completed operations. + - Operations are created by service DatastoreAdmin, but are + accessed via service google.longrunning.Operations. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation diff --git a/google/cloud/datastore_admin_v1/services/datastore_admin/transports/rest.py b/google/cloud/datastore_admin_v1/services/datastore_admin/transports/rest.py index 41aea811..ee7f7dc0 100644 --- a/google/cloud/datastore_admin_v1/services/datastore_admin/transports/rest.py +++ b/google/cloud/datastore_admin_v1/services/datastore_admin/transports/rest.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -365,11 +365,8 @@ class DatastoreAdminRestTransport(DatastoreAdminTransport): Google Cloud Datastore Admin API The Datastore Admin API provides several admin services for Cloud Datastore. - ----------------------------------------------------------------------------- - ## Concepts - - Project, namespace, kind, and entity as defined in the Google - Cloud Datastore API. + Concepts: Project, namespace, kind, and entity as defined in the + Google Cloud Datastore API. Operation: An Operation represents work being performed in the background. @@ -377,49 +374,45 @@ class DatastoreAdminRestTransport(DatastoreAdminTransport): project. This is specified as a combination of kinds and namespaces (either or both of which may be all). - ----------------------------------------------------------------------------- - ## Services - - # Export/Import - - The Export/Import service provides the ability to copy all or a - subset of entities to/from Google Cloud Storage. - - Exported data may be imported into Cloud Datastore for any - Google Cloud Platform project. It is not restricted to the - export source project. It is possible to export from one project - and then import into another. - Exported data can also be loaded into Google BigQuery for - analysis. - Exports and imports are performed asynchronously. An Operation - resource is created for each export/import. The state (including - any errors encountered) of the export/import may be queried via - the Operation resource. - # Index - - The index service manages Cloud Datastore composite indexes. - Index creation and deletion are performed asynchronously. An - Operation resource is created for each such asynchronous - operation. The state of the operation (including any errors - encountered) may be queried via the Operation resource. - - # Operation - - The Operations collection provides a record of actions performed - for the specified project (including any operations in - progress). Operations are not created directly but through calls - on other collections or resources. - An operation that is not yet done may be cancelled. The request - to cancel is asynchronous and the operation may continue to run - for some time after the request to cancel is made. - - An operation that is done may be deleted so that it is no longer - listed as part of the Operation collection. - - ListOperations returns all pending operations, but not completed - operations. - Operations are created by service DatastoreAdmin, - but are accessed via service google.longrunning.Operations. + Export/Import Service: + + - The Export/Import service provides the ability to copy all or + a subset of entities to/from Google Cloud Storage. + - Exported data may be imported into Cloud Datastore for any + Google Cloud Platform project. It is not restricted to the + export source project. It is possible to export from one + project and then import into another. + - Exported data can also be loaded into Google BigQuery for + analysis. + - Exports and imports are performed asynchronously. An Operation + resource is created for each export/import. The state + (including any errors encountered) of the export/import may be + queried via the Operation resource. + + Index Service: + + - The index service manages Cloud Datastore composite indexes. + - Index creation and deletion are performed asynchronously. An + Operation resource is created for each such asynchronous + operation. The state of the operation (including any errors + encountered) may be queried via the Operation resource. + + Operation Service: + + - The Operations collection provides a record of actions + performed for the specified project (including any operations + in progress). Operations are not created directly but through + calls on other collections or resources. + - An operation that is not yet done may be cancelled. The + request to cancel is asynchronous and the operation may + continue to run for some time after the request to cancel is + made. + - An operation that is done may be deleted so that it is no + longer listed as part of the Operation collection. + - ListOperations returns all pending operations, but not + completed operations. + - Operations are created by service DatastoreAdmin, but are + accessed via service google.longrunning.Operations. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation diff --git a/google/cloud/datastore_admin_v1/types/__init__.py b/google/cloud/datastore_admin_v1/types/__init__.py index f194f3cf..7ba786ca 100644 --- a/google/cloud/datastore_admin_v1/types/__init__.py +++ b/google/cloud/datastore_admin_v1/types/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_admin_v1/types/datastore_admin.py b/google/cloud/datastore_admin_v1/types/datastore_admin.py index 8b40de02..103d2563 100644 --- a/google/cloud/datastore_admin_v1/types/datastore_admin.py +++ b/google/cloud/datastore_admin_v1/types/datastore_admin.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_admin_v1/types/index.py b/google/cloud/datastore_admin_v1/types/index.py index 7966ab11..dfb44417 100644 --- a/google/cloud/datastore_admin_v1/types/index.py +++ b/google/cloud/datastore_admin_v1/types/index.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -43,8 +43,12 @@ class Index(proto.Message): Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED. properties (MutableSequence[google.cloud.datastore_admin_v1.types.Index.IndexedProperty]): - Required. An ordered sequence of property - names and their index attributes. + Required. An ordered sequence of property names and their + index attributes. + + Requires: + + - A maximum of 100 properties. state (google.cloud.datastore_admin_v1.types.Index.State): Output only. The state of the index. """ diff --git a/google/cloud/datastore_admin_v1/types/migration.py b/google/cloud/datastore_admin_v1/types/migration.py index 773c4238..12e93359 100644 --- a/google/cloud/datastore_admin_v1/types/migration.py +++ b/google/cloud/datastore_admin_v1/types/migration.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/__init__.py b/google/cloud/datastore_v1/__init__.py index 05159e68..b494905b 100644 --- a/google/cloud/datastore_v1/__init__.py +++ b/google/cloud/datastore_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/gapic_version.py b/google/cloud/datastore_v1/gapic_version.py index 8a60bdde..7a84223d 100644 --- a/google/cloud/datastore_v1/gapic_version.py +++ b/google/cloud/datastore_v1/gapic_version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.16.1" # {x-release-please-version} +__version__ = "2.17.0" # {x-release-please-version} diff --git a/google/cloud/datastore_v1/services/__init__.py b/google/cloud/datastore_v1/services/__init__.py index e8e1c384..89a37dc9 100644 --- a/google/cloud/datastore_v1/services/__init__.py +++ b/google/cloud/datastore_v1/services/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/services/datastore/__init__.py b/google/cloud/datastore_v1/services/datastore/__init__.py index 66d6560d..a93070e2 100644 --- a/google/cloud/datastore_v1/services/datastore/__init__.py +++ b/google/cloud/datastore_v1/services/datastore/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/services/datastore/async_client.py b/google/cloud/datastore_v1/services/datastore/async_client.py index 4e0bf535..1fcbf88f 100644 --- a/google/cloud/datastore_v1/services/datastore/async_client.py +++ b/google/cloud/datastore_v1/services/datastore/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/services/datastore/client.py b/google/cloud/datastore_v1/services/datastore/client.py index 480da31c..2bb647a6 100644 --- a/google/cloud/datastore_v1/services/datastore/client.py +++ b/google/cloud/datastore_v1/services/datastore/client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/services/datastore/transports/__init__.py b/google/cloud/datastore_v1/services/datastore/transports/__init__.py index 20136406..911cdd46 100644 --- a/google/cloud/datastore_v1/services/datastore/transports/__init__.py +++ b/google/cloud/datastore_v1/services/datastore/transports/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/services/datastore/transports/base.py b/google/cloud/datastore_v1/services/datastore/transports/base.py index 1e7a3c94..54cbd8c4 100644 --- a/google/cloud/datastore_v1/services/datastore/transports/base.py +++ b/google/cloud/datastore_v1/services/datastore/transports/base.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/services/datastore/transports/grpc.py b/google/cloud/datastore_v1/services/datastore/transports/grpc.py index 622f217c..27e57808 100644 --- a/google/cloud/datastore_v1/services/datastore/transports/grpc.py +++ b/google/cloud/datastore_v1/services/datastore/transports/grpc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/services/datastore/transports/grpc_asyncio.py b/google/cloud/datastore_v1/services/datastore/transports/grpc_asyncio.py index 08b1e5f2..4baefa38 100644 --- a/google/cloud/datastore_v1/services/datastore/transports/grpc_asyncio.py +++ b/google/cloud/datastore_v1/services/datastore/transports/grpc_asyncio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/services/datastore/transports/rest.py b/google/cloud/datastore_v1/services/datastore/transports/rest.py index e1bced6e..a5086d56 100644 --- a/google/cloud/datastore_v1/services/datastore/transports/rest.py +++ b/google/cloud/datastore_v1/services/datastore/transports/rest.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/types/__init__.py b/google/cloud/datastore_v1/types/__init__.py index ca7dae21..b6ff2a44 100644 --- a/google/cloud/datastore_v1/types/__init__.py +++ b/google/cloud/datastore_v1/types/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/types/aggregation_result.py b/google/cloud/datastore_v1/types/aggregation_result.py index cf8e8339..8bcb8371 100644 --- a/google/cloud/datastore_v1/types/aggregation_result.py +++ b/google/cloud/datastore_v1/types/aggregation_result.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastore_v1/types/datastore.py b/google/cloud/datastore_v1/types/datastore.py index 2512ad89..be824c96 100644 --- a/google/cloud/datastore_v1/types/datastore.py +++ b/google/cloud/datastore_v1/types/datastore.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -859,9 +859,12 @@ class ReadOptions(proto.Message): This field is a member of `oneof`_ ``consistency_type``. read_time (google.protobuf.timestamp_pb2.Timestamp): Reads entities as they were at the given - time. This may not be older than 270 seconds. - This value is only supported for Cloud Firestore - in Datastore mode. + time. This value is only supported for Cloud + Firestore in Datastore mode. + This must be a microsecond precision timestamp + within the past one hour, or if Point-in-Time + Recovery is enabled, can additionally be a whole + minute timestamp within the past 7 days. This field is a member of `oneof`_ ``consistency_type``. """ @@ -954,7 +957,10 @@ class ReadOnly(proto.Message): Attributes: read_time (google.protobuf.timestamp_pb2.Timestamp): Reads entities at the given time. - This may not be older than 60 seconds. + This must be a microsecond precision timestamp + within the past one hour, or if Point-in-Time + Recovery is enabled, can additionally be a whole + minute timestamp within the past 7 days. """ read_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/google/cloud/datastore_v1/types/entity.py b/google/cloud/datastore_v1/types/entity.py index 9fd055b7..dc3374e4 100644 --- a/google/cloud/datastore_v1/types/entity.py +++ b/google/cloud/datastore_v1/types/entity.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -265,8 +265,8 @@ class Value(proto.Message): entity_value (google.cloud.datastore_v1.types.Entity): An entity value. - May have no key. - - May have a key with an incomplete key path. - - May have a reserved/read-only key. + - May have a key with an incomplete key path. + - May have a reserved/read-only key. This field is a member of `oneof`_ ``value_type``. array_value (google.cloud.datastore_v1.types.ArrayValue): diff --git a/google/cloud/datastore_v1/types/query.py b/google/cloud/datastore_v1/types/query.py index afa05d19..67a1c58d 100644 --- a/google/cloud/datastore_v1/types/query.py +++ b/google/cloud/datastore_v1/types/query.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -246,12 +246,25 @@ class AggregationQuery(proto.Message): class Aggregation(proto.Message): r"""Defines an aggregation that produces a single result. + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: count (google.cloud.datastore_v1.types.AggregationQuery.Aggregation.Count): Count aggregator. + This field is a member of `oneof`_ ``operator``. + sum (google.cloud.datastore_v1.types.AggregationQuery.Aggregation.Sum): + Sum aggregator. + + This field is a member of `oneof`_ ``operator``. + avg (google.cloud.datastore_v1.types.AggregationQuery.Aggregation.Avg): + Average aggregator. + This field is a member of `oneof`_ ``operator``. alias (str): Optional. Optional name of the property to store the result @@ -328,12 +341,83 @@ class Count(proto.Message): message=wrappers_pb2.Int64Value, ) + class Sum(proto.Message): + r"""Sum of the values of the requested property. + + - Only numeric values will be aggregated. All non-numeric values + including ``NULL`` are skipped. + + - If the aggregated values contain ``NaN``, returns ``NaN``. + Infinity math follows IEEE-754 standards. + + - If the aggregated value set is empty, returns 0. + + - Returns a 64-bit integer if all aggregated numbers are integers + and the sum result does not overflow. Otherwise, the result is + returned as a double. Note that even if all the aggregated values + are integers, the result is returned as a double if it cannot fit + within a 64-bit signed integer. When this occurs, the returned + value will lose precision. + + - When underflow occurs, floating-point aggregation is + non-deterministic. This means that running the same query + repeatedly without any changes to the underlying values could + produce slightly different results each time. In those cases, + values should be stored as integers over floating-point numbers. + + Attributes: + property (google.cloud.datastore_v1.types.PropertyReference): + The property to aggregate on. + """ + + property: "PropertyReference" = proto.Field( + proto.MESSAGE, + number=1, + message="PropertyReference", + ) + + class Avg(proto.Message): + r"""Average of the values of the requested property. + + - Only numeric values will be aggregated. All non-numeric values + including ``NULL`` are skipped. + + - If the aggregated values contain ``NaN``, returns ``NaN``. + Infinity math follows IEEE-754 standards. + + - If the aggregated value set is empty, returns ``NULL``. + + - Always returns the result as a double. + + Attributes: + property (google.cloud.datastore_v1.types.PropertyReference): + The property to aggregate on. + """ + + property: "PropertyReference" = proto.Field( + proto.MESSAGE, + number=1, + message="PropertyReference", + ) + count: "AggregationQuery.Aggregation.Count" = proto.Field( proto.MESSAGE, number=1, oneof="operator", message="AggregationQuery.Aggregation.Count", ) + sum: "AggregationQuery.Aggregation.Sum" = proto.Field( + proto.MESSAGE, + number=2, + oneof="operator", + message="AggregationQuery.Aggregation.Sum", + ) + avg: "AggregationQuery.Aggregation.Avg" = proto.Field( + proto.MESSAGE, + number=3, + oneof="operator", + message="AggregationQuery.Aggregation.Avg", + ) alias: str = proto.Field( proto.STRING, number=7, @@ -565,9 +649,9 @@ class Operator(proto.Enum): Requires: - - That ``value`` is a non-empty ``ArrayValue`` with at most - 10 values. - - No other ``IN`` or ``NOT_IN`` is in the same query. + - That ``value`` is a non-empty ``ArrayValue``, subject to + disjunction limits. + - No ``NOT_IN`` is in the same query. NOT_EQUAL (9): The given ``property`` is not equal to the given ``value``. @@ -583,7 +667,8 @@ class Operator(proto.Enum): Requires: - That ``value`` is an entity key. - - No other ``HAS_ANCESTOR`` is in the same query. + - All evaluated disjunctions must have the same + ``HAS_ANCESTOR`` filter. NOT_IN (13): The value of the ``property`` is not in the given array. @@ -591,8 +676,8 @@ class Operator(proto.Enum): - That ``value`` is a non-empty ``ArrayValue`` with at most 10 values. - - No other ``IN``, ``NOT_IN``, ``NOT_EQUAL`` is in the same - query. + - No other ``OR``, ``IN``, ``NOT_IN``, ``NOT_EQUAL`` is in + the same query. - That ``field`` comes first in the ``order_by``. """ OPERATOR_UNSPECIFIED = 0 diff --git a/noxfile.py b/noxfile.py index c4ee430d..99df26d9 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2018 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import nox +FLAKE8_VERSION = "flake8==6.1.0" BLACK_VERSION = "black==22.3.0" ISORT_VERSION = "isort==5.10.1" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] @@ -83,7 +84,7 @@ def lint(session): Returns a failure if the linters find linting errors or sufficiently serious code quality issues. """ - session.install("flake8", BLACK_VERSION) + session.install(FLAKE8_VERSION, BLACK_VERSION) session.run( "black", "--check", @@ -429,6 +430,7 @@ def prerelease_deps(session): "python", "-c", "import google.protobuf; print(google.protobuf.__version__)" ) session.run("python", "-c", "import grpc; print(grpc.__version__)") + session.run("python", "-c", "import google.auth; print(google.auth.__version__)") session.run("py.test", "tests/unit") diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index fcddcf53..9c65e499 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-datastore==2.16.0 \ No newline at end of file +google-cloud-datastore==2.16.1 \ No newline at end of file diff --git a/samples/snippets/schedule-export/requirements.txt b/samples/snippets/schedule-export/requirements.txt index 4c89b8f0..4a4657a1 100644 --- a/samples/snippets/schedule-export/requirements.txt +++ b/samples/snippets/schedule-export/requirements.txt @@ -1 +1 @@ -google-cloud-datastore==2.16.0 +google-cloud-datastore==2.16.1 diff --git a/scripts/decrypt-secrets.sh b/scripts/decrypt-secrets.sh index 21f6d2a2..0018b421 100755 --- a/scripts/decrypt-secrets.sh +++ b/scripts/decrypt-secrets.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2023 Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/fixup_datastore_admin_v1_keywords.py b/scripts/fixup_datastore_admin_v1_keywords.py index 49b96026..44ae7ecb 100644 --- a/scripts/fixup_datastore_admin_v1_keywords.py +++ b/scripts/fixup_datastore_admin_v1_keywords.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/fixup_datastore_v1_keywords.py b/scripts/fixup_datastore_v1_keywords.py index 77b0527b..4a8be1c9 100644 --- a/scripts/fixup_datastore_v1_keywords.py +++ b/scripts/fixup_datastore_v1_keywords.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py index 91b59676..1acc1198 100644 --- a/scripts/readme-gen/readme_gen.py +++ b/scripts/readme-gen/readme_gen.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2016 Google Inc +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -33,17 +33,17 @@ autoescape=True, ) -README_TMPL = jinja_env.get_template('README.tmpl.rst') +README_TMPL = jinja_env.get_template("README.tmpl.rst") def get_help(file): - return subprocess.check_output(['python', file, '--help']).decode() + return subprocess.check_output(["python", file, "--help"]).decode() def main(): parser = argparse.ArgumentParser() - parser.add_argument('source') - parser.add_argument('--destination', default='README.rst') + parser.add_argument("source") + parser.add_argument("--destination", default="README.rst") args = parser.parse_args() @@ -51,9 +51,9 @@ def main(): root = os.path.dirname(source) destination = os.path.join(root, args.destination) - jinja_env.globals['get_help'] = get_help + jinja_env.globals["get_help"] = get_help - with io.open(source, 'r') as f: + with io.open(source, "r") as f: config = yaml.load(f) # This allows get_help to execute in the right directory. @@ -61,9 +61,9 @@ def main(): output = README_TMPL.render(config) - with io.open(destination, 'w') as f: + with io.open(destination, "w") as f: f.write(output) -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/setup.cfg b/setup.cfg index c3a2b39f..05235008 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/__init__.py b/tests/__init__.py index e8e1c384..89a37dc9 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index e8e1c384..89a37dc9 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/__init__.py b/tests/unit/gapic/__init__.py index e8e1c384..89a37dc9 100644 --- a/tests/unit/gapic/__init__.py +++ b/tests/unit/gapic/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/datastore_admin_v1/__init__.py b/tests/unit/gapic/datastore_admin_v1/__init__.py index e8e1c384..89a37dc9 100644 --- a/tests/unit/gapic/datastore_admin_v1/__init__.py +++ b/tests/unit/gapic/datastore_admin_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/datastore_admin_v1/test_datastore_admin.py b/tests/unit/gapic/datastore_admin_v1/test_datastore_admin.py index 47d3153e..557238a0 100644 --- a/tests/unit/gapic/datastore_admin_v1/test_datastore_admin.py +++ b/tests/unit/gapic/datastore_admin_v1/test_datastore_admin.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/datastore_v1/__init__.py b/tests/unit/gapic/datastore_v1/__init__.py index e8e1c384..89a37dc9 100644 --- a/tests/unit/gapic/datastore_v1/__init__.py +++ b/tests/unit/gapic/datastore_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/datastore_v1/test_datastore.py b/tests/unit/gapic/datastore_v1/test_datastore.py index 2a89f4e4..9d99308c 100644 --- a/tests/unit/gapic/datastore_v1/test_datastore.py +++ b/tests/unit/gapic/datastore_v1/test_datastore.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/test_aggregation.py b/tests/unit/test_aggregation.py index ebfa9a3f..fd72ad0a 100644 --- a/tests/unit/test_aggregation.py +++ b/tests/unit/test_aggregation.py @@ -420,7 +420,7 @@ def test__item_to_aggregation_result(): result = _item_to_aggregation_result(None, map_composite_mock) assert len(result) == 1 - assert type(result[0]) == AggregationResult + assert isinstance(result[0], AggregationResult) assert result[0].alias == "total" assert result[0].value == map_composite_mock.__getitem__().integer_value