diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 02a4dedc..98994f47 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:240b5bcc2bafd450912d2da2be15e62bc6de2cf839823ae4bf94d4f392b451dc -# created: 2023-06-03T21:25:37.968717478Z + digest: sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd +# created: 2023-06-28T17:03:33.371210701Z diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 6f858df9..717dc3ee 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -38,3 +38,12 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } + +# Store the packages we uploaded to PyPI. That way, we have a record of exactly +# what we published, which we can use to generate SBOMs and attestations. +action { + define_artifacts { + regex: "github/python-datastore/**/*.tar.gz" + strip_prefix: "github/python-datastore" + } +} diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7a15bc18..f122d158 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.16.0" + ".": "2.16.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 753aee34..907be34a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-datastore/#history +## [2.16.1](https://github.com/googleapis/python-datastore/compare/v2.16.0...v2.16.1) (2023-07-05) + + +### Bug Fixes + +* Add async context manager return types ([#452](https://github.com/googleapis/python-datastore/issues/452)) ([05f20dc](https://github.com/googleapis/python-datastore/commit/05f20dc54a100413ff7db2376ba353311584e4c8)) + ## [2.16.0](https://github.com/googleapis/python-datastore/compare/v2.15.2...v2.16.0) (2023-06-21) diff --git a/google/cloud/datastore/gapic_version.py b/google/cloud/datastore/gapic_version.py index f75debd2..da0da672 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.0" # {x-release-please-version} +__version__ = "2.16.1" # {x-release-please-version} diff --git a/google/cloud/datastore/version.py b/google/cloud/datastore/version.py index a93d72c2..61e0c0a8 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.0" +__version__ = "2.16.1" diff --git a/google/cloud/datastore_admin/gapic_version.py b/google/cloud/datastore_admin/gapic_version.py index a2303530..8edfaef7 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.0" # {x-release-please-version} +__version__ = "2.16.1" # {x-release-please-version} diff --git a/google/cloud/datastore_admin_v1/gapic_version.py b/google/cloud/datastore_admin_v1/gapic_version.py index e08f7bb1..8a60bdde 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.0" # {x-release-please-version} +__version__ = "2.16.1" # {x-release-please-version} 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 d940a0b0..818fb6bf 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 @@ -1272,7 +1272,7 @@ async def cancel_operation( metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "DatastoreAdminAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/datastore_v1/gapic_version.py b/google/cloud/datastore_v1/gapic_version.py index e08f7bb1..8a60bdde 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.0" # {x-release-please-version} +__version__ = "2.16.1" # {x-release-please-version} diff --git a/google/cloud/datastore_v1/services/datastore/async_client.py b/google/cloud/datastore_v1/services/datastore/async_client.py index 84c963d0..4e0bf535 100644 --- a/google/cloud/datastore_v1/services/datastore/async_client.py +++ b/google/cloud/datastore_v1/services/datastore/async_client.py @@ -1363,7 +1363,7 @@ async def cancel_operation( metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "DatastoreAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/datastore_v1/types/entity.py b/google/cloud/datastore_v1/types/entity.py index ed66e490..9fd055b7 100644 --- a/google/cloud/datastore_v1/types/entity.py +++ b/google/cloud/datastore_v1/types/entity.py @@ -38,11 +38,11 @@ class PartitionId(proto.Message): r"""A partition ID identifies a grouping of entities. The grouping is - always by project. database. and namespace, however the namespace ID may be - empty. Empty database ID refers to the default database. + always by project and namespace, however the namespace ID may be + empty. - A partition ID contains several dimensions: project ID, database ID, - and namespace ID. + A partition ID contains several dimensions: project ID and namespace + ID. Partition dimensions: @@ -54,7 +54,7 @@ class PartitionId(proto.Message): ID is forbidden in certain documented contexts. Foreign partition IDs (in which the project ID does not match the - context project ID) are discouraged. Reads and writes of foreign + context project ID ) are discouraged. Reads and writes of foreign partition IDs may fail if the project is not in an active state. Attributes: @@ -63,7 +63,7 @@ class PartitionId(proto.Message): belong. database_id (str): If not empty, the ID of the database to which - the entities belong. Empty corresponds to the default database. + the entities belong. namespace_id (str): If not empty, the ID of the namespace to which the entities belong. diff --git a/noxfile.py b/noxfile.py index 84ae80a4..c4ee430d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -334,10 +334,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) @@ -409,6 +408,7 @@ def prerelease_deps(session): "grpcio!=1.52.0rc1", "grpcio-status", "google-api-core", + "google-auth", "proto-plus", "google-cloud-testutils", # dependencies of google-cloud-testutils" @@ -421,7 +421,6 @@ def prerelease_deps(session): # Remaining dependencies other_deps = [ "requests", - "google-auth", ] session.install(*other_deps) diff --git a/samples/snippets/requirements-test.txt b/samples/snippets/requirements-test.txt index d700e917..f8841e8c 100644 --- a/samples/snippets/requirements-test.txt +++ b/samples/snippets/requirements-test.txt @@ -1,4 +1,4 @@ backoff===1.11.1; python_version < "3.7" backoff==2.2.1; python_version >= "3.7" -pytest==7.3.2 +pytest==7.4.0 flaky==3.7.0 diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index d0195bcd..fcddcf53 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-datastore==2.15.2 \ No newline at end of file +google-cloud-datastore==2.16.0 \ No newline at end of file diff --git a/samples/snippets/schedule-export/requirements-test.txt b/samples/snippets/schedule-export/requirements-test.txt index 28706beb..6950eb5a 100644 --- a/samples/snippets/schedule-export/requirements-test.txt +++ b/samples/snippets/schedule-export/requirements-test.txt @@ -1 +1 @@ -pytest==7.3.2 \ No newline at end of file +pytest==7.4.0 \ No newline at end of file diff --git a/samples/snippets/schedule-export/requirements.txt b/samples/snippets/schedule-export/requirements.txt index ff812cc4..4c89b8f0 100644 --- a/samples/snippets/schedule-export/requirements.txt +++ b/samples/snippets/schedule-export/requirements.txt @@ -1 +1 @@ -google-cloud-datastore==2.15.2 +google-cloud-datastore==2.16.0 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 8e9b37d0..47d3153e 100644 --- a/tests/unit/gapic/datastore_admin_v1/test_datastore_admin.py +++ b/tests/unit/gapic/datastore_admin_v1/test_datastore_admin.py @@ -2016,9 +2016,11 @@ async def test_list_indexes_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_indexes(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token