diff --git a/.coveragerc b/.coveragerc index 3c36f3b..2800d3d 100644 --- a/.coveragerc +++ b/.coveragerc @@ -5,6 +5,7 @@ branch = True show_missing = True omit = google/cloud/tpu/__init__.py + google/cloud/tpu/gapic_version.py exclude_lines = # Re-enable the standard pragma pragma: NO COVER diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 889f77d..f0f3b24 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320 + digest: sha256:f946c75373c2b0040e8e318c5e85d0cf46bc6e61d0a01f3ef94d8de974ac6790 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d0972da..f2ada20 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.7.1" + ".": "1.7.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index aefc7f1..7798f14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.7.2](https://github.com/googleapis/python-tpu/compare/v1.7.1...v1.7.2) (2023-01-30) + + +### Bug Fixes + +* Proper http bindings for v2 API ([#209](https://github.com/googleapis/python-tpu/issues/209)) ([e549185](https://github.com/googleapis/python-tpu/commit/e549185be8c93233ece34290e56df72ad5f56d14)) + ## [1.7.1](https://github.com/googleapis/python-tpu/compare/v1.7.0...v1.7.1) (2023-01-20) diff --git a/google/cloud/tpu/gapic_version.py b/google/cloud/tpu/gapic_version.py index 84856f0..29c8d0a 100644 --- a/google/cloud/tpu/gapic_version.py +++ b/google/cloud/tpu/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.1" # {x-release-please-version} +__version__ = "1.7.2" # {x-release-please-version} diff --git a/google/cloud/tpu_v1/__init__.py b/google/cloud/tpu_v1/__init__.py index 4a7d36b..5814f25 100644 --- a/google/cloud/tpu_v1/__init__.py +++ b/google/cloud/tpu_v1/__init__.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from google.cloud.tpu import gapic_version as package_version +from google.cloud.tpu_v1 import gapic_version as package_version __version__ = package_version.__version__ diff --git a/google/cloud/tpu_v1/gapic_version.py b/google/cloud/tpu_v1/gapic_version.py index 84856f0..29c8d0a 100644 --- a/google/cloud/tpu_v1/gapic_version.py +++ b/google/cloud/tpu_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.1" # {x-release-please-version} +__version__ = "1.7.2" # {x-release-please-version} diff --git a/google/cloud/tpu_v2/__init__.py b/google/cloud/tpu_v2/__init__.py index 3eacb1e..eedd3b9 100644 --- a/google/cloud/tpu_v2/__init__.py +++ b/google/cloud/tpu_v2/__init__.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from google.cloud.tpu import gapic_version as package_version +from google.cloud.tpu_v2 import gapic_version as package_version __version__ = package_version.__version__ diff --git a/google/cloud/tpu_v2/gapic_version.py b/google/cloud/tpu_v2/gapic_version.py index 84856f0..29c8d0a 100644 --- a/google/cloud/tpu_v2/gapic_version.py +++ b/google/cloud/tpu_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.1" # {x-release-please-version} +__version__ = "1.7.2" # {x-release-please-version} diff --git a/google/cloud/tpu_v2/services/tpu/transports/rest.py b/google/cloud/tpu_v2/services/tpu/transports/rest.py index a72866e..fe45738 100644 --- a/google/cloud/tpu_v2/services/tpu/transports/rest.py +++ b/google/cloud/tpu_v2/services/tpu/transports/rest.py @@ -714,72 +714,24 @@ def operations_client(self) -> operations_v1.AbstractOperationsClient: if self._operations_client is None: http_options: Dict[str, List[Dict[str, str]]] = { "google.longrunning.Operations.CancelOperation": [ - { - "method": "post", - "uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel", - }, - { - "method": "post", - "uri": "/v1/{name=projects/*/locations/*/operations/*}:cancel", - }, - { - "method": "post", - "uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}:cancel", - }, { "method": "post", "uri": "/v2/{name=projects/*/locations/*/operations/*}:cancel", }, ], "google.longrunning.Operations.DeleteOperation": [ - { - "method": "delete", - "uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}", - }, - { - "method": "delete", - "uri": "/v1/{name=projects/*/locations/*/operations/*}", - }, - { - "method": "delete", - "uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}", - }, { "method": "delete", "uri": "/v2/{name=projects/*/locations/*/operations/*}", }, ], "google.longrunning.Operations.GetOperation": [ - { - "method": "get", - "uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}", - }, - { - "method": "get", - "uri": "/v1/{name=projects/*/locations/*/operations/*}", - }, - { - "method": "get", - "uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}", - }, { "method": "get", "uri": "/v2/{name=projects/*/locations/*/operations/*}", }, ], "google.longrunning.Operations.ListOperations": [ - { - "method": "get", - "uri": "/v1alpha1/{name=projects/*/locations/*}/operations", - }, - { - "method": "get", - "uri": "/v1/{name=projects/*/locations/*}/operations", - }, - { - "method": "get", - "uri": "/v2alpha1/{name=projects/*/locations/*}/operations", - }, { "method": "get", "uri": "/v2/{name=projects/*/locations/*}/operations", @@ -2173,18 +2125,6 @@ def __call__( """ http_options: List[Dict[str, str]] = [ - { - "method": "get", - "uri": "/v1alpha1/{name=projects/*/locations/*}", - }, - { - "method": "get", - "uri": "/v1/{name=projects/*/locations/*}", - }, - { - "method": "get", - "uri": "/v2alpha1/{name=projects/*/locations/*}", - }, { "method": "get", "uri": "/v2/{name=projects/*/locations/*}", @@ -2252,18 +2192,6 @@ def __call__( """ http_options: List[Dict[str, str]] = [ - { - "method": "get", - "uri": "/v1alpha1/{name=projects/*}/locations", - }, - { - "method": "get", - "uri": "/v1/{name=projects/*}/locations", - }, - { - "method": "get", - "uri": "/v2alpha1/{name=projects/*}/locations", - }, { "method": "get", "uri": "/v2/{name=projects/*}/locations", @@ -2328,18 +2256,6 @@ def __call__( """ http_options: List[Dict[str, str]] = [ - { - "method": "post", - "uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel", - }, - { - "method": "post", - "uri": "/v1/{name=projects/*/locations/*/operations/*}:cancel", - }, - { - "method": "post", - "uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}:cancel", - }, { "method": "post", "uri": "/v2/{name=projects/*/locations/*/operations/*}:cancel", @@ -2403,18 +2319,6 @@ def __call__( """ http_options: List[Dict[str, str]] = [ - { - "method": "delete", - "uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}", - }, - { - "method": "delete", - "uri": "/v1/{name=projects/*/locations/*/operations/*}", - }, - { - "method": "delete", - "uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}", - }, { "method": "delete", "uri": "/v2/{name=projects/*/locations/*/operations/*}", @@ -2481,18 +2385,6 @@ def __call__( """ http_options: List[Dict[str, str]] = [ - { - "method": "get", - "uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}", - }, - { - "method": "get", - "uri": "/v1/{name=projects/*/locations/*/operations/*}", - }, - { - "method": "get", - "uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}", - }, { "method": "get", "uri": "/v2/{name=projects/*/locations/*/operations/*}", @@ -2560,18 +2452,6 @@ def __call__( """ http_options: List[Dict[str, str]] = [ - { - "method": "get", - "uri": "/v1alpha1/{name=projects/*/locations/*}/operations", - }, - { - "method": "get", - "uri": "/v1/{name=projects/*/locations/*}/operations", - }, - { - "method": "get", - "uri": "/v2alpha1/{name=projects/*/locations/*}/operations", - }, { "method": "get", "uri": "/v2/{name=projects/*/locations/*}/operations", diff --git a/google/cloud/tpu_v2alpha1/__init__.py b/google/cloud/tpu_v2alpha1/__init__.py index b6b49a9..e791b28 100644 --- a/google/cloud/tpu_v2alpha1/__init__.py +++ b/google/cloud/tpu_v2alpha1/__init__.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from google.cloud.tpu import gapic_version as package_version +from google.cloud.tpu_v2alpha1 import gapic_version as package_version __version__ = package_version.__version__ diff --git a/google/cloud/tpu_v2alpha1/gapic_version.py b/google/cloud/tpu_v2alpha1/gapic_version.py index 84856f0..29c8d0a 100644 --- a/google/cloud/tpu_v2alpha1/gapic_version.py +++ b/google/cloud/tpu_v2alpha1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.1" # {x-release-please-version} +__version__ = "1.7.2" # {x-release-please-version} diff --git a/noxfile.py b/noxfile.py index e716318..95e58c5 100644 --- a/noxfile.py +++ b/noxfile.py @@ -189,9 +189,9 @@ def unit(session): def install_systemtest_dependencies(session, *constraints): # Use pre-release gRPC for system tests. - # Exclude version 1.49.0rc1 which has a known issue. - # See https://github.com/grpc/grpc/pull/30642 - session.install("--pre", "grpcio!=1.49.0rc1") + # Exclude version 1.52.0rc1 which has a known issue. + # See https://github.com/grpc/grpc/issues/32163 + session.install("--pre", "grpcio!=1.52.0rc1") session.install(*SYSTEM_TEST_STANDARD_DEPENDENCIES, *constraints) @@ -346,9 +346,7 @@ def prerelease_deps(session): unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES session.install(*unit_deps_all) system_deps_all = ( - SYSTEM_TEST_STANDARD_DEPENDENCIES - + SYSTEM_TEST_EXTERNAL_DEPENDENCIES - + SYSTEM_TEST_EXTRAS + SYSTEM_TEST_STANDARD_DEPENDENCIES + SYSTEM_TEST_EXTERNAL_DEPENDENCIES ) session.install(*system_deps_all) @@ -378,8 +376,8 @@ def prerelease_deps(session): # dependency of grpc "six", "googleapis-common-protos", - # Exclude version 1.49.0rc1 which has a known issue. See https://github.com/grpc/grpc/pull/30642 - "grpcio!=1.49.0rc1", + # Exclude version 1.52.0rc1 which has a known issue. See https://github.com/grpc/grpc/issues/32163 + "grpcio!=1.52.0rc1", "grpcio-status", "google-api-core", "proto-plus", diff --git a/samples/generated_samples/snippet_metadata_google.cloud.tpu.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.tpu.v1.json index 48abd06..22154dd 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.tpu.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.tpu.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-tpu", - "version": "1.7.1" + "version": "1.7.2" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2.json b/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2.json index 895ee16..324e98e 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-tpu", - "version": "1.7.1" + "version": "1.7.2" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2alpha1.json b/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2alpha1.json index f82df56..f5be978 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2alpha1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2alpha1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-tpu", - "version": "1.7.1" + "version": "1.7.2" }, "snippets": [ {