diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b8edda51..32b3c486 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:2e247c7bf5154df7f98cce087a20ca7605e236340c7d6d1a14447e5c06791bd6 + digest: sha256:9bc5fa3b62b091f60614c08a7fb4fd1d3e1678e326f34dd66ce1eefb5dc3267b +# created: 2023-05-25T14:56:16.294623272Z diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 66a2172a..3b8d7ee8 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -419,9 +419,9 @@ readme-renderer==37.3 \ --hash=sha256:cd653186dfc73055656f090f227f5cb22a046d7f71a841dfa305f55c9a513273 \ --hash=sha256:f67a16caedfa71eef48a31b39708637a6f4664c4394801a7b0d6432d13907343 # via twine -requests==2.28.1 \ - --hash=sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983 \ - --hash=sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349 +requests==2.31.0 \ + --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ + --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 # via # gcp-releasetool # google-api-core diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 82498f8e..6dd7150b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,4 +1,4 @@ { - ".": "3.4.1" + ".": "3.4.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 072d63b0..a60b7ce8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-vision/#history +## [3.4.2](https://github.com/googleapis/python-vision/compare/v3.4.1...v3.4.2) (2023-05-25) + + +### Bug Fixes + +* Remove workarounds in image_annotator ([#529](https://github.com/googleapis/python-vision/issues/529)) ([6692feb](https://github.com/googleapis/python-vision/commit/6692feb6c0f6e41a4da5ec4a9e9ac3ff7505e181)) + ## [3.4.1](https://github.com/googleapis/python-vision/compare/v3.4.0...v3.4.1) (2023-03-23) diff --git a/google/cloud/vision/gapic_version.py b/google/cloud/vision/gapic_version.py index 0807f93d..5db89125 100644 --- a/google/cloud/vision/gapic_version.py +++ b/google/cloud/vision/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.4.1" # {x-release-please-version} +__version__ = "3.4.2" # {x-release-please-version} diff --git a/google/cloud/vision_v1/gapic_version.py b/google/cloud/vision_v1/gapic_version.py index 0807f93d..5db89125 100644 --- a/google/cloud/vision_v1/gapic_version.py +++ b/google/cloud/vision_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.4.1" # {x-release-please-version} +__version__ = "3.4.2" # {x-release-please-version} diff --git a/google/cloud/vision_v1/services/image_annotator/client.py b/google/cloud/vision_v1/services/image_annotator/client.py index f4f30a06..f9d96c7c 100644 --- a/google/cloud/vision_v1/services/image_annotator/client.py +++ b/google/cloud/vision_v1/services/image_annotator/client.py @@ -551,9 +551,6 @@ def sample_batch_annotate_images(): # there are no flattened fields. if not isinstance(request, image_annotator.BatchAnnotateImagesRequest): request = image_annotator.BatchAnnotateImagesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AnnotateImageRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: @@ -658,9 +655,6 @@ def sample_batch_annotate_files(): # there are no flattened fields. if not isinstance(request, image_annotator.BatchAnnotateFilesRequest): request = image_annotator.BatchAnnotateFilesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AnnotateFileRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: @@ -786,9 +780,6 @@ def sample_async_batch_annotate_images(): # there are no flattened fields. if not isinstance(request, image_annotator.AsyncBatchAnnotateImagesRequest): request = image_annotator.AsyncBatchAnnotateImagesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AnnotateImageRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: @@ -914,9 +905,6 @@ def sample_async_batch_annotate_files(): # there are no flattened fields. if not isinstance(request, image_annotator.AsyncBatchAnnotateFilesRequest): request = image_annotator.AsyncBatchAnnotateFilesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AsyncAnnotateFileRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: diff --git a/google/cloud/vision_v1p1beta1/gapic_version.py b/google/cloud/vision_v1p1beta1/gapic_version.py index 0807f93d..5db89125 100644 --- a/google/cloud/vision_v1p1beta1/gapic_version.py +++ b/google/cloud/vision_v1p1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.4.1" # {x-release-please-version} +__version__ = "3.4.2" # {x-release-please-version} diff --git a/google/cloud/vision_v1p1beta1/services/image_annotator/client.py b/google/cloud/vision_v1p1beta1/services/image_annotator/client.py index 1b42e920..31d786e3 100644 --- a/google/cloud/vision_v1p1beta1/services/image_annotator/client.py +++ b/google/cloud/vision_v1p1beta1/services/image_annotator/client.py @@ -503,9 +503,6 @@ def sample_batch_annotate_images(): # there are no flattened fields. if not isinstance(request, image_annotator.BatchAnnotateImagesRequest): request = image_annotator.BatchAnnotateImagesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AnnotateImageRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: diff --git a/google/cloud/vision_v1p2beta1/gapic_version.py b/google/cloud/vision_v1p2beta1/gapic_version.py index 0807f93d..5db89125 100644 --- a/google/cloud/vision_v1p2beta1/gapic_version.py +++ b/google/cloud/vision_v1p2beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.4.1" # {x-release-please-version} +__version__ = "3.4.2" # {x-release-please-version} diff --git a/google/cloud/vision_v1p2beta1/services/image_annotator/client.py b/google/cloud/vision_v1p2beta1/services/image_annotator/client.py index efa9c4a6..665437e1 100644 --- a/google/cloud/vision_v1p2beta1/services/image_annotator/client.py +++ b/google/cloud/vision_v1p2beta1/services/image_annotator/client.py @@ -505,9 +505,6 @@ def sample_batch_annotate_images(): # there are no flattened fields. if not isinstance(request, image_annotator.BatchAnnotateImagesRequest): request = image_annotator.BatchAnnotateImagesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AnnotateImageRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: @@ -621,9 +618,6 @@ def sample_async_batch_annotate_files(): # there are no flattened fields. if not isinstance(request, image_annotator.AsyncBatchAnnotateFilesRequest): request = image_annotator.AsyncBatchAnnotateFilesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AsyncAnnotateFileRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: diff --git a/google/cloud/vision_v1p3beta1/gapic_version.py b/google/cloud/vision_v1p3beta1/gapic_version.py index 0807f93d..5db89125 100644 --- a/google/cloud/vision_v1p3beta1/gapic_version.py +++ b/google/cloud/vision_v1p3beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.4.1" # {x-release-please-version} +__version__ = "3.4.2" # {x-release-please-version} diff --git a/google/cloud/vision_v1p3beta1/services/image_annotator/client.py b/google/cloud/vision_v1p3beta1/services/image_annotator/client.py index b2ef2b1c..37f31d03 100644 --- a/google/cloud/vision_v1p3beta1/services/image_annotator/client.py +++ b/google/cloud/vision_v1p3beta1/services/image_annotator/client.py @@ -551,9 +551,6 @@ def sample_batch_annotate_images(): # there are no flattened fields. if not isinstance(request, image_annotator.BatchAnnotateImagesRequest): request = image_annotator.BatchAnnotateImagesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AnnotateImageRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: @@ -667,9 +664,6 @@ def sample_async_batch_annotate_files(): # there are no flattened fields. if not isinstance(request, image_annotator.AsyncBatchAnnotateFilesRequest): request = image_annotator.AsyncBatchAnnotateFilesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AsyncAnnotateFileRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: diff --git a/google/cloud/vision_v1p4beta1/gapic_version.py b/google/cloud/vision_v1p4beta1/gapic_version.py index 0807f93d..5db89125 100644 --- a/google/cloud/vision_v1p4beta1/gapic_version.py +++ b/google/cloud/vision_v1p4beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.4.1" # {x-release-please-version} +__version__ = "3.4.2" # {x-release-please-version} diff --git a/google/cloud/vision_v1p4beta1/services/image_annotator/client.py b/google/cloud/vision_v1p4beta1/services/image_annotator/client.py index 9d5a9e1e..b857ef9a 100644 --- a/google/cloud/vision_v1p4beta1/services/image_annotator/client.py +++ b/google/cloud/vision_v1p4beta1/services/image_annotator/client.py @@ -551,9 +551,6 @@ def sample_batch_annotate_images(): # there are no flattened fields. if not isinstance(request, image_annotator.BatchAnnotateImagesRequest): request = image_annotator.BatchAnnotateImagesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AnnotateImageRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: @@ -658,9 +655,6 @@ def sample_batch_annotate_files(): # there are no flattened fields. if not isinstance(request, image_annotator.BatchAnnotateFilesRequest): request = image_annotator.BatchAnnotateFilesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AnnotateFileRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: @@ -786,9 +780,6 @@ def sample_async_batch_annotate_images(): # there are no flattened fields. if not isinstance(request, image_annotator.AsyncBatchAnnotateImagesRequest): request = image_annotator.AsyncBatchAnnotateImagesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AnnotateImageRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: @@ -914,9 +905,6 @@ def sample_async_batch_annotate_files(): # there are no flattened fields. if not isinstance(request, image_annotator.AsyncBatchAnnotateFilesRequest): request = image_annotator.AsyncBatchAnnotateFilesRequest(request) - if requests is not None: - for i in range(len(requests)): - requests[i] = image_annotator.AsyncAnnotateFileRequest(requests[i]) # If we have keyword arguments corresponding to fields on the # request, apply these. if requests is not None: diff --git a/owlbot.py b/owlbot.py index 4aa84403..50e863d6 100644 --- a/owlbot.py +++ b/owlbot.py @@ -63,43 +63,6 @@ "__all__ = (", ) - # Temporary workaround due to bug https://github.com/googleapis/proto-plus-python/issues/135 - s.replace( - library / f"google/cloud/vision_{library.name}/services/image_annotator/client.py", - "request = image_annotator.BatchAnnotateImagesRequest\(request\)", - "request = image_annotator.BatchAnnotateImagesRequest(request)\n" - " if requests is not None:\n" - " for i in range(len(requests)):\n" - " requests[i] = image_annotator.AnnotateImageRequest(requests[i])" - ) - - s.replace( - library / f"google/cloud/vision_{library.name}/services/image_annotator/client.py", - "request = image_annotator.BatchAnnotateFilesRequest\(request\)", - "request = image_annotator.BatchAnnotateFilesRequest(request)\n" - " if requests is not None:\n" - " for i in range(len(requests)):\n" - " requests[i] = image_annotator.AnnotateFileRequest(requests[i])" - ) - - s.replace( - library / f"google/cloud/vision_{library.name}/services/image_annotator/client.py", - "request = image_annotator.AsyncBatchAnnotateImagesRequest\(request\)", - "request = image_annotator.AsyncBatchAnnotateImagesRequest(request)\n" - " if requests is not None:\n" - " for i in range(len(requests)):\n" - " requests[i] = image_annotator.AnnotateImageRequest(requests[i])" - ) - - s.replace( - library / f"google/cloud/vision_{library.name}/services/image_annotator/client.py", - "request = image_annotator.AsyncBatchAnnotateFilesRequest\(request\)", - "request = image_annotator.AsyncBatchAnnotateFilesRequest(request)\n" - " if requests is not None:\n" - " for i in range(len(requests)):\n" - " requests[i] = image_annotator.AsyncAnnotateFileRequest(requests[i])" - ) - s.move([library], excludes=["**/gapic_version.py", "README.rst", "docs/index.rst", "docs/vision_v1p1beta1", "google/cloud/vision/__init__.py"]) s.remove_staging_dirs() diff --git a/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json index e4f113a7..f1e40813 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "3.4.1" + "version": "3.4.2" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json index 47dc4134..e4feae7a 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "3.4.1" + "version": "3.4.2" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json index 5428660b..8d89b57a 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "3.4.1" + "version": "3.4.2" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json index 404722cf..4e699de1 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "3.4.1" + "version": "3.4.2" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json index 4a02eef9..4eabf5d6 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "3.4.1" + "version": "3.4.2" }, "snippets": [ {