From c05ebb09e644ba11fac598d8385fbe859fc3bf3b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 29 Jul 2021 20:00:17 +0200 Subject: [PATCH 01/22] chore(deps): update dependency google-cloud-vision to v2.4.2 (#211) --- samples/snippets/crop_hints/requirements.txt | 2 +- samples/snippets/detect/requirements.txt | 2 +- samples/snippets/document_text/requirements.txt | 2 +- samples/snippets/face_detection/requirements.txt | 2 +- samples/snippets/product_search/requirements.txt | 2 +- samples/snippets/quickstart/requirements.txt | 2 +- samples/snippets/web/requirements.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/snippets/crop_hints/requirements.txt b/samples/snippets/crop_hints/requirements.txt index 225430b7..f8e054fa 100644 --- a/samples/snippets/crop_hints/requirements.txt +++ b/samples/snippets/crop_hints/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-vision==2.4.1 +google-cloud-vision==2.4.2 pillow==8.3.1 diff --git a/samples/snippets/detect/requirements.txt b/samples/snippets/detect/requirements.txt index 4260d73b..7eace52e 100644 --- a/samples/snippets/detect/requirements.txt +++ b/samples/snippets/detect/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-vision==2.4.1 +google-cloud-vision==2.4.2 google-cloud-storage==1.41.1 diff --git a/samples/snippets/document_text/requirements.txt b/samples/snippets/document_text/requirements.txt index 225430b7..f8e054fa 100644 --- a/samples/snippets/document_text/requirements.txt +++ b/samples/snippets/document_text/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-vision==2.4.1 +google-cloud-vision==2.4.2 pillow==8.3.1 diff --git a/samples/snippets/face_detection/requirements.txt b/samples/snippets/face_detection/requirements.txt index 225430b7..f8e054fa 100644 --- a/samples/snippets/face_detection/requirements.txt +++ b/samples/snippets/face_detection/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-vision==2.4.1 +google-cloud-vision==2.4.2 pillow==8.3.1 diff --git a/samples/snippets/product_search/requirements.txt b/samples/snippets/product_search/requirements.txt index 4260d73b..7eace52e 100644 --- a/samples/snippets/product_search/requirements.txt +++ b/samples/snippets/product_search/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-vision==2.4.1 +google-cloud-vision==2.4.2 google-cloud-storage==1.41.1 diff --git a/samples/snippets/quickstart/requirements.txt b/samples/snippets/quickstart/requirements.txt index 95ca9c47..794bfb61 100644 --- a/samples/snippets/quickstart/requirements.txt +++ b/samples/snippets/quickstart/requirements.txt @@ -1 +1 @@ -google-cloud-vision==2.4.1 +google-cloud-vision==2.4.2 diff --git a/samples/snippets/web/requirements.txt b/samples/snippets/web/requirements.txt index 95ca9c47..794bfb61 100644 --- a/samples/snippets/web/requirements.txt +++ b/samples/snippets/web/requirements.txt @@ -1 +1 @@ -google-cloud-vision==2.4.1 +google-cloud-vision==2.4.2 From fdef7469909ab320fa9e22dff907431b133ce97d Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Mon, 2 Aug 2021 19:20:24 -0600 Subject: [PATCH 02/22] chore: require CODEOWNER review and up to date branches (#212) These two lines bring the rules on this repo in line with the defaults: https://github.com/googleapis/repo-automation-bots/blob/63c858e539e1f4d9bb8ea66e12f9c0a0de5fef55/packages/sync-repo-settings/src/required-checks.json#L40-L50 --- .github/sync-repo-settings.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index af599353..0ddb512d 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -4,6 +4,8 @@ branchProtectionRules: # Identifies the protection rule pattern. Name of the branch to be protected. # Defaults to `master` - pattern: master + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: true requiredStatusCheckContexts: - 'Kokoro' - 'cla/google' From a0af71c11ab495165043a88f9ba7f5c6c356598d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 16:32:30 +0000 Subject: [PATCH 03/22] chore: fix INSTALL_LIBRARY_FROM_SOURCE in noxfile.py (#213) Source-Link: https://github.com/googleapis/synthtool/commit/6252f2cd074c38f37b44abe5e96d128733eb1b61 Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:50e35228649c47b6ca82aa0be3ff9eb2afce51c82b66c4a03fe4afeb5ff6c0fc --- .github/.OwlBot.lock.yaml | 2 +- samples/snippets/crop_hints/noxfile.py | 2 +- samples/snippets/detect/noxfile.py | 2 +- samples/snippets/document_text/noxfile.py | 2 +- samples/snippets/face_detection/noxfile.py | 2 +- samples/snippets/product_search/noxfile.py | 2 +- samples/snippets/quickstart/noxfile.py | 2 +- samples/snippets/web/noxfile.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9ee60f7e..649877dc 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:aea14a583128771ae8aefa364e1652f3c56070168ef31beb203534222d842b8b + digest: sha256:50e35228649c47b6ca82aa0be3ff9eb2afce51c82b66c4a03fe4afeb5ff6c0fc diff --git a/samples/snippets/crop_hints/noxfile.py b/samples/snippets/crop_hints/noxfile.py index 6a8ccdae..125bb619 100644 --- a/samples/snippets/crop_hints/noxfile.py +++ b/samples/snippets/crop_hints/noxfile.py @@ -96,7 +96,7 @@ def get_pytest_env_vars() -> Dict[str, str]: TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") # # Style Checks # diff --git a/samples/snippets/detect/noxfile.py b/samples/snippets/detect/noxfile.py index 6a8ccdae..125bb619 100644 --- a/samples/snippets/detect/noxfile.py +++ b/samples/snippets/detect/noxfile.py @@ -96,7 +96,7 @@ def get_pytest_env_vars() -> Dict[str, str]: TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") # # Style Checks # diff --git a/samples/snippets/document_text/noxfile.py b/samples/snippets/document_text/noxfile.py index 6a8ccdae..125bb619 100644 --- a/samples/snippets/document_text/noxfile.py +++ b/samples/snippets/document_text/noxfile.py @@ -96,7 +96,7 @@ def get_pytest_env_vars() -> Dict[str, str]: TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") # # Style Checks # diff --git a/samples/snippets/face_detection/noxfile.py b/samples/snippets/face_detection/noxfile.py index 6a8ccdae..125bb619 100644 --- a/samples/snippets/face_detection/noxfile.py +++ b/samples/snippets/face_detection/noxfile.py @@ -96,7 +96,7 @@ def get_pytest_env_vars() -> Dict[str, str]: TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") # # Style Checks # diff --git a/samples/snippets/product_search/noxfile.py b/samples/snippets/product_search/noxfile.py index 6a8ccdae..125bb619 100644 --- a/samples/snippets/product_search/noxfile.py +++ b/samples/snippets/product_search/noxfile.py @@ -96,7 +96,7 @@ def get_pytest_env_vars() -> Dict[str, str]: TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") # # Style Checks # diff --git a/samples/snippets/quickstart/noxfile.py b/samples/snippets/quickstart/noxfile.py index 6a8ccdae..125bb619 100644 --- a/samples/snippets/quickstart/noxfile.py +++ b/samples/snippets/quickstart/noxfile.py @@ -96,7 +96,7 @@ def get_pytest_env_vars() -> Dict[str, str]: TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") # # Style Checks # diff --git a/samples/snippets/web/noxfile.py b/samples/snippets/web/noxfile.py index 6a8ccdae..125bb619 100644 --- a/samples/snippets/web/noxfile.py +++ b/samples/snippets/web/noxfile.py @@ -96,7 +96,7 @@ def get_pytest_env_vars() -> Dict[str, str]: TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") # # Style Checks # From 32a003fec0bc6a9b3011f2fa83c6b381a6503c52 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 12 Aug 2021 15:10:13 +0000 Subject: [PATCH 04/22] chore(python): avoid `.nox` directories when building docs (#214) Source-Link: https://github.com/googleapis/synthtool/commit/7e1f6da50524b5d98eb67adbf6dd0805df54233d Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:a1a891041baa4ffbe1a809ac1b8b9b4a71887293c9101c88e8e255943c5aec2d --- .github/.OwlBot.lock.yaml | 2 +- docs/conf.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 649877dc..b771c37c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:50e35228649c47b6ca82aa0be3ff9eb2afce51c82b66c4a03fe4afeb5ff6c0fc + digest: sha256:a1a891041baa4ffbe1a809ac1b8b9b4a71887293c9101c88e8e255943c5aec2d diff --git a/docs/conf.py b/docs/conf.py index 6b1d9697..05ac9305 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -110,6 +110,7 @@ # directories to ignore when looking for source files. exclude_patterns = [ "_build", + "**/.nox/**/*", "samples/AUTHORING_GUIDE.md", "samples/CONTRIBUTING.md", "samples/snippets/README.rst", From becd1668709b1751b77c7f0464775823ebb8381a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Aug 2021 11:56:39 -0400 Subject: [PATCH 05/22] chore: drop mention of Python 2.7 from templates (#217) Source-Link: https://github.com/googleapis/synthtool/commit/facee4cc1ea096cd8bcc008bb85929daa7c414c0 Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- noxfile.py | 12 +++++++++--- samples/snippets/crop_hints/noxfile.py | 6 +++--- samples/snippets/detect/noxfile.py | 6 +++--- samples/snippets/document_text/noxfile.py | 6 +++--- samples/snippets/face_detection/noxfile.py | 6 +++--- samples/snippets/product_search/noxfile.py | 6 +++--- samples/snippets/quickstart/noxfile.py | 6 +++--- samples/snippets/web/noxfile.py | 6 +++--- scripts/readme-gen/templates/install_deps.tmpl.rst | 2 +- 10 files changed, 32 insertions(+), 26 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b771c37c..a9fcd07c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:a1a891041baa4ffbe1a809ac1b8b9b4a71887293c9101c88e8e255943c5aec2d + digest: sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 diff --git a/noxfile.py b/noxfile.py index 7d7db4ef..710271bb 100644 --- a/noxfile.py +++ b/noxfile.py @@ -84,9 +84,15 @@ def default(session): constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) - session.install("asyncmock", "pytest-asyncio", "-c", constraints_path) - - session.install("mock", "pytest", "pytest-cov", "-c", constraints_path) + session.install( + "mock", + "asyncmock", + "pytest", + "pytest-cov", + "pytest-asyncio", + "-c", + constraints_path, + ) session.install("-e", ".", "-c", constraints_path) diff --git a/samples/snippets/crop_hints/noxfile.py b/samples/snippets/crop_hints/noxfile.py index 125bb619..e73436a1 100644 --- a/samples/snippets/crop_hints/noxfile.py +++ b/samples/snippets/crop_hints/noxfile.py @@ -39,7 +39,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': ["2.7"], + 'ignored_versions': [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them @@ -88,8 +88,8 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. -# All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] +# All versions used to test samples. +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] diff --git a/samples/snippets/detect/noxfile.py b/samples/snippets/detect/noxfile.py index 125bb619..e73436a1 100644 --- a/samples/snippets/detect/noxfile.py +++ b/samples/snippets/detect/noxfile.py @@ -39,7 +39,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': ["2.7"], + 'ignored_versions': [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them @@ -88,8 +88,8 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. -# All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] +# All versions used to test samples. +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] diff --git a/samples/snippets/document_text/noxfile.py b/samples/snippets/document_text/noxfile.py index 125bb619..e73436a1 100644 --- a/samples/snippets/document_text/noxfile.py +++ b/samples/snippets/document_text/noxfile.py @@ -39,7 +39,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': ["2.7"], + 'ignored_versions': [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them @@ -88,8 +88,8 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. -# All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] +# All versions used to test samples. +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] diff --git a/samples/snippets/face_detection/noxfile.py b/samples/snippets/face_detection/noxfile.py index 125bb619..e73436a1 100644 --- a/samples/snippets/face_detection/noxfile.py +++ b/samples/snippets/face_detection/noxfile.py @@ -39,7 +39,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': ["2.7"], + 'ignored_versions': [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them @@ -88,8 +88,8 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. -# All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] +# All versions used to test samples. +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] diff --git a/samples/snippets/product_search/noxfile.py b/samples/snippets/product_search/noxfile.py index 125bb619..e73436a1 100644 --- a/samples/snippets/product_search/noxfile.py +++ b/samples/snippets/product_search/noxfile.py @@ -39,7 +39,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': ["2.7"], + 'ignored_versions': [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them @@ -88,8 +88,8 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. -# All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] +# All versions used to test samples. +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] diff --git a/samples/snippets/quickstart/noxfile.py b/samples/snippets/quickstart/noxfile.py index 125bb619..e73436a1 100644 --- a/samples/snippets/quickstart/noxfile.py +++ b/samples/snippets/quickstart/noxfile.py @@ -39,7 +39,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': ["2.7"], + 'ignored_versions': [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them @@ -88,8 +88,8 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. -# All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] +# All versions used to test samples. +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] diff --git a/samples/snippets/web/noxfile.py b/samples/snippets/web/noxfile.py index 125bb619..e73436a1 100644 --- a/samples/snippets/web/noxfile.py +++ b/samples/snippets/web/noxfile.py @@ -39,7 +39,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': ["2.7"], + 'ignored_versions': [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them @@ -88,8 +88,8 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. -# All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] +# All versions used to test samples. +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] diff --git a/scripts/readme-gen/templates/install_deps.tmpl.rst b/scripts/readme-gen/templates/install_deps.tmpl.rst index a0406dba..275d6498 100644 --- a/scripts/readme-gen/templates/install_deps.tmpl.rst +++ b/scripts/readme-gen/templates/install_deps.tmpl.rst @@ -12,7 +12,7 @@ Install Dependencies .. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup -#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. +#. Create a virtualenv. Samples are compatible with Python 3.6+. .. code-block:: bash From 75ab81ac75ed51498a9cfe6c0df0a18cc6acad75 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 13 Aug 2021 19:22:29 +0200 Subject: [PATCH 06/22] chore(deps): update dependency google-cloud-storage to v1.42.0 (#215) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-storage](https://togithub.com/googleapis/python-storage) | `==1.41.1` -> `==1.42.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.0/compatibility-slim/1.41.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.0/confidence-slim/1.41.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-storage ### [`v1.42.0`](https://togithub.com/googleapis/python-storage/blob/master/CHANGELOG.md#​1420-httpswwwgithubcomgoogleapispython-storagecomparev1411v1420-2021-08-05) [Compare Source](https://togithub.com/googleapis/python-storage/compare/v1.41.1...v1.42.0) ##### Features - add 'page_size' parameter to 'Bucket.list_blobs, list_buckets ([#​520](https://www.togithub.com/googleapis/python-storage/issues/520)) ([c5f4ad8](https://www.github.com/googleapis/python-storage/commit/c5f4ad8fddd1849a4229b0126c4c022bccb90128)) ##### Bug Fixes - **deps:** add explicit ranges for 'google-api-core' and 'google-auth' ([#​530](https://www.togithub.com/googleapis/python-storage/issues/530)) ([310f207](https://www.github.com/googleapis/python-storage/commit/310f207411da0382af310172344f19c644c14e6a)) - downloading no longer marks metadata fields as 'changed' ([#​523](https://www.togithub.com/googleapis/python-storage/issues/523)) ([160d1ec](https://www.github.com/googleapis/python-storage/commit/160d1ecb41f1f269b25cb68b2d2f7daf418bf01c)) - make 'requests.exceptions.ChunkedEncodingError retryable by default ([#​526](https://www.togithub.com/googleapis/python-storage/issues/526)) ([4abb403](https://www.github.com/googleapis/python-storage/commit/4abb40310eca7ec45afc4bc5e4dfafbe083e74d2)) ##### Documentation - update supported / removed Python versions in README ([#​519](https://www.togithub.com/googleapis/python-storage/issues/519)) ([1f1b138](https://www.github.com/googleapis/python-storage/commit/1f1b138865fb171535ee0cf768aff1987ed58914)) ##### [1.41.1](https://www.github.com/googleapis/python-storage/compare/v1.41.0...v1.41.1) (2021-07-20) ##### Bug Fixes - **deps:** pin `{api,cloud}-core`, `auth` to allow 2.x versions on Python 3 ([#​512](https://www.togithub.com/googleapis/python-storage/issues/512)) ([4d7500e](https://www.github.com/googleapis/python-storage/commit/4d7500e39c51efd817b8363b69c88be040f3edb8)) - remove trailing commas from error message constants ([#​505](https://www.togithub.com/googleapis/python-storage/issues/505)) ([d4a86ce](https://www.github.com/googleapis/python-storage/commit/d4a86ceb7a7c5e00ba7bae37c7078d52478040ff)), closes [#​501](https://www.togithub.com/googleapis/python-storage/issues/501) ##### Documentation - replace usage of deprecated function `download_as_string` in docs ([#​508](https://www.togithub.com/googleapis/python-storage/issues/508)) ([8dfa4d4](https://www.github.com/googleapis/python-storage/commit/8dfa4d429dce94b671dc3e3755e52ab82733f61a))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-vision). --- samples/snippets/detect/requirements.txt | 2 +- samples/snippets/product_search/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/snippets/detect/requirements.txt b/samples/snippets/detect/requirements.txt index 7eace52e..9e8f5cd5 100644 --- a/samples/snippets/detect/requirements.txt +++ b/samples/snippets/detect/requirements.txt @@ -1,2 +1,2 @@ google-cloud-vision==2.4.2 -google-cloud-storage==1.41.1 +google-cloud-storage==1.42.0 diff --git a/samples/snippets/product_search/requirements.txt b/samples/snippets/product_search/requirements.txt index 7eace52e..9e8f5cd5 100644 --- a/samples/snippets/product_search/requirements.txt +++ b/samples/snippets/product_search/requirements.txt @@ -1,2 +1,2 @@ google-cloud-vision==2.4.2 -google-cloud-storage==1.41.1 +google-cloud-storage==1.42.0 From 113fe259bcc64e029e54d759ad524adad4ed105c Mon Sep 17 00:00:00 2001 From: Peter Lamut Date: Mon, 30 Aug 2021 16:41:16 +0200 Subject: [PATCH 07/22] chore: migrate default branch from master to main (#220) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: migrate default branch from master to main * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .github/sync-repo-settings.yaml | 8 +++--- .kokoro/build.sh | 2 +- .kokoro/test-samples-impl.sh | 2 +- CONTRIBUTING.rst | 12 ++++----- docs/conf.py | 16 ++++------- owlbot.py | 47 +++++++++++++++++++++++++++++++++ 6 files changed, 64 insertions(+), 23 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 0ddb512d..3e98ae70 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -1,9 +1,9 @@ -# https://github.com/googleapis/repo-automation-bots/tree/master/packages/sync-repo-settings -# Rules for master branch protection +# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings +# Rules for main branch protection branchProtectionRules: # Identifies the protection rule pattern. Name of the branch to be protected. -# Defaults to `master` -- pattern: master +# Defaults to `main` +- pattern: main requiresCodeOwnerReviews: true requiresStrictStatusChecks: true requiredStatusCheckContexts: diff --git a/.kokoro/build.sh b/.kokoro/build.sh index ca2d1d18..e52a01da 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -41,7 +41,7 @@ python3 -m pip install --upgrade --quiet nox python3 -m nox --version # If this is a continuous build, send the test log to the FlakyBot. -# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. +# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then cleanup() { chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/.kokoro/test-samples-impl.sh b/.kokoro/test-samples-impl.sh index 311a8d54..8a324c9c 100755 --- a/.kokoro/test-samples-impl.sh +++ b/.kokoro/test-samples-impl.sh @@ -80,7 +80,7 @@ for file in samples/**/requirements.txt; do EXIT=$? # If this is a periodic build, send the test log to the FlakyBot. - # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. + # See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index aded9b82..96acc5dd 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -50,9 +50,9 @@ You'll have to create a development environment using a Git checkout: # Configure remotes such that you can pull changes from the googleapis/python-vision # repository into your local repository. $ git remote add upstream git@github.com:googleapis/python-vision.git - # fetch and merge changes from upstream into master + # fetch and merge changes from upstream into main $ git fetch upstream - $ git merge upstream/master + $ git merge upstream/main Now your local repo is set up such that you will push changes to your GitHub repo, from which you can submit a pull request. @@ -110,12 +110,12 @@ Coding Style variables:: export GOOGLE_CLOUD_TESTING_REMOTE="upstream" - export GOOGLE_CLOUD_TESTING_BRANCH="master" + export GOOGLE_CLOUD_TESTING_BRANCH="main" By doing this, you are specifying the location of the most up-to-date version of ``python-vision``. The the suggested remote name ``upstream`` should point to the official ``googleapis`` checkout and the - the branch should be the main branch on that remote (``master``). + the branch should be the main branch on that remote (``main``). - This repository contains configuration for the `pre-commit `__ tool, which automates checking @@ -209,7 +209,7 @@ The `description on PyPI`_ for the project comes directly from the ``README``. Due to the reStructuredText (``rst``) parser used by PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst`` instead of -``https://github.com/googleapis/python-vision/blob/master/CONTRIBUTING.rst``) +``https://github.com/googleapis/python-vision/blob/main/CONTRIBUTING.rst``) may cause problems creating links or rendering the description. .. _description on PyPI: https://pypi.org/project/google-cloud-vision @@ -234,7 +234,7 @@ We support: Supported versions can be found in our ``noxfile.py`` `config`_. -.. _config: https://github.com/googleapis/python-vision/blob/master/noxfile.py +.. _config: https://github.com/googleapis/python-vision/blob/main/noxfile.py We also explicitly decided to support Python 3 beginning with version 3.6. diff --git a/docs/conf.py b/docs/conf.py index 05ac9305..107afc35 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -76,8 +76,8 @@ # The encoding of source files. # source_encoding = 'utf-8-sig' -# The master toctree document. -master_doc = "index" +# The root toctree document. +root_doc = "index" # General information about the project. project = "google-cloud-vision" @@ -280,7 +280,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ ( - master_doc, + root_doc, "google-cloud-vision.tex", "google-cloud-vision Documentation", author, @@ -314,13 +314,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ( - master_doc, - "google-cloud-vision", - "google-cloud-vision Documentation", - [author], - 1, - ) + (root_doc, "google-cloud-vision", "google-cloud-vision Documentation", [author], 1,) ] # If true, show URL addresses after external links. @@ -334,7 +328,7 @@ # dir menu entry, description, category) texinfo_documents = [ ( - master_doc, + root_doc, "google-cloud-vision", "google-cloud-vision Documentation", author, diff --git a/owlbot.py b/owlbot.py index 52c433a4..e5b230be 100644 --- a/owlbot.py +++ b/owlbot.py @@ -122,4 +122,51 @@ # TODO(busunkim): Use latest sphinx after microgenerator transition s.replace("noxfile.py", """['"]sphinx==4.0.1['"]""", '"sphinx<3.0.0"') +# Remove the replacements below once +# https://github.com/googleapis/synthtool/pull/1188 is merged + +# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files +s.replace( + ".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main" +) + +# Customize CONTRIBUTING.rst to replace master with main +s.replace( + "CONTRIBUTING.rst", + "fetch and merge changes from upstream into master", + "fetch and merge changes from upstream into main", +) + +s.replace( + "CONTRIBUTING.rst", + "git merge upstream/master", + "git merge upstream/main", +) + +s.replace( + "CONTRIBUTING.rst", + """export GOOGLE_CLOUD_TESTING_BRANCH=\"master\"""", + """export GOOGLE_CLOUD_TESTING_BRANCH=\"main\"""", +) + +s.replace( + "CONTRIBUTING.rst", + "remote \(``master``\)", + "remote (``main``)", +) + +s.replace( + "CONTRIBUTING.rst", + "blob/master/CONTRIBUTING.rst", + "blob/main/CONTRIBUTING.rst", +) + +s.replace( + "CONTRIBUTING.rst", + "blob/master/noxfile.py", + "blob/main/noxfile.py", +) + +s.replace("docs/conf.py", "master", "root") + s.shell.run(["nox", "-s", "blacken"], hide_output=False) From d5157984963ee457387f55a8974d4fac30bdfb14 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 00:14:09 +0000 Subject: [PATCH 08/22] chore(python): disable dependency dashboard (#221) --- .github/.OwlBot.lock.yaml | 2 +- renovate.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a9fcd07c..b75186cf 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 + digest: sha256:d6761eec279244e57fe9d21f8343381a01d3632c034811a72f68b83119e58c69 diff --git a/renovate.json b/renovate.json index c0489556..9fa8816f 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,8 @@ { "extends": [ - "config:base", ":preserveSemverRanges" + "config:base", + ":preserveSemverRanges", + ":disableDependencyDashboard" ], "ignorePaths": [".pre-commit-config.yaml"], "pip_requirements": { From 7013492580367c6210d1a85fa429b10e690d435f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 31 Aug 2021 17:02:02 +0200 Subject: [PATCH 09/22] chore(deps): update dependency pytest to v6.2.5 (#222) Co-authored-by: Anthonios Partheniou --- samples/snippets/crop_hints/requirements-test.txt | 2 +- samples/snippets/detect/requirements-test.txt | 2 +- samples/snippets/document_text/requirements-test.txt | 2 +- samples/snippets/face_detection/requirements-test.txt | 2 +- samples/snippets/product_search/requirements-test.txt | 2 +- samples/snippets/quickstart/requirements-test.txt | 2 +- samples/snippets/web/requirements-test.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/snippets/crop_hints/requirements-test.txt b/samples/snippets/crop_hints/requirements-test.txt index 95ea1e6a..92709451 100644 --- a/samples/snippets/crop_hints/requirements-test.txt +++ b/samples/snippets/crop_hints/requirements-test.txt @@ -1 +1 @@ -pytest==6.2.4 +pytest==6.2.5 diff --git a/samples/snippets/detect/requirements-test.txt b/samples/snippets/detect/requirements-test.txt index f5d9e108..29fa8f9f 100644 --- a/samples/snippets/detect/requirements-test.txt +++ b/samples/snippets/detect/requirements-test.txt @@ -1,3 +1,3 @@ backoff==1.11.1 -pytest==6.2.4 +pytest==6.2.5 flaky==3.7.0 diff --git a/samples/snippets/document_text/requirements-test.txt b/samples/snippets/document_text/requirements-test.txt index 95ea1e6a..92709451 100644 --- a/samples/snippets/document_text/requirements-test.txt +++ b/samples/snippets/document_text/requirements-test.txt @@ -1 +1 @@ -pytest==6.2.4 +pytest==6.2.5 diff --git a/samples/snippets/face_detection/requirements-test.txt b/samples/snippets/face_detection/requirements-test.txt index 95ea1e6a..92709451 100644 --- a/samples/snippets/face_detection/requirements-test.txt +++ b/samples/snippets/face_detection/requirements-test.txt @@ -1 +1 @@ -pytest==6.2.4 +pytest==6.2.5 diff --git a/samples/snippets/product_search/requirements-test.txt b/samples/snippets/product_search/requirements-test.txt index eb03b265..627baf98 100644 --- a/samples/snippets/product_search/requirements-test.txt +++ b/samples/snippets/product_search/requirements-test.txt @@ -1,2 +1,2 @@ -pytest==6.2.4 +pytest==6.2.5 flaky==3.7.0 \ No newline at end of file diff --git a/samples/snippets/quickstart/requirements-test.txt b/samples/snippets/quickstart/requirements-test.txt index 95ea1e6a..92709451 100644 --- a/samples/snippets/quickstart/requirements-test.txt +++ b/samples/snippets/quickstart/requirements-test.txt @@ -1 +1 @@ -pytest==6.2.4 +pytest==6.2.5 diff --git a/samples/snippets/web/requirements-test.txt b/samples/snippets/web/requirements-test.txt index 6efe8ab4..4b863b85 100644 --- a/samples/snippets/web/requirements-test.txt +++ b/samples/snippets/web/requirements-test.txt @@ -1,2 +1,2 @@ flaky==3.7.0 -pytest==6.2.4 +pytest==6.2.5 From 5a8dd1759d095d2cd8c3d96683cc0fc0d0f6440e Mon Sep 17 00:00:00 2001 From: Alejandro Leal Date: Wed, 1 Sep 2021 07:58:26 -0400 Subject: [PATCH 10/22] chore: fix typo (#223) Fixing spelling --- UPGRADING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING.md b/UPGRADING.md index c3c1cd93..8e313d5a 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -151,7 +151,7 @@ request = vision_v1.GetProductSetRequest(name="name") ## Location Path Helper Method -Loation path helper method has been removed. Please construct +Location path helper method has been removed. Please construct the path manually. ```py From 422edbcd8aadef19fb00611ac9b66ee3ccd039ac Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 16:28:44 +0000 Subject: [PATCH 11/22] chore(python): group renovate prs (#224) --- .github/.OwlBot.lock.yaml | 2 +- renovate.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b75186cf..ef3cb34f 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:d6761eec279244e57fe9d21f8343381a01d3632c034811a72f68b83119e58c69 + digest: sha256:1456ea2b3b523ccff5e13030acef56d1de28f21249c62aa0f196265880338fa7 diff --git a/renovate.json b/renovate.json index 9fa8816f..c21036d3 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,7 @@ { "extends": [ "config:base", + "group:all", ":preserveSemverRanges", ":disableDependencyDashboard" ], From 579f9d654ca1a8855790f7307ea2a2b82030892b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 18:08:36 +0000 Subject: [PATCH 12/22] chore(python): rename default branch to main (#225) --- .github/.OwlBot.lock.yaml | 2 +- CONTRIBUTING.rst | 6 ++--- owlbot.py | 47 --------------------------------------- 3 files changed, 4 insertions(+), 51 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index ef3cb34f..c07f148f 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:1456ea2b3b523ccff5e13030acef56d1de28f21249c62aa0f196265880338fa7 + digest: sha256:0ffe3bdd6c7159692df5f7744da74e5ef19966288a6bf76023e8e04e0c424d7d diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 96acc5dd..8af446ff 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -113,9 +113,9 @@ Coding Style export GOOGLE_CLOUD_TESTING_BRANCH="main" By doing this, you are specifying the location of the most up-to-date - version of ``python-vision``. The the suggested remote name ``upstream`` - should point to the official ``googleapis`` checkout and the - the branch should be the main branch on that remote (``main``). + version of ``python-vision``. The + remote name ``upstream`` should point to the official ``googleapis`` + checkout and the branch should be the default branch on that remote (``main``). - This repository contains configuration for the `pre-commit `__ tool, which automates checking diff --git a/owlbot.py b/owlbot.py index e5b230be..52c433a4 100644 --- a/owlbot.py +++ b/owlbot.py @@ -122,51 +122,4 @@ # TODO(busunkim): Use latest sphinx after microgenerator transition s.replace("noxfile.py", """['"]sphinx==4.0.1['"]""", '"sphinx<3.0.0"') -# Remove the replacements below once -# https://github.com/googleapis/synthtool/pull/1188 is merged - -# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files -s.replace( - ".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main" -) - -# Customize CONTRIBUTING.rst to replace master with main -s.replace( - "CONTRIBUTING.rst", - "fetch and merge changes from upstream into master", - "fetch and merge changes from upstream into main", -) - -s.replace( - "CONTRIBUTING.rst", - "git merge upstream/master", - "git merge upstream/main", -) - -s.replace( - "CONTRIBUTING.rst", - """export GOOGLE_CLOUD_TESTING_BRANCH=\"master\"""", - """export GOOGLE_CLOUD_TESTING_BRANCH=\"main\"""", -) - -s.replace( - "CONTRIBUTING.rst", - "remote \(``master``\)", - "remote (``main``)", -) - -s.replace( - "CONTRIBUTING.rst", - "blob/master/CONTRIBUTING.rst", - "blob/main/CONTRIBUTING.rst", -) - -s.replace( - "CONTRIBUTING.rst", - "blob/master/noxfile.py", - "blob/main/noxfile.py", -) - -s.replace("docs/conf.py", "master", "root") - s.shell.run(["nox", "-s", "blacken"], hide_output=False) From 1cac6e2d31ec9003ed09a81fe5ec746ac601e8ce Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Tue, 7 Sep 2021 12:03:08 -0600 Subject: [PATCH 13/22] chore: reference main branch of google-cloud-python (#227) --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 524e0f13..ac3af5a7 100644 --- a/README.rst +++ b/README.rst @@ -18,7 +18,7 @@ Storage. - `Product Documentation`_ .. |GA| image:: https://img.shields.io/badge/support-GA-gold.svg - :target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#general-availability + :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-vision.svg :target: https://pypi.org/project/google-cloud-vision/ .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-vision.svg From 41302742e1c6272cc1d53a4519920c02e56ba63f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Sep 2021 09:00:20 -0600 Subject: [PATCH 14/22] build(deps): bump pillow in /samples/snippets/crop_hints (#228) Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.3.1 to 8.3.2. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/8.3.1...8.3.2) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/snippets/crop_hints/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/crop_hints/requirements.txt b/samples/snippets/crop_hints/requirements.txt index f8e054fa..465cb09b 100644 --- a/samples/snippets/crop_hints/requirements.txt +++ b/samples/snippets/crop_hints/requirements.txt @@ -1,2 +1,2 @@ google-cloud-vision==2.4.2 -pillow==8.3.1 +pillow==8.3.2 From 09e0ce507ba6773c6ee19401238c1e85a0bb7af5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Sep 2021 16:56:26 +0200 Subject: [PATCH 15/22] chore(deps): update dependency google-cloud-storage to v1.42.1 (#229) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-storage](https://togithub.com/googleapis/python-storage) | `==1.42.0` -> `==1.42.1` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.1/compatibility-slim/1.42.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.1/confidence-slim/1.42.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-storage ### [`v1.42.1`](https://togithub.com/googleapis/python-storage/blob/master/CHANGELOG.md#​1421-httpswwwgithubcomgoogleapispython-storagecomparev1420v1421-2021-09-07) [Compare Source](https://togithub.com/googleapis/python-storage/compare/v1.42.0...v1.42.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-vision). --- samples/snippets/detect/requirements.txt | 2 +- samples/snippets/product_search/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/snippets/detect/requirements.txt b/samples/snippets/detect/requirements.txt index 9e8f5cd5..f43034c3 100644 --- a/samples/snippets/detect/requirements.txt +++ b/samples/snippets/detect/requirements.txt @@ -1,2 +1,2 @@ google-cloud-vision==2.4.2 -google-cloud-storage==1.42.0 +google-cloud-storage==1.42.1 diff --git a/samples/snippets/product_search/requirements.txt b/samples/snippets/product_search/requirements.txt index 9e8f5cd5..f43034c3 100644 --- a/samples/snippets/product_search/requirements.txt +++ b/samples/snippets/product_search/requirements.txt @@ -1,2 +1,2 @@ google-cloud-vision==2.4.2 -google-cloud-storage==1.42.0 +google-cloud-storage==1.42.1 From 2ffc58f06a4198a2174ecf74a892cd0057b97931 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Sep 2021 16:43:30 +0200 Subject: [PATCH 16/22] chore(deps): update dependency pillow to v8.3.2 (#230) --- samples/snippets/document_text/requirements.txt | 2 +- samples/snippets/face_detection/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/snippets/document_text/requirements.txt b/samples/snippets/document_text/requirements.txt index f8e054fa..465cb09b 100644 --- a/samples/snippets/document_text/requirements.txt +++ b/samples/snippets/document_text/requirements.txt @@ -1,2 +1,2 @@ google-cloud-vision==2.4.2 -pillow==8.3.1 +pillow==8.3.2 diff --git a/samples/snippets/face_detection/requirements.txt b/samples/snippets/face_detection/requirements.txt index f8e054fa..465cb09b 100644 --- a/samples/snippets/face_detection/requirements.txt +++ b/samples/snippets/face_detection/requirements.txt @@ -1,2 +1,2 @@ google-cloud-vision==2.4.2 -pillow==8.3.1 +pillow==8.3.2 From 3ce9b29ac4c0ad25d7f24d7260fb0acf63eac04d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 17 Sep 2021 00:44:12 +0200 Subject: [PATCH 17/22] chore(deps): update dependency google-cloud-storage to v1.42.2 (#232) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-storage](https://togithub.com/googleapis/python-storage) | `==1.42.1` -> `==1.42.2` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.2/compatibility-slim/1.42.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.42.2/confidence-slim/1.42.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-storage ### [`v1.42.2`](https://togithub.com/googleapis/python-storage/blob/master/CHANGELOG.md#​1422-httpswwwgithubcomgoogleapispython-storagecomparev1421v1422-2021-09-16) [Compare Source](https://togithub.com/googleapis/python-storage/compare/v1.42.1...v1.42.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-vision). --- samples/snippets/detect/requirements.txt | 2 +- samples/snippets/product_search/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/snippets/detect/requirements.txt b/samples/snippets/detect/requirements.txt index f43034c3..aaa62d77 100644 --- a/samples/snippets/detect/requirements.txt +++ b/samples/snippets/detect/requirements.txt @@ -1,2 +1,2 @@ google-cloud-vision==2.4.2 -google-cloud-storage==1.42.1 +google-cloud-storage==1.42.2 diff --git a/samples/snippets/product_search/requirements.txt b/samples/snippets/product_search/requirements.txt index f43034c3..aaa62d77 100644 --- a/samples/snippets/product_search/requirements.txt +++ b/samples/snippets/product_search/requirements.txt @@ -1,2 +1,2 @@ google-cloud-vision==2.4.2 -google-cloud-storage==1.42.1 +google-cloud-storage==1.42.2 From 000a09c543bc74873750e3df9fc2c40b52c14cfb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 17 Sep 2021 15:56:22 +0000 Subject: [PATCH 18/22] chore: blacken samples noxfile template (#231) --- .github/.OwlBot.lock.yaml | 2 +- samples/snippets/crop_hints/noxfile.py | 44 ++++++++++++---------- samples/snippets/detect/noxfile.py | 44 ++++++++++++---------- samples/snippets/document_text/noxfile.py | 44 ++++++++++++---------- samples/snippets/face_detection/noxfile.py | 44 ++++++++++++---------- samples/snippets/product_search/noxfile.py | 44 ++++++++++++---------- samples/snippets/quickstart/noxfile.py | 44 ++++++++++++---------- samples/snippets/web/noxfile.py | 44 ++++++++++++---------- 8 files changed, 176 insertions(+), 134 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index c07f148f..e2c23777 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:0ffe3bdd6c7159692df5f7744da74e5ef19966288a6bf76023e8e04e0c424d7d + digest: sha256:0ccd9f4d714d36e311f60f407199dd460e43a99a125b5ca64b1d75f6e5f8581b diff --git a/samples/snippets/crop_hints/noxfile.py b/samples/snippets/crop_hints/noxfile.py index e73436a1..b008613f 100644 --- a/samples/snippets/crop_hints/noxfile.py +++ b/samples/snippets/crop_hints/noxfile.py @@ -39,17 +39,15 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': [], - + "ignored_versions": [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them - 'enforce_type_hints': False, - + "enforce_type_hints": False, # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', + "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # If you need to use a specific version of pip, # change pip_version_override to the string representation @@ -57,13 +55,13 @@ "pip_version_override": None, # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - 'envs': {}, + "envs": {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append('.') + sys.path.append(".") from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -78,12 +76,12 @@ def get_pytest_env_vars() -> Dict[str, str]: ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG['gcloud_project_env'] + env_key = TEST_CONFIG["gcloud_project_env"] # This should error out if not set. - ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG['envs']) + ret.update(TEST_CONFIG["envs"]) return ret @@ -92,11 +90,14 @@ def get_pytest_env_vars() -> Dict[str, str]: ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] +IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( + "True", + "true", +) # # Style Checks # @@ -141,7 +142,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]: @nox.session def lint(session: nox.sessions.Session) -> None: - if not TEST_CONFIG['enforce_type_hints']: + if not TEST_CONFIG["enforce_type_hints"]: session.install("flake8", "flake8-import-order") else: session.install("flake8", "flake8-import-order", "flake8-annotations") @@ -150,9 +151,11 @@ def lint(session: nox.sessions.Session) -> None: args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - "." + ".", ] session.run("flake8", *args) + + # # Black # @@ -165,6 +168,7 @@ def blacken(session: nox.sessions.Session) -> None: session.run("black", *python_files) + # # Sample Tests # @@ -173,7 +177,9 @@ def blacken(session: nox.sessions.Session) -> None: PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] -def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: +def _session_tests( + session: nox.sessions.Session, post_install: Callable = None +) -> None: if TEST_CONFIG["pip_version_override"]: pip_version = TEST_CONFIG["pip_version_override"] session.install(f"pip=={pip_version}") @@ -203,7 +209,7 @@ def _session_tests(session: nox.sessions.Session, post_install: Callable = None) # on travis where slow and flaky tests are excluded. # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html success_codes=[0, 5], - env=get_pytest_env_vars() + env=get_pytest_env_vars(), ) @@ -213,9 +219,9 @@ def py(session: nox.sessions.Session) -> None: if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip("SKIPPED: {} tests are disabled for this sample.".format( - session.python - )) + session.skip( + "SKIPPED: {} tests are disabled for this sample.".format(session.python) + ) # diff --git a/samples/snippets/detect/noxfile.py b/samples/snippets/detect/noxfile.py index e73436a1..b008613f 100644 --- a/samples/snippets/detect/noxfile.py +++ b/samples/snippets/detect/noxfile.py @@ -39,17 +39,15 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': [], - + "ignored_versions": [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them - 'enforce_type_hints': False, - + "enforce_type_hints": False, # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', + "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # If you need to use a specific version of pip, # change pip_version_override to the string representation @@ -57,13 +55,13 @@ "pip_version_override": None, # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - 'envs': {}, + "envs": {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append('.') + sys.path.append(".") from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -78,12 +76,12 @@ def get_pytest_env_vars() -> Dict[str, str]: ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG['gcloud_project_env'] + env_key = TEST_CONFIG["gcloud_project_env"] # This should error out if not set. - ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG['envs']) + ret.update(TEST_CONFIG["envs"]) return ret @@ -92,11 +90,14 @@ def get_pytest_env_vars() -> Dict[str, str]: ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] +IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( + "True", + "true", +) # # Style Checks # @@ -141,7 +142,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]: @nox.session def lint(session: nox.sessions.Session) -> None: - if not TEST_CONFIG['enforce_type_hints']: + if not TEST_CONFIG["enforce_type_hints"]: session.install("flake8", "flake8-import-order") else: session.install("flake8", "flake8-import-order", "flake8-annotations") @@ -150,9 +151,11 @@ def lint(session: nox.sessions.Session) -> None: args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - "." + ".", ] session.run("flake8", *args) + + # # Black # @@ -165,6 +168,7 @@ def blacken(session: nox.sessions.Session) -> None: session.run("black", *python_files) + # # Sample Tests # @@ -173,7 +177,9 @@ def blacken(session: nox.sessions.Session) -> None: PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] -def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: +def _session_tests( + session: nox.sessions.Session, post_install: Callable = None +) -> None: if TEST_CONFIG["pip_version_override"]: pip_version = TEST_CONFIG["pip_version_override"] session.install(f"pip=={pip_version}") @@ -203,7 +209,7 @@ def _session_tests(session: nox.sessions.Session, post_install: Callable = None) # on travis where slow and flaky tests are excluded. # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html success_codes=[0, 5], - env=get_pytest_env_vars() + env=get_pytest_env_vars(), ) @@ -213,9 +219,9 @@ def py(session: nox.sessions.Session) -> None: if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip("SKIPPED: {} tests are disabled for this sample.".format( - session.python - )) + session.skip( + "SKIPPED: {} tests are disabled for this sample.".format(session.python) + ) # diff --git a/samples/snippets/document_text/noxfile.py b/samples/snippets/document_text/noxfile.py index e73436a1..b008613f 100644 --- a/samples/snippets/document_text/noxfile.py +++ b/samples/snippets/document_text/noxfile.py @@ -39,17 +39,15 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': [], - + "ignored_versions": [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them - 'enforce_type_hints': False, - + "enforce_type_hints": False, # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', + "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # If you need to use a specific version of pip, # change pip_version_override to the string representation @@ -57,13 +55,13 @@ "pip_version_override": None, # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - 'envs': {}, + "envs": {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append('.') + sys.path.append(".") from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -78,12 +76,12 @@ def get_pytest_env_vars() -> Dict[str, str]: ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG['gcloud_project_env'] + env_key = TEST_CONFIG["gcloud_project_env"] # This should error out if not set. - ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG['envs']) + ret.update(TEST_CONFIG["envs"]) return ret @@ -92,11 +90,14 @@ def get_pytest_env_vars() -> Dict[str, str]: ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] +IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( + "True", + "true", +) # # Style Checks # @@ -141,7 +142,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]: @nox.session def lint(session: nox.sessions.Session) -> None: - if not TEST_CONFIG['enforce_type_hints']: + if not TEST_CONFIG["enforce_type_hints"]: session.install("flake8", "flake8-import-order") else: session.install("flake8", "flake8-import-order", "flake8-annotations") @@ -150,9 +151,11 @@ def lint(session: nox.sessions.Session) -> None: args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - "." + ".", ] session.run("flake8", *args) + + # # Black # @@ -165,6 +168,7 @@ def blacken(session: nox.sessions.Session) -> None: session.run("black", *python_files) + # # Sample Tests # @@ -173,7 +177,9 @@ def blacken(session: nox.sessions.Session) -> None: PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] -def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: +def _session_tests( + session: nox.sessions.Session, post_install: Callable = None +) -> None: if TEST_CONFIG["pip_version_override"]: pip_version = TEST_CONFIG["pip_version_override"] session.install(f"pip=={pip_version}") @@ -203,7 +209,7 @@ def _session_tests(session: nox.sessions.Session, post_install: Callable = None) # on travis where slow and flaky tests are excluded. # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html success_codes=[0, 5], - env=get_pytest_env_vars() + env=get_pytest_env_vars(), ) @@ -213,9 +219,9 @@ def py(session: nox.sessions.Session) -> None: if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip("SKIPPED: {} tests are disabled for this sample.".format( - session.python - )) + session.skip( + "SKIPPED: {} tests are disabled for this sample.".format(session.python) + ) # diff --git a/samples/snippets/face_detection/noxfile.py b/samples/snippets/face_detection/noxfile.py index e73436a1..b008613f 100644 --- a/samples/snippets/face_detection/noxfile.py +++ b/samples/snippets/face_detection/noxfile.py @@ -39,17 +39,15 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': [], - + "ignored_versions": [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them - 'enforce_type_hints': False, - + "enforce_type_hints": False, # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', + "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # If you need to use a specific version of pip, # change pip_version_override to the string representation @@ -57,13 +55,13 @@ "pip_version_override": None, # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - 'envs': {}, + "envs": {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append('.') + sys.path.append(".") from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -78,12 +76,12 @@ def get_pytest_env_vars() -> Dict[str, str]: ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG['gcloud_project_env'] + env_key = TEST_CONFIG["gcloud_project_env"] # This should error out if not set. - ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG['envs']) + ret.update(TEST_CONFIG["envs"]) return ret @@ -92,11 +90,14 @@ def get_pytest_env_vars() -> Dict[str, str]: ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] +IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( + "True", + "true", +) # # Style Checks # @@ -141,7 +142,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]: @nox.session def lint(session: nox.sessions.Session) -> None: - if not TEST_CONFIG['enforce_type_hints']: + if not TEST_CONFIG["enforce_type_hints"]: session.install("flake8", "flake8-import-order") else: session.install("flake8", "flake8-import-order", "flake8-annotations") @@ -150,9 +151,11 @@ def lint(session: nox.sessions.Session) -> None: args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - "." + ".", ] session.run("flake8", *args) + + # # Black # @@ -165,6 +168,7 @@ def blacken(session: nox.sessions.Session) -> None: session.run("black", *python_files) + # # Sample Tests # @@ -173,7 +177,9 @@ def blacken(session: nox.sessions.Session) -> None: PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] -def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: +def _session_tests( + session: nox.sessions.Session, post_install: Callable = None +) -> None: if TEST_CONFIG["pip_version_override"]: pip_version = TEST_CONFIG["pip_version_override"] session.install(f"pip=={pip_version}") @@ -203,7 +209,7 @@ def _session_tests(session: nox.sessions.Session, post_install: Callable = None) # on travis where slow and flaky tests are excluded. # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html success_codes=[0, 5], - env=get_pytest_env_vars() + env=get_pytest_env_vars(), ) @@ -213,9 +219,9 @@ def py(session: nox.sessions.Session) -> None: if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip("SKIPPED: {} tests are disabled for this sample.".format( - session.python - )) + session.skip( + "SKIPPED: {} tests are disabled for this sample.".format(session.python) + ) # diff --git a/samples/snippets/product_search/noxfile.py b/samples/snippets/product_search/noxfile.py index e73436a1..b008613f 100644 --- a/samples/snippets/product_search/noxfile.py +++ b/samples/snippets/product_search/noxfile.py @@ -39,17 +39,15 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': [], - + "ignored_versions": [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them - 'enforce_type_hints': False, - + "enforce_type_hints": False, # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', + "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # If you need to use a specific version of pip, # change pip_version_override to the string representation @@ -57,13 +55,13 @@ "pip_version_override": None, # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - 'envs': {}, + "envs": {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append('.') + sys.path.append(".") from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -78,12 +76,12 @@ def get_pytest_env_vars() -> Dict[str, str]: ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG['gcloud_project_env'] + env_key = TEST_CONFIG["gcloud_project_env"] # This should error out if not set. - ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG['envs']) + ret.update(TEST_CONFIG["envs"]) return ret @@ -92,11 +90,14 @@ def get_pytest_env_vars() -> Dict[str, str]: ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] +IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( + "True", + "true", +) # # Style Checks # @@ -141,7 +142,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]: @nox.session def lint(session: nox.sessions.Session) -> None: - if not TEST_CONFIG['enforce_type_hints']: + if not TEST_CONFIG["enforce_type_hints"]: session.install("flake8", "flake8-import-order") else: session.install("flake8", "flake8-import-order", "flake8-annotations") @@ -150,9 +151,11 @@ def lint(session: nox.sessions.Session) -> None: args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - "." + ".", ] session.run("flake8", *args) + + # # Black # @@ -165,6 +168,7 @@ def blacken(session: nox.sessions.Session) -> None: session.run("black", *python_files) + # # Sample Tests # @@ -173,7 +177,9 @@ def blacken(session: nox.sessions.Session) -> None: PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] -def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: +def _session_tests( + session: nox.sessions.Session, post_install: Callable = None +) -> None: if TEST_CONFIG["pip_version_override"]: pip_version = TEST_CONFIG["pip_version_override"] session.install(f"pip=={pip_version}") @@ -203,7 +209,7 @@ def _session_tests(session: nox.sessions.Session, post_install: Callable = None) # on travis where slow and flaky tests are excluded. # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html success_codes=[0, 5], - env=get_pytest_env_vars() + env=get_pytest_env_vars(), ) @@ -213,9 +219,9 @@ def py(session: nox.sessions.Session) -> None: if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip("SKIPPED: {} tests are disabled for this sample.".format( - session.python - )) + session.skip( + "SKIPPED: {} tests are disabled for this sample.".format(session.python) + ) # diff --git a/samples/snippets/quickstart/noxfile.py b/samples/snippets/quickstart/noxfile.py index e73436a1..b008613f 100644 --- a/samples/snippets/quickstart/noxfile.py +++ b/samples/snippets/quickstart/noxfile.py @@ -39,17 +39,15 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': [], - + "ignored_versions": [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them - 'enforce_type_hints': False, - + "enforce_type_hints": False, # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', + "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # If you need to use a specific version of pip, # change pip_version_override to the string representation @@ -57,13 +55,13 @@ "pip_version_override": None, # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - 'envs': {}, + "envs": {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append('.') + sys.path.append(".") from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -78,12 +76,12 @@ def get_pytest_env_vars() -> Dict[str, str]: ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG['gcloud_project_env'] + env_key = TEST_CONFIG["gcloud_project_env"] # This should error out if not set. - ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG['envs']) + ret.update(TEST_CONFIG["envs"]) return ret @@ -92,11 +90,14 @@ def get_pytest_env_vars() -> Dict[str, str]: ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] +IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( + "True", + "true", +) # # Style Checks # @@ -141,7 +142,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]: @nox.session def lint(session: nox.sessions.Session) -> None: - if not TEST_CONFIG['enforce_type_hints']: + if not TEST_CONFIG["enforce_type_hints"]: session.install("flake8", "flake8-import-order") else: session.install("flake8", "flake8-import-order", "flake8-annotations") @@ -150,9 +151,11 @@ def lint(session: nox.sessions.Session) -> None: args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - "." + ".", ] session.run("flake8", *args) + + # # Black # @@ -165,6 +168,7 @@ def blacken(session: nox.sessions.Session) -> None: session.run("black", *python_files) + # # Sample Tests # @@ -173,7 +177,9 @@ def blacken(session: nox.sessions.Session) -> None: PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] -def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: +def _session_tests( + session: nox.sessions.Session, post_install: Callable = None +) -> None: if TEST_CONFIG["pip_version_override"]: pip_version = TEST_CONFIG["pip_version_override"] session.install(f"pip=={pip_version}") @@ -203,7 +209,7 @@ def _session_tests(session: nox.sessions.Session, post_install: Callable = None) # on travis where slow and flaky tests are excluded. # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html success_codes=[0, 5], - env=get_pytest_env_vars() + env=get_pytest_env_vars(), ) @@ -213,9 +219,9 @@ def py(session: nox.sessions.Session) -> None: if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip("SKIPPED: {} tests are disabled for this sample.".format( - session.python - )) + session.skip( + "SKIPPED: {} tests are disabled for this sample.".format(session.python) + ) # diff --git a/samples/snippets/web/noxfile.py b/samples/snippets/web/noxfile.py index e73436a1..b008613f 100644 --- a/samples/snippets/web/noxfile.py +++ b/samples/snippets/web/noxfile.py @@ -39,17 +39,15 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': [], - + "ignored_versions": [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them - 'enforce_type_hints': False, - + "enforce_type_hints": False, # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', + "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # If you need to use a specific version of pip, # change pip_version_override to the string representation @@ -57,13 +55,13 @@ "pip_version_override": None, # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - 'envs': {}, + "envs": {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append('.') + sys.path.append(".") from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -78,12 +76,12 @@ def get_pytest_env_vars() -> Dict[str, str]: ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG['gcloud_project_env'] + env_key = TEST_CONFIG["gcloud_project_env"] # This should error out if not set. - ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG['envs']) + ret.update(TEST_CONFIG["envs"]) return ret @@ -92,11 +90,14 @@ def get_pytest_env_vars() -> Dict[str, str]: ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] +IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( + "True", + "true", +) # # Style Checks # @@ -141,7 +142,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]: @nox.session def lint(session: nox.sessions.Session) -> None: - if not TEST_CONFIG['enforce_type_hints']: + if not TEST_CONFIG["enforce_type_hints"]: session.install("flake8", "flake8-import-order") else: session.install("flake8", "flake8-import-order", "flake8-annotations") @@ -150,9 +151,11 @@ def lint(session: nox.sessions.Session) -> None: args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - "." + ".", ] session.run("flake8", *args) + + # # Black # @@ -165,6 +168,7 @@ def blacken(session: nox.sessions.Session) -> None: session.run("black", *python_files) + # # Sample Tests # @@ -173,7 +177,9 @@ def blacken(session: nox.sessions.Session) -> None: PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] -def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: +def _session_tests( + session: nox.sessions.Session, post_install: Callable = None +) -> None: if TEST_CONFIG["pip_version_override"]: pip_version = TEST_CONFIG["pip_version_override"] session.install(f"pip=={pip_version}") @@ -203,7 +209,7 @@ def _session_tests(session: nox.sessions.Session, post_install: Callable = None) # on travis where slow and flaky tests are excluded. # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html success_codes=[0, 5], - env=get_pytest_env_vars() + env=get_pytest_env_vars(), ) @@ -213,9 +219,9 @@ def py(session: nox.sessions.Session) -> None: if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip("SKIPPED: {} tests are disabled for this sample.".format( - session.python - )) + session.skip( + "SKIPPED: {} tests are disabled for this sample.".format(session.python) + ) # From 041ed52b02ccc97fe3cf7e6774810abdee90067d Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Tue, 21 Sep 2021 12:36:15 -0700 Subject: [PATCH 19/22] chore: relocate owl bot post processor (#234) chore: relocate owl bot post processor --- .github/.OwlBot.lock.yaml | 4 ++-- .github/.OwlBot.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index e2c23777..2567653c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: - image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:0ccd9f4d714d36e311f60f407199dd460e43a99a125b5ca64b1d75f6e5f8581b + image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest + digest: sha256:87eee22d276554e4e52863ec9b1cb6a7245815dfae20439712bf644348215a5a diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 4628ccc9..30b98729 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -13,7 +13,7 @@ # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-python:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest deep-remove-regex: - /owl-bot-staging From 54a1e0e61da75cf33cb216e5eb0acc5a29bbf7a0 Mon Sep 17 00:00:00 2001 From: Manuel Lang Date: Thu, 23 Sep 2021 19:34:08 +0200 Subject: [PATCH 20/22] chore: remove duplicate word in README (#235) --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index ac3af5a7..6173c1ab 100644 --- a/README.rst +++ b/README.rst @@ -111,7 +111,7 @@ Example Usage Next Steps ~~~~~~~~~~ -- Read the `Client Library Documentation`_ for Google Cloud Vision API +- Read the `Client Library Documentation`_ for Google Cloud Vision API to see other available methods on the client. - Read the `Product documentation`_ to learn more about the product and see How-to Guides. From 87ad0eabbba08754320fd836c5e76fba48222b5c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 01:02:11 +0000 Subject: [PATCH 21/22] chore: use gapic-generator-python 0.51.2 (#236) - [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: https://github.com/googleapis/googleapis/commit/b224dfa52642a733ea64849d4e06d15c274bc08f Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9 --- .../services/image_annotator/client.py | 18 ++-- .../image_annotator/transports/base.py | 2 +- .../image_annotator/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/product_search/client.py | 84 ++++++++++--------- .../product_search/transports/base.py | 2 +- .../product_search/transports/grpc.py | 6 +- .../product_search/transports/grpc_asyncio.py | 6 +- .../services/image_annotator/client.py | 6 +- .../image_annotator/transports/base.py | 2 +- .../image_annotator/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/image_annotator/client.py | 10 +-- .../image_annotator/transports/base.py | 2 +- .../image_annotator/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/image_annotator/client.py | 10 +-- .../image_annotator/transports/base.py | 2 +- .../image_annotator/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/product_search/client.py | 80 ++++++++++-------- .../product_search/transports/base.py | 2 +- .../product_search/transports/grpc.py | 6 +- .../product_search/transports/grpc_asyncio.py | 6 +- .../services/image_annotator/client.py | 18 ++-- .../image_annotator/transports/base.py | 2 +- .../image_annotator/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/product_search/client.py | 84 ++++++++++--------- .../product_search/transports/base.py | 2 +- .../product_search/transports/grpc.py | 6 +- .../product_search/transports/grpc_asyncio.py | 6 +- 32 files changed, 220 insertions(+), 202 deletions(-) diff --git a/google/cloud/vision_v1/services/image_annotator/client.py b/google/cloud/vision_v1/services/image_annotator/client.py index 64e81bdd..122c1ed4 100644 --- a/google/cloud/vision_v1/services/image_annotator/client.py +++ b/google/cloud/vision_v1/services/image_annotator/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -373,7 +373,7 @@ def __init__( def batch_annotate_images( self, - request: image_annotator.BatchAnnotateImagesRequest = None, + request: Union[image_annotator.BatchAnnotateImagesRequest, dict] = None, *, requests: Sequence[image_annotator.AnnotateImageRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -384,7 +384,7 @@ def batch_annotate_images( images. Args: - request (google.cloud.vision_v1.types.BatchAnnotateImagesRequest): + request (Union[google.cloud.vision_v1.types.BatchAnnotateImagesRequest, dict]): The request object. Multiple image annotation requests are batched into a single service call. requests (Sequence[google.cloud.vision_v1.types.AnnotateImageRequest]): @@ -442,7 +442,7 @@ def batch_annotate_images( def batch_annotate_files( self, - request: image_annotator.BatchAnnotateFilesRequest = None, + request: Union[image_annotator.BatchAnnotateFilesRequest, dict] = None, *, requests: Sequence[image_annotator.AnnotateFileRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -459,7 +459,7 @@ def batch_annotate_files( extracted. Args: - request (google.cloud.vision_v1.types.BatchAnnotateFilesRequest): + request (Union[google.cloud.vision_v1.types.BatchAnnotateFilesRequest, dict]): The request object. A list of requests to annotate files using the BatchAnnotateFiles API. requests (Sequence[google.cloud.vision_v1.types.AnnotateFileRequest]): @@ -517,7 +517,7 @@ def batch_annotate_files( def async_batch_annotate_images( self, - request: image_annotator.AsyncBatchAnnotateImagesRequest = None, + request: Union[image_annotator.AsyncBatchAnnotateImagesRequest, dict] = None, *, requests: Sequence[image_annotator.AnnotateImageRequest] = None, output_config: image_annotator.OutputConfig = None, @@ -539,7 +539,7 @@ def async_batch_annotate_images( BatchAnnotateImagesResponse proto. Args: - request (google.cloud.vision_v1.types.AsyncBatchAnnotateImagesRequest): + request (Union[google.cloud.vision_v1.types.AsyncBatchAnnotateImagesRequest, dict]): The request object. Request for async image annotation for a list of images. requests (Sequence[google.cloud.vision_v1.types.AnnotateImageRequest]): @@ -619,7 +619,7 @@ def async_batch_annotate_images( def async_batch_annotate_files( self, - request: image_annotator.AsyncBatchAnnotateFilesRequest = None, + request: Union[image_annotator.AsyncBatchAnnotateFilesRequest, dict] = None, *, requests: Sequence[image_annotator.AsyncAnnotateFileRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -635,7 +635,7 @@ def async_batch_annotate_files( ``AsyncBatchAnnotateFilesResponse`` (results). Args: - request (google.cloud.vision_v1.types.AsyncBatchAnnotateFilesRequest): + request (Union[google.cloud.vision_v1.types.AsyncBatchAnnotateFilesRequest, dict]): The request object. Multiple async file annotation requests are batched into a single service call. requests (Sequence[google.cloud.vision_v1.types.AsyncAnnotateFileRequest]): diff --git a/google/cloud/vision_v1/services/image_annotator/transports/base.py b/google/cloud/vision_v1/services/image_annotator/transports/base.py index 9020aa3b..bf88d098 100644 --- a/google/cloud/vision_v1/services/image_annotator/transports/base.py +++ b/google/cloud/vision_v1/services/image_annotator/transports/base.py @@ -120,7 +120,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/vision_v1/services/image_annotator/transports/grpc.py b/google/cloud/vision_v1/services/image_annotator/transports/grpc.py index 1a06531e..666c5d3c 100644 --- a/google/cloud/vision_v1/services/image_annotator/transports/grpc.py +++ b/google/cloud/vision_v1/services/image_annotator/transports/grpc.py @@ -85,16 +85,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1/services/image_annotator/transports/grpc_asyncio.py b/google/cloud/vision_v1/services/image_annotator/transports/grpc_asyncio.py index d714755a..930bb66f 100644 --- a/google/cloud/vision_v1/services/image_annotator/transports/grpc_asyncio.py +++ b/google/cloud/vision_v1/services/image_annotator/transports/grpc_asyncio.py @@ -132,16 +132,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1/services/product_search/client.py b/google/cloud/vision_v1/services/product_search/client.py index 4deda3c1..ece2329b 100644 --- a/google/cloud/vision_v1/services/product_search/client.py +++ b/google/cloud/vision_v1/services/product_search/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -412,7 +412,7 @@ def __init__( def create_product_set( self, - request: product_search_service.CreateProductSetRequest = None, + request: Union[product_search_service.CreateProductSetRequest, dict] = None, *, parent: str = None, product_set: product_search_service.ProductSet = None, @@ -429,7 +429,7 @@ def create_product_set( longer than 4096 characters. Args: - request (google.cloud.vision_v1.types.CreateProductSetRequest): + request (Union[google.cloud.vision_v1.types.CreateProductSetRequest, dict]): The request object. Request message for the `CreateProductSet` method. parent (str): @@ -514,7 +514,7 @@ def create_product_set( def list_product_sets( self, - request: product_search_service.ListProductSetsRequest = None, + request: Union[product_search_service.ListProductSetsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -529,7 +529,7 @@ def list_product_sets( less than 1. Args: - request (google.cloud.vision_v1.types.ListProductSetsRequest): + request (Union[google.cloud.vision_v1.types.ListProductSetsRequest, dict]): The request object. Request message for the `ListProductSets` method. parent (str): @@ -600,7 +600,7 @@ def list_product_sets( def get_product_set( self, - request: product_search_service.GetProductSetRequest = None, + request: Union[product_search_service.GetProductSetRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -614,7 +614,7 @@ def get_product_set( - Returns NOT_FOUND if the ProductSet does not exist. Args: - request (google.cloud.vision_v1.types.GetProductSetRequest): + request (Union[google.cloud.vision_v1.types.GetProductSetRequest, dict]): The request object. Request message for the `GetProductSet` method. name (str): @@ -680,7 +680,7 @@ def get_product_set( def update_product_set( self, - request: product_search_service.UpdateProductSetRequest = None, + request: Union[product_search_service.UpdateProductSetRequest, dict] = None, *, product_set: product_search_service.ProductSet = None, update_mask: field_mask_pb2.FieldMask = None, @@ -699,7 +699,7 @@ def update_product_set( characters. Args: - request (google.cloud.vision_v1.types.UpdateProductSetRequest): + request (Union[google.cloud.vision_v1.types.UpdateProductSetRequest, dict]): The request object. Request message for the `UpdateProductSet` method. product_set (google.cloud.vision_v1.types.ProductSet): @@ -776,7 +776,7 @@ def update_product_set( def delete_product_set( self, - request: product_search_service.DeleteProductSetRequest = None, + request: Union[product_search_service.DeleteProductSetRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -789,7 +789,7 @@ def delete_product_set( Storage. Args: - request (google.cloud.vision_v1.types.DeleteProductSetRequest): + request (Union[google.cloud.vision_v1.types.DeleteProductSetRequest, dict]): The request object. Request message for the `DeleteProductSet` method. name (str): @@ -845,7 +845,7 @@ def delete_product_set( def create_product( self, - request: product_search_service.CreateProductRequest = None, + request: Union[product_search_service.CreateProductRequest, dict] = None, *, parent: str = None, product: product_search_service.Product = None, @@ -866,7 +866,7 @@ def create_product( invalid. Args: - request (google.cloud.vision_v1.types.CreateProductRequest): + request (Union[google.cloud.vision_v1.types.CreateProductRequest, dict]): The request object. Request message for the `CreateProduct` method. parent (str): @@ -946,7 +946,7 @@ def create_product( def list_products( self, - request: product_search_service.ListProductsRequest = None, + request: Union[product_search_service.ListProductsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -961,7 +961,7 @@ def list_products( less than 1. Args: - request (google.cloud.vision_v1.types.ListProductsRequest): + request (Union[google.cloud.vision_v1.types.ListProductsRequest, dict]): The request object. Request message for the `ListProducts` method. parent (str): @@ -1032,7 +1032,7 @@ def list_products( def get_product( self, - request: product_search_service.GetProductRequest = None, + request: Union[product_search_service.GetProductRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1046,7 +1046,7 @@ def get_product( - Returns NOT_FOUND if the Product does not exist. Args: - request (google.cloud.vision_v1.types.GetProductRequest): + request (Union[google.cloud.vision_v1.types.GetProductRequest, dict]): The request object. Request message for the `GetProduct` method. name (str): @@ -1107,7 +1107,7 @@ def get_product( def update_product( self, - request: product_search_service.UpdateProductRequest = None, + request: Union[product_search_service.UpdateProductRequest, dict] = None, *, product: product_search_service.Product = None, update_mask: field_mask_pb2.FieldMask = None, @@ -1133,7 +1133,7 @@ def update_product( update_mask. Args: - request (google.cloud.vision_v1.types.UpdateProductRequest): + request (Union[google.cloud.vision_v1.types.UpdateProductRequest, dict]): The request object. Request message for the `UpdateProduct` method. product (google.cloud.vision_v1.types.Product): @@ -1207,7 +1207,7 @@ def update_product( def delete_product( self, - request: product_search_service.DeleteProductRequest = None, + request: Union[product_search_service.DeleteProductRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1222,7 +1222,7 @@ def delete_product( all related caches are refreshed. Args: - request (google.cloud.vision_v1.types.DeleteProductRequest): + request (Union[google.cloud.vision_v1.types.DeleteProductRequest, dict]): The request object. Request message for the `DeleteProduct` method. name (str): @@ -1278,7 +1278,7 @@ def delete_product( def create_reference_image( self, - request: product_search_service.CreateReferenceImageRequest = None, + request: Union[product_search_service.CreateReferenceImageRequest, dict] = None, *, parent: str = None, reference_image: product_search_service.ReferenceImage = None, @@ -1311,7 +1311,7 @@ def create_reference_image( 10 polygons. Args: - request (google.cloud.vision_v1.types.CreateReferenceImageRequest): + request (Union[google.cloud.vision_v1.types.CreateReferenceImageRequest, dict]): The request object. Request message for the `CreateReferenceImage` method. parent (str): @@ -1397,7 +1397,7 @@ def create_reference_image( def delete_reference_image( self, - request: product_search_service.DeleteReferenceImageRequest = None, + request: Union[product_search_service.DeleteReferenceImageRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1413,7 +1413,7 @@ def delete_reference_image( Storage. Args: - request (google.cloud.vision_v1.types.DeleteReferenceImageRequest): + request (Union[google.cloud.vision_v1.types.DeleteReferenceImageRequest, dict]): The request object. Request message for the `DeleteReferenceImage` method. name (str): @@ -1470,7 +1470,7 @@ def delete_reference_image( def list_reference_images( self, - request: product_search_service.ListReferenceImagesRequest = None, + request: Union[product_search_service.ListReferenceImagesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1486,7 +1486,7 @@ def list_reference_images( 100, or less than 1. Args: - request (google.cloud.vision_v1.types.ListReferenceImagesRequest): + request (Union[google.cloud.vision_v1.types.ListReferenceImagesRequest, dict]): The request object. Request message for the `ListReferenceImages` method. parent (str): @@ -1558,7 +1558,7 @@ def list_reference_images( def get_reference_image( self, - request: product_search_service.GetReferenceImageRequest = None, + request: Union[product_search_service.GetReferenceImageRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1572,7 +1572,7 @@ def get_reference_image( - Returns NOT_FOUND if the specified image does not exist. Args: - request (google.cloud.vision_v1.types.GetReferenceImageRequest): + request (Union[google.cloud.vision_v1.types.GetReferenceImageRequest, dict]): The request object. Request message for the `GetReferenceImage` method. name (str): @@ -1636,7 +1636,9 @@ def get_reference_image( def add_product_to_product_set( self, - request: product_search_service.AddProductToProductSetRequest = None, + request: Union[ + product_search_service.AddProductToProductSetRequest, dict + ] = None, *, name: str = None, product: str = None, @@ -1655,7 +1657,7 @@ def add_product_to_product_set( exist. Args: - request (google.cloud.vision_v1.types.AddProductToProductSetRequest): + request (Union[google.cloud.vision_v1.types.AddProductToProductSetRequest, dict]): The request object. Request message for the `AddProductToProductSet` method. name (str): @@ -1728,7 +1730,9 @@ def add_product_to_product_set( def remove_product_from_product_set( self, - request: product_search_service.RemoveProductFromProductSetRequest = None, + request: Union[ + product_search_service.RemoveProductFromProductSetRequest, dict + ] = None, *, name: str = None, product: str = None, @@ -1739,7 +1743,7 @@ def remove_product_from_product_set( r"""Removes a Product from the specified ProductSet. Args: - request (google.cloud.vision_v1.types.RemoveProductFromProductSetRequest): + request (Union[google.cloud.vision_v1.types.RemoveProductFromProductSetRequest, dict]): The request object. Request message for the `RemoveProductFromProductSet` method. name (str): @@ -1812,7 +1816,9 @@ def remove_product_from_product_set( def list_products_in_product_set( self, - request: product_search_service.ListProductsInProductSetRequest = None, + request: Union[ + product_search_service.ListProductsInProductSetRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1829,7 +1835,7 @@ def list_products_in_product_set( less than 1. Args: - request (google.cloud.vision_v1.types.ListProductsInProductSetRequest): + request (Union[google.cloud.vision_v1.types.ListProductsInProductSetRequest, dict]): The request object. Request message for the `ListProductsInProductSet` method. name (str): @@ -1906,7 +1912,7 @@ def list_products_in_product_set( def import_product_sets( self, - request: product_search_service.ImportProductSetsRequest = None, + request: Union[product_search_service.ImportProductSetsRequest, dict] = None, *, parent: str = None, input_config: product_search_service.ImportProductSetsInputConfig = None, @@ -1928,7 +1934,7 @@ def import_product_sets( [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. Args: - request (google.cloud.vision_v1.types.ImportProductSetsRequest): + request (Union[google.cloud.vision_v1.types.ImportProductSetsRequest, dict]): The request object. Request message for the `ImportProductSets` method. parent (str): @@ -2017,7 +2023,7 @@ def import_product_sets( def purge_products( self, - request: product_search_service.PurgeProductsRequest = None, + request: Union[product_search_service.PurgeProductsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -2053,7 +2059,7 @@ def purge_products( ``BatchOperationMetadata``. (progress) Args: - request (google.cloud.vision_v1.types.PurgeProductsRequest): + request (Union[google.cloud.vision_v1.types.PurgeProductsRequest, dict]): The request object. Request message for the `PurgeProducts` method. parent (str): diff --git a/google/cloud/vision_v1/services/product_search/transports/base.py b/google/cloud/vision_v1/services/product_search/transports/base.py index 54fd1e03..a6ae5112 100644 --- a/google/cloud/vision_v1/services/product_search/transports/base.py +++ b/google/cloud/vision_v1/services/product_search/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/vision_v1/services/product_search/transports/grpc.py b/google/cloud/vision_v1/services/product_search/transports/grpc.py index d7e03961..df926905 100644 --- a/google/cloud/vision_v1/services/product_search/transports/grpc.py +++ b/google/cloud/vision_v1/services/product_search/transports/grpc.py @@ -100,16 +100,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1/services/product_search/transports/grpc_asyncio.py b/google/cloud/vision_v1/services/product_search/transports/grpc_asyncio.py index 21a2ffec..95dcc826 100644 --- a/google/cloud/vision_v1/services/product_search/transports/grpc_asyncio.py +++ b/google/cloud/vision_v1/services/product_search/transports/grpc_asyncio.py @@ -147,16 +147,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p1beta1/services/image_annotator/client.py b/google/cloud/vision_v1p1beta1/services/image_annotator/client.py index 5ba847a3..04025123 100644 --- a/google/cloud/vision_v1p1beta1/services/image_annotator/client.py +++ b/google/cloud/vision_v1p1beta1/services/image_annotator/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -339,7 +339,7 @@ def __init__( def batch_annotate_images( self, - request: image_annotator.BatchAnnotateImagesRequest = None, + request: Union[image_annotator.BatchAnnotateImagesRequest, dict] = None, *, requests: Sequence[image_annotator.AnnotateImageRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -350,7 +350,7 @@ def batch_annotate_images( images. Args: - request (google.cloud.vision_v1p1beta1.types.BatchAnnotateImagesRequest): + request (Union[google.cloud.vision_v1p1beta1.types.BatchAnnotateImagesRequest, dict]): The request object. Multiple image annotation requests are batched into a single service call. requests (Sequence[google.cloud.vision_v1p1beta1.types.AnnotateImageRequest]): diff --git a/google/cloud/vision_v1p1beta1/services/image_annotator/transports/base.py b/google/cloud/vision_v1p1beta1/services/image_annotator/transports/base.py index 8350d48a..ddf9be8f 100644 --- a/google/cloud/vision_v1p1beta1/services/image_annotator/transports/base.py +++ b/google/cloud/vision_v1p1beta1/services/image_annotator/transports/base.py @@ -118,7 +118,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/vision_v1p1beta1/services/image_annotator/transports/grpc.py b/google/cloud/vision_v1p1beta1/services/image_annotator/transports/grpc.py index cc29933e..564c52c2 100644 --- a/google/cloud/vision_v1p1beta1/services/image_annotator/transports/grpc.py +++ b/google/cloud/vision_v1p1beta1/services/image_annotator/transports/grpc.py @@ -83,16 +83,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p1beta1/services/image_annotator/transports/grpc_asyncio.py b/google/cloud/vision_v1p1beta1/services/image_annotator/transports/grpc_asyncio.py index d589e73f..f8b7c01b 100644 --- a/google/cloud/vision_v1p1beta1/services/image_annotator/transports/grpc_asyncio.py +++ b/google/cloud/vision_v1p1beta1/services/image_annotator/transports/grpc_asyncio.py @@ -130,16 +130,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p2beta1/services/image_annotator/client.py b/google/cloud/vision_v1p2beta1/services/image_annotator/client.py index d506f2d4..15ad8646 100644 --- a/google/cloud/vision_v1p2beta1/services/image_annotator/client.py +++ b/google/cloud/vision_v1p2beta1/services/image_annotator/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -341,7 +341,7 @@ def __init__( def batch_annotate_images( self, - request: image_annotator.BatchAnnotateImagesRequest = None, + request: Union[image_annotator.BatchAnnotateImagesRequest, dict] = None, *, requests: Sequence[image_annotator.AnnotateImageRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -352,7 +352,7 @@ def batch_annotate_images( images. Args: - request (google.cloud.vision_v1p2beta1.types.BatchAnnotateImagesRequest): + request (Union[google.cloud.vision_v1p2beta1.types.BatchAnnotateImagesRequest, dict]): The request object. Multiple image annotation requests are batched into a single service call. requests (Sequence[google.cloud.vision_v1p2beta1.types.AnnotateImageRequest]): @@ -410,7 +410,7 @@ def batch_annotate_images( def async_batch_annotate_files( self, - request: image_annotator.AsyncBatchAnnotateFilesRequest = None, + request: Union[image_annotator.AsyncBatchAnnotateFilesRequest, dict] = None, *, requests: Sequence[image_annotator.AsyncAnnotateFileRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -426,7 +426,7 @@ def async_batch_annotate_files( ``AsyncBatchAnnotateFilesResponse`` (results). Args: - request (google.cloud.vision_v1p2beta1.types.AsyncBatchAnnotateFilesRequest): + request (Union[google.cloud.vision_v1p2beta1.types.AsyncBatchAnnotateFilesRequest, dict]): The request object. Multiple async file annotation requests are batched into a single service call. requests (Sequence[google.cloud.vision_v1p2beta1.types.AsyncAnnotateFileRequest]): diff --git a/google/cloud/vision_v1p2beta1/services/image_annotator/transports/base.py b/google/cloud/vision_v1p2beta1/services/image_annotator/transports/base.py index dae3630f..1b035ec6 100644 --- a/google/cloud/vision_v1p2beta1/services/image_annotator/transports/base.py +++ b/google/cloud/vision_v1p2beta1/services/image_annotator/transports/base.py @@ -120,7 +120,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/vision_v1p2beta1/services/image_annotator/transports/grpc.py b/google/cloud/vision_v1p2beta1/services/image_annotator/transports/grpc.py index 1d424381..f734a3c3 100644 --- a/google/cloud/vision_v1p2beta1/services/image_annotator/transports/grpc.py +++ b/google/cloud/vision_v1p2beta1/services/image_annotator/transports/grpc.py @@ -85,16 +85,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p2beta1/services/image_annotator/transports/grpc_asyncio.py b/google/cloud/vision_v1p2beta1/services/image_annotator/transports/grpc_asyncio.py index 4498dc31..c7de2e83 100644 --- a/google/cloud/vision_v1p2beta1/services/image_annotator/transports/grpc_asyncio.py +++ b/google/cloud/vision_v1p2beta1/services/image_annotator/transports/grpc_asyncio.py @@ -132,16 +132,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p3beta1/services/image_annotator/client.py b/google/cloud/vision_v1p3beta1/services/image_annotator/client.py index 06ac9041..1ac9894b 100644 --- a/google/cloud/vision_v1p3beta1/services/image_annotator/client.py +++ b/google/cloud/vision_v1p3beta1/services/image_annotator/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -373,7 +373,7 @@ def __init__( def batch_annotate_images( self, - request: image_annotator.BatchAnnotateImagesRequest = None, + request: Union[image_annotator.BatchAnnotateImagesRequest, dict] = None, *, requests: Sequence[image_annotator.AnnotateImageRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -384,7 +384,7 @@ def batch_annotate_images( images. Args: - request (google.cloud.vision_v1p3beta1.types.BatchAnnotateImagesRequest): + request (Union[google.cloud.vision_v1p3beta1.types.BatchAnnotateImagesRequest, dict]): The request object. Multiple image annotation requests are batched into a single service call. requests (Sequence[google.cloud.vision_v1p3beta1.types.AnnotateImageRequest]): @@ -442,7 +442,7 @@ def batch_annotate_images( def async_batch_annotate_files( self, - request: image_annotator.AsyncBatchAnnotateFilesRequest = None, + request: Union[image_annotator.AsyncBatchAnnotateFilesRequest, dict] = None, *, requests: Sequence[image_annotator.AsyncAnnotateFileRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -458,7 +458,7 @@ def async_batch_annotate_files( ``AsyncBatchAnnotateFilesResponse`` (results). Args: - request (google.cloud.vision_v1p3beta1.types.AsyncBatchAnnotateFilesRequest): + request (Union[google.cloud.vision_v1p3beta1.types.AsyncBatchAnnotateFilesRequest, dict]): The request object. Multiple async file annotation requests are batched into a single service call. requests (Sequence[google.cloud.vision_v1p3beta1.types.AsyncAnnotateFileRequest]): diff --git a/google/cloud/vision_v1p3beta1/services/image_annotator/transports/base.py b/google/cloud/vision_v1p3beta1/services/image_annotator/transports/base.py index 175adb50..2d9866fc 100644 --- a/google/cloud/vision_v1p3beta1/services/image_annotator/transports/base.py +++ b/google/cloud/vision_v1p3beta1/services/image_annotator/transports/base.py @@ -120,7 +120,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/vision_v1p3beta1/services/image_annotator/transports/grpc.py b/google/cloud/vision_v1p3beta1/services/image_annotator/transports/grpc.py index fd9096b8..f017059c 100644 --- a/google/cloud/vision_v1p3beta1/services/image_annotator/transports/grpc.py +++ b/google/cloud/vision_v1p3beta1/services/image_annotator/transports/grpc.py @@ -85,16 +85,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p3beta1/services/image_annotator/transports/grpc_asyncio.py b/google/cloud/vision_v1p3beta1/services/image_annotator/transports/grpc_asyncio.py index 46e94b91..ad423c81 100644 --- a/google/cloud/vision_v1p3beta1/services/image_annotator/transports/grpc_asyncio.py +++ b/google/cloud/vision_v1p3beta1/services/image_annotator/transports/grpc_asyncio.py @@ -132,16 +132,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p3beta1/services/product_search/client.py b/google/cloud/vision_v1p3beta1/services/product_search/client.py index 988f3a71..0e9e3a23 100644 --- a/google/cloud/vision_v1p3beta1/services/product_search/client.py +++ b/google/cloud/vision_v1p3beta1/services/product_search/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -413,7 +413,7 @@ def __init__( def create_product_set( self, - request: product_search_service.CreateProductSetRequest = None, + request: Union[product_search_service.CreateProductSetRequest, dict] = None, *, parent: str = None, product_set: product_search_service.ProductSet = None, @@ -430,7 +430,7 @@ def create_product_set( longer than 4096 characters. Args: - request (google.cloud.vision_v1p3beta1.types.CreateProductSetRequest): + request (Union[google.cloud.vision_v1p3beta1.types.CreateProductSetRequest, dict]): The request object. Request message for the `CreateProductSet` method. parent (str): @@ -515,7 +515,7 @@ def create_product_set( def list_product_sets( self, - request: product_search_service.ListProductSetsRequest = None, + request: Union[product_search_service.ListProductSetsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -530,7 +530,7 @@ def list_product_sets( less than 1. Args: - request (google.cloud.vision_v1p3beta1.types.ListProductSetsRequest): + request (Union[google.cloud.vision_v1p3beta1.types.ListProductSetsRequest, dict]): The request object. Request message for the `ListProductSets` method. parent (str): @@ -601,7 +601,7 @@ def list_product_sets( def get_product_set( self, - request: product_search_service.GetProductSetRequest = None, + request: Union[product_search_service.GetProductSetRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -615,7 +615,7 @@ def get_product_set( - Returns NOT_FOUND if the ProductSet does not exist. Args: - request (google.cloud.vision_v1p3beta1.types.GetProductSetRequest): + request (Union[google.cloud.vision_v1p3beta1.types.GetProductSetRequest, dict]): The request object. Request message for the `GetProductSet` method. name (str): @@ -681,7 +681,7 @@ def get_product_set( def update_product_set( self, - request: product_search_service.UpdateProductSetRequest = None, + request: Union[product_search_service.UpdateProductSetRequest, dict] = None, *, product_set: product_search_service.ProductSet = None, update_mask: field_mask_pb2.FieldMask = None, @@ -700,7 +700,7 @@ def update_product_set( characters. Args: - request (google.cloud.vision_v1p3beta1.types.UpdateProductSetRequest): + request (Union[google.cloud.vision_v1p3beta1.types.UpdateProductSetRequest, dict]): The request object. Request message for the `UpdateProductSet` method. product_set (google.cloud.vision_v1p3beta1.types.ProductSet): @@ -777,7 +777,7 @@ def update_product_set( def delete_product_set( self, - request: product_search_service.DeleteProductSetRequest = None, + request: Union[product_search_service.DeleteProductSetRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -795,7 +795,7 @@ def delete_product_set( - Returns NOT_FOUND if the ProductSet does not exist. Args: - request (google.cloud.vision_v1p3beta1.types.DeleteProductSetRequest): + request (Union[google.cloud.vision_v1p3beta1.types.DeleteProductSetRequest, dict]): The request object. Request message for the `DeleteProductSet` method. name (str): @@ -851,7 +851,7 @@ def delete_product_set( def create_product( self, - request: product_search_service.CreateProductRequest = None, + request: Union[product_search_service.CreateProductRequest, dict] = None, *, parent: str = None, product: product_search_service.Product = None, @@ -872,7 +872,7 @@ def create_product( invalid. Args: - request (google.cloud.vision_v1p3beta1.types.CreateProductRequest): + request (Union[google.cloud.vision_v1p3beta1.types.CreateProductRequest, dict]): The request object. Request message for the `CreateProduct` method. parent (str): @@ -952,7 +952,7 @@ def create_product( def list_products( self, - request: product_search_service.ListProductsRequest = None, + request: Union[product_search_service.ListProductsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -967,7 +967,7 @@ def list_products( less than 1. Args: - request (google.cloud.vision_v1p3beta1.types.ListProductsRequest): + request (Union[google.cloud.vision_v1p3beta1.types.ListProductsRequest, dict]): The request object. Request message for the `ListProducts` method. parent (str): @@ -1038,7 +1038,7 @@ def list_products( def get_product( self, - request: product_search_service.GetProductRequest = None, + request: Union[product_search_service.GetProductRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1052,7 +1052,7 @@ def get_product( - Returns NOT_FOUND if the Product does not exist. Args: - request (google.cloud.vision_v1p3beta1.types.GetProductRequest): + request (Union[google.cloud.vision_v1p3beta1.types.GetProductRequest, dict]): The request object. Request message for the `GetProduct` method. name (str): @@ -1113,7 +1113,7 @@ def get_product( def update_product( self, - request: product_search_service.UpdateProductRequest = None, + request: Union[product_search_service.UpdateProductRequest, dict] = None, *, product: product_search_service.Product = None, update_mask: field_mask_pb2.FieldMask = None, @@ -1139,7 +1139,7 @@ def update_product( update_mask. Args: - request (google.cloud.vision_v1p3beta1.types.UpdateProductRequest): + request (Union[google.cloud.vision_v1p3beta1.types.UpdateProductRequest, dict]): The request object. Request message for the `UpdateProduct` method. product (google.cloud.vision_v1p3beta1.types.Product): @@ -1213,7 +1213,7 @@ def update_product( def delete_product( self, - request: product_search_service.DeleteProductRequest = None, + request: Union[product_search_service.DeleteProductRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1231,7 +1231,7 @@ def delete_product( - Returns NOT_FOUND if the product does not exist. Args: - request (google.cloud.vision_v1p3beta1.types.DeleteProductRequest): + request (Union[google.cloud.vision_v1p3beta1.types.DeleteProductRequest, dict]): The request object. Request message for the `DeleteProduct` method. name (str): @@ -1287,7 +1287,7 @@ def delete_product( def create_reference_image( self, - request: product_search_service.CreateReferenceImageRequest = None, + request: Union[product_search_service.CreateReferenceImageRequest, dict] = None, *, parent: str = None, reference_image: product_search_service.ReferenceImage = None, @@ -1320,7 +1320,7 @@ def create_reference_image( 10 polygons. Args: - request (google.cloud.vision_v1p3beta1.types.CreateReferenceImageRequest): + request (Union[google.cloud.vision_v1p3beta1.types.CreateReferenceImageRequest, dict]): The request object. Request message for the `CreateReferenceImage` method. parent (str): @@ -1406,7 +1406,7 @@ def create_reference_image( def delete_reference_image( self, - request: product_search_service.DeleteReferenceImageRequest = None, + request: Union[product_search_service.DeleteReferenceImageRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1427,7 +1427,7 @@ def delete_reference_image( - Returns NOT_FOUND if the reference image does not exist. Args: - request (google.cloud.vision_v1p3beta1.types.DeleteReferenceImageRequest): + request (Union[google.cloud.vision_v1p3beta1.types.DeleteReferenceImageRequest, dict]): The request object. Request message for the `DeleteReferenceImage` method. name (str): @@ -1485,7 +1485,7 @@ def delete_reference_image( def list_reference_images( self, - request: product_search_service.ListReferenceImagesRequest = None, + request: Union[product_search_service.ListReferenceImagesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1501,7 +1501,7 @@ def list_reference_images( 100, or less than 1. Args: - request (google.cloud.vision_v1p3beta1.types.ListReferenceImagesRequest): + request (Union[google.cloud.vision_v1p3beta1.types.ListReferenceImagesRequest, dict]): The request object. Request message for the `ListReferenceImages` method. parent (str): @@ -1573,7 +1573,7 @@ def list_reference_images( def get_reference_image( self, - request: product_search_service.GetReferenceImageRequest = None, + request: Union[product_search_service.GetReferenceImageRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1587,7 +1587,7 @@ def get_reference_image( - Returns NOT_FOUND if the specified image does not exist. Args: - request (google.cloud.vision_v1p3beta1.types.GetReferenceImageRequest): + request (Union[google.cloud.vision_v1p3beta1.types.GetReferenceImageRequest, dict]): The request object. Request message for the `GetReferenceImage` method. name (str): @@ -1652,7 +1652,9 @@ def get_reference_image( def add_product_to_product_set( self, - request: product_search_service.AddProductToProductSetRequest = None, + request: Union[ + product_search_service.AddProductToProductSetRequest, dict + ] = None, *, name: str = None, product: str = None, @@ -1671,7 +1673,7 @@ def add_product_to_product_set( exist. Args: - request (google.cloud.vision_v1p3beta1.types.AddProductToProductSetRequest): + request (Union[google.cloud.vision_v1p3beta1.types.AddProductToProductSetRequest, dict]): The request object. Request message for the `AddProductToProductSet` method. name (str): @@ -1744,7 +1746,9 @@ def add_product_to_product_set( def remove_product_from_product_set( self, - request: product_search_service.RemoveProductFromProductSetRequest = None, + request: Union[ + product_search_service.RemoveProductFromProductSetRequest, dict + ] = None, *, name: str = None, product: str = None, @@ -1760,7 +1764,7 @@ def remove_product_from_product_set( ProductSet. Args: - request (google.cloud.vision_v1p3beta1.types.RemoveProductFromProductSetRequest): + request (Union[google.cloud.vision_v1p3beta1.types.RemoveProductFromProductSetRequest, dict]): The request object. Request message for the `RemoveProductFromProductSet` method. name (str): @@ -1833,7 +1837,9 @@ def remove_product_from_product_set( def list_products_in_product_set( self, - request: product_search_service.ListProductsInProductSetRequest = None, + request: Union[ + product_search_service.ListProductsInProductSetRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1850,7 +1856,7 @@ def list_products_in_product_set( less than 1. Args: - request (google.cloud.vision_v1p3beta1.types.ListProductsInProductSetRequest): + request (Union[google.cloud.vision_v1p3beta1.types.ListProductsInProductSetRequest, dict]): The request object. Request message for the `ListProductsInProductSet` method. name (str): @@ -1927,7 +1933,7 @@ def list_products_in_product_set( def import_product_sets( self, - request: product_search_service.ImportProductSetsRequest = None, + request: Union[product_search_service.ImportProductSetsRequest, dict] = None, *, parent: str = None, input_config: product_search_service.ImportProductSetsInputConfig = None, @@ -1949,7 +1955,7 @@ def import_product_sets( [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. Args: - request (google.cloud.vision_v1p3beta1.types.ImportProductSetsRequest): + request (Union[google.cloud.vision_v1p3beta1.types.ImportProductSetsRequest, dict]): The request object. Request message for the `ImportProductSets` method. parent (str): diff --git a/google/cloud/vision_v1p3beta1/services/product_search/transports/base.py b/google/cloud/vision_v1p3beta1/services/product_search/transports/base.py index 27236a26..3a408858 100644 --- a/google/cloud/vision_v1p3beta1/services/product_search/transports/base.py +++ b/google/cloud/vision_v1p3beta1/services/product_search/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/vision_v1p3beta1/services/product_search/transports/grpc.py b/google/cloud/vision_v1p3beta1/services/product_search/transports/grpc.py index 7e939f28..a048c268 100644 --- a/google/cloud/vision_v1p3beta1/services/product_search/transports/grpc.py +++ b/google/cloud/vision_v1p3beta1/services/product_search/transports/grpc.py @@ -102,16 +102,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p3beta1/services/product_search/transports/grpc_asyncio.py b/google/cloud/vision_v1p3beta1/services/product_search/transports/grpc_asyncio.py index 73d7d750..cd9326a6 100644 --- a/google/cloud/vision_v1p3beta1/services/product_search/transports/grpc_asyncio.py +++ b/google/cloud/vision_v1p3beta1/services/product_search/transports/grpc_asyncio.py @@ -149,16 +149,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p4beta1/services/image_annotator/client.py b/google/cloud/vision_v1p4beta1/services/image_annotator/client.py index e6ea5cf0..c55a79e6 100644 --- a/google/cloud/vision_v1p4beta1/services/image_annotator/client.py +++ b/google/cloud/vision_v1p4beta1/services/image_annotator/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -373,7 +373,7 @@ def __init__( def batch_annotate_images( self, - request: image_annotator.BatchAnnotateImagesRequest = None, + request: Union[image_annotator.BatchAnnotateImagesRequest, dict] = None, *, requests: Sequence[image_annotator.AnnotateImageRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -384,7 +384,7 @@ def batch_annotate_images( images. Args: - request (google.cloud.vision_v1p4beta1.types.BatchAnnotateImagesRequest): + request (Union[google.cloud.vision_v1p4beta1.types.BatchAnnotateImagesRequest, dict]): The request object. Multiple image annotation requests are batched into a single service call. requests (Sequence[google.cloud.vision_v1p4beta1.types.AnnotateImageRequest]): @@ -442,7 +442,7 @@ def batch_annotate_images( def batch_annotate_files( self, - request: image_annotator.BatchAnnotateFilesRequest = None, + request: Union[image_annotator.BatchAnnotateFilesRequest, dict] = None, *, requests: Sequence[image_annotator.AnnotateFileRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -459,7 +459,7 @@ def batch_annotate_files( extracted. Args: - request (google.cloud.vision_v1p4beta1.types.BatchAnnotateFilesRequest): + request (Union[google.cloud.vision_v1p4beta1.types.BatchAnnotateFilesRequest, dict]): The request object. A list of requests to annotate files using the BatchAnnotateFiles API. requests (Sequence[google.cloud.vision_v1p4beta1.types.AnnotateFileRequest]): @@ -517,7 +517,7 @@ def batch_annotate_files( def async_batch_annotate_images( self, - request: image_annotator.AsyncBatchAnnotateImagesRequest = None, + request: Union[image_annotator.AsyncBatchAnnotateImagesRequest, dict] = None, *, requests: Sequence[image_annotator.AnnotateImageRequest] = None, output_config: image_annotator.OutputConfig = None, @@ -539,7 +539,7 @@ def async_batch_annotate_images( BatchAnnotateImagesResponse proto. Args: - request (google.cloud.vision_v1p4beta1.types.AsyncBatchAnnotateImagesRequest): + request (Union[google.cloud.vision_v1p4beta1.types.AsyncBatchAnnotateImagesRequest, dict]): The request object. Request for async image annotation for a list of images. requests (Sequence[google.cloud.vision_v1p4beta1.types.AnnotateImageRequest]): @@ -619,7 +619,7 @@ def async_batch_annotate_images( def async_batch_annotate_files( self, - request: image_annotator.AsyncBatchAnnotateFilesRequest = None, + request: Union[image_annotator.AsyncBatchAnnotateFilesRequest, dict] = None, *, requests: Sequence[image_annotator.AsyncAnnotateFileRequest] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -635,7 +635,7 @@ def async_batch_annotate_files( ``AsyncBatchAnnotateFilesResponse`` (results). Args: - request (google.cloud.vision_v1p4beta1.types.AsyncBatchAnnotateFilesRequest): + request (Union[google.cloud.vision_v1p4beta1.types.AsyncBatchAnnotateFilesRequest, dict]): The request object. Multiple async file annotation requests are batched into a single service call. requests (Sequence[google.cloud.vision_v1p4beta1.types.AsyncAnnotateFileRequest]): diff --git a/google/cloud/vision_v1p4beta1/services/image_annotator/transports/base.py b/google/cloud/vision_v1p4beta1/services/image_annotator/transports/base.py index 7856f3a7..77795b1e 100644 --- a/google/cloud/vision_v1p4beta1/services/image_annotator/transports/base.py +++ b/google/cloud/vision_v1p4beta1/services/image_annotator/transports/base.py @@ -120,7 +120,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/vision_v1p4beta1/services/image_annotator/transports/grpc.py b/google/cloud/vision_v1p4beta1/services/image_annotator/transports/grpc.py index 50705cfe..2552c528 100644 --- a/google/cloud/vision_v1p4beta1/services/image_annotator/transports/grpc.py +++ b/google/cloud/vision_v1p4beta1/services/image_annotator/transports/grpc.py @@ -85,16 +85,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p4beta1/services/image_annotator/transports/grpc_asyncio.py b/google/cloud/vision_v1p4beta1/services/image_annotator/transports/grpc_asyncio.py index b36093d2..e9a08482 100644 --- a/google/cloud/vision_v1p4beta1/services/image_annotator/transports/grpc_asyncio.py +++ b/google/cloud/vision_v1p4beta1/services/image_annotator/transports/grpc_asyncio.py @@ -132,16 +132,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p4beta1/services/product_search/client.py b/google/cloud/vision_v1p4beta1/services/product_search/client.py index 81373163..d49f5449 100644 --- a/google/cloud/vision_v1p4beta1/services/product_search/client.py +++ b/google/cloud/vision_v1p4beta1/services/product_search/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -414,7 +414,7 @@ def __init__( def create_product_set( self, - request: product_search_service.CreateProductSetRequest = None, + request: Union[product_search_service.CreateProductSetRequest, dict] = None, *, parent: str = None, product_set: product_search_service.ProductSet = None, @@ -431,7 +431,7 @@ def create_product_set( longer than 4096 characters. Args: - request (google.cloud.vision_v1p4beta1.types.CreateProductSetRequest): + request (Union[google.cloud.vision_v1p4beta1.types.CreateProductSetRequest, dict]): The request object. Request message for the `CreateProductSet` method. parent (str): @@ -516,7 +516,7 @@ def create_product_set( def list_product_sets( self, - request: product_search_service.ListProductSetsRequest = None, + request: Union[product_search_service.ListProductSetsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -531,7 +531,7 @@ def list_product_sets( less than 1. Args: - request (google.cloud.vision_v1p4beta1.types.ListProductSetsRequest): + request (Union[google.cloud.vision_v1p4beta1.types.ListProductSetsRequest, dict]): The request object. Request message for the `ListProductSets` method. parent (str): @@ -602,7 +602,7 @@ def list_product_sets( def get_product_set( self, - request: product_search_service.GetProductSetRequest = None, + request: Union[product_search_service.GetProductSetRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -616,7 +616,7 @@ def get_product_set( - Returns NOT_FOUND if the ProductSet does not exist. Args: - request (google.cloud.vision_v1p4beta1.types.GetProductSetRequest): + request (Union[google.cloud.vision_v1p4beta1.types.GetProductSetRequest, dict]): The request object. Request message for the `GetProductSet` method. name (str): @@ -682,7 +682,7 @@ def get_product_set( def update_product_set( self, - request: product_search_service.UpdateProductSetRequest = None, + request: Union[product_search_service.UpdateProductSetRequest, dict] = None, *, product_set: product_search_service.ProductSet = None, update_mask: field_mask_pb2.FieldMask = None, @@ -701,7 +701,7 @@ def update_product_set( characters. Args: - request (google.cloud.vision_v1p4beta1.types.UpdateProductSetRequest): + request (Union[google.cloud.vision_v1p4beta1.types.UpdateProductSetRequest, dict]): The request object. Request message for the `UpdateProductSet` method. product_set (google.cloud.vision_v1p4beta1.types.ProductSet): @@ -778,7 +778,7 @@ def update_product_set( def delete_product_set( self, - request: product_search_service.DeleteProductSetRequest = None, + request: Union[product_search_service.DeleteProductSetRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -791,7 +791,7 @@ def delete_product_set( Storage. Args: - request (google.cloud.vision_v1p4beta1.types.DeleteProductSetRequest): + request (Union[google.cloud.vision_v1p4beta1.types.DeleteProductSetRequest, dict]): The request object. Request message for the `DeleteProductSet` method. name (str): @@ -847,7 +847,7 @@ def delete_product_set( def create_product( self, - request: product_search_service.CreateProductRequest = None, + request: Union[product_search_service.CreateProductRequest, dict] = None, *, parent: str = None, product: product_search_service.Product = None, @@ -868,7 +868,7 @@ def create_product( invalid. Args: - request (google.cloud.vision_v1p4beta1.types.CreateProductRequest): + request (Union[google.cloud.vision_v1p4beta1.types.CreateProductRequest, dict]): The request object. Request message for the `CreateProduct` method. parent (str): @@ -948,7 +948,7 @@ def create_product( def list_products( self, - request: product_search_service.ListProductsRequest = None, + request: Union[product_search_service.ListProductsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -963,7 +963,7 @@ def list_products( less than 1. Args: - request (google.cloud.vision_v1p4beta1.types.ListProductsRequest): + request (Union[google.cloud.vision_v1p4beta1.types.ListProductsRequest, dict]): The request object. Request message for the `ListProducts` method. parent (str): @@ -1034,7 +1034,7 @@ def list_products( def get_product( self, - request: product_search_service.GetProductRequest = None, + request: Union[product_search_service.GetProductRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1048,7 +1048,7 @@ def get_product( - Returns NOT_FOUND if the Product does not exist. Args: - request (google.cloud.vision_v1p4beta1.types.GetProductRequest): + request (Union[google.cloud.vision_v1p4beta1.types.GetProductRequest, dict]): The request object. Request message for the `GetProduct` method. name (str): @@ -1109,7 +1109,7 @@ def get_product( def update_product( self, - request: product_search_service.UpdateProductRequest = None, + request: Union[product_search_service.UpdateProductRequest, dict] = None, *, product: product_search_service.Product = None, update_mask: field_mask_pb2.FieldMask = None, @@ -1135,7 +1135,7 @@ def update_product( update_mask. Args: - request (google.cloud.vision_v1p4beta1.types.UpdateProductRequest): + request (Union[google.cloud.vision_v1p4beta1.types.UpdateProductRequest, dict]): The request object. Request message for the `UpdateProduct` method. product (google.cloud.vision_v1p4beta1.types.Product): @@ -1209,7 +1209,7 @@ def update_product( def delete_product( self, - request: product_search_service.DeleteProductRequest = None, + request: Union[product_search_service.DeleteProductRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1224,7 +1224,7 @@ def delete_product( all related caches are refreshed. Args: - request (google.cloud.vision_v1p4beta1.types.DeleteProductRequest): + request (Union[google.cloud.vision_v1p4beta1.types.DeleteProductRequest, dict]): The request object. Request message for the `DeleteProduct` method. name (str): @@ -1280,7 +1280,7 @@ def delete_product( def create_reference_image( self, - request: product_search_service.CreateReferenceImageRequest = None, + request: Union[product_search_service.CreateReferenceImageRequest, dict] = None, *, parent: str = None, reference_image: product_search_service.ReferenceImage = None, @@ -1313,7 +1313,7 @@ def create_reference_image( 10 polygons. Args: - request (google.cloud.vision_v1p4beta1.types.CreateReferenceImageRequest): + request (Union[google.cloud.vision_v1p4beta1.types.CreateReferenceImageRequest, dict]): The request object. Request message for the `CreateReferenceImage` method. parent (str): @@ -1399,7 +1399,7 @@ def create_reference_image( def delete_reference_image( self, - request: product_search_service.DeleteReferenceImageRequest = None, + request: Union[product_search_service.DeleteReferenceImageRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1415,7 +1415,7 @@ def delete_reference_image( Storage. Args: - request (google.cloud.vision_v1p4beta1.types.DeleteReferenceImageRequest): + request (Union[google.cloud.vision_v1p4beta1.types.DeleteReferenceImageRequest, dict]): The request object. Request message for the `DeleteReferenceImage` method. name (str): @@ -1473,7 +1473,7 @@ def delete_reference_image( def list_reference_images( self, - request: product_search_service.ListReferenceImagesRequest = None, + request: Union[product_search_service.ListReferenceImagesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1489,7 +1489,7 @@ def list_reference_images( 100, or less than 1. Args: - request (google.cloud.vision_v1p4beta1.types.ListReferenceImagesRequest): + request (Union[google.cloud.vision_v1p4beta1.types.ListReferenceImagesRequest, dict]): The request object. Request message for the `ListReferenceImages` method. parent (str): @@ -1561,7 +1561,7 @@ def list_reference_images( def get_reference_image( self, - request: product_search_service.GetReferenceImageRequest = None, + request: Union[product_search_service.GetReferenceImageRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1575,7 +1575,7 @@ def get_reference_image( - Returns NOT_FOUND if the specified image does not exist. Args: - request (google.cloud.vision_v1p4beta1.types.GetReferenceImageRequest): + request (Union[google.cloud.vision_v1p4beta1.types.GetReferenceImageRequest, dict]): The request object. Request message for the `GetReferenceImage` method. name (str): @@ -1640,7 +1640,9 @@ def get_reference_image( def add_product_to_product_set( self, - request: product_search_service.AddProductToProductSetRequest = None, + request: Union[ + product_search_service.AddProductToProductSetRequest, dict + ] = None, *, name: str = None, product: str = None, @@ -1659,7 +1661,7 @@ def add_product_to_product_set( exist. Args: - request (google.cloud.vision_v1p4beta1.types.AddProductToProductSetRequest): + request (Union[google.cloud.vision_v1p4beta1.types.AddProductToProductSetRequest, dict]): The request object. Request message for the `AddProductToProductSet` method. name (str): @@ -1732,7 +1734,9 @@ def add_product_to_product_set( def remove_product_from_product_set( self, - request: product_search_service.RemoveProductFromProductSetRequest = None, + request: Union[ + product_search_service.RemoveProductFromProductSetRequest, dict + ] = None, *, name: str = None, product: str = None, @@ -1743,7 +1747,7 @@ def remove_product_from_product_set( r"""Removes a Product from the specified ProductSet. Args: - request (google.cloud.vision_v1p4beta1.types.RemoveProductFromProductSetRequest): + request (Union[google.cloud.vision_v1p4beta1.types.RemoveProductFromProductSetRequest, dict]): The request object. Request message for the `RemoveProductFromProductSet` method. name (str): @@ -1816,7 +1820,9 @@ def remove_product_from_product_set( def list_products_in_product_set( self, - request: product_search_service.ListProductsInProductSetRequest = None, + request: Union[ + product_search_service.ListProductsInProductSetRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1833,7 +1839,7 @@ def list_products_in_product_set( less than 1. Args: - request (google.cloud.vision_v1p4beta1.types.ListProductsInProductSetRequest): + request (Union[google.cloud.vision_v1p4beta1.types.ListProductsInProductSetRequest, dict]): The request object. Request message for the `ListProductsInProductSet` method. name (str): @@ -1910,7 +1916,7 @@ def list_products_in_product_set( def import_product_sets( self, - request: product_search_service.ImportProductSetsRequest = None, + request: Union[product_search_service.ImportProductSetsRequest, dict] = None, *, parent: str = None, input_config: product_search_service.ImportProductSetsInputConfig = None, @@ -1932,7 +1938,7 @@ def import_product_sets( [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. Args: - request (google.cloud.vision_v1p4beta1.types.ImportProductSetsRequest): + request (Union[google.cloud.vision_v1p4beta1.types.ImportProductSetsRequest, dict]): The request object. Request message for the `ImportProductSets` method. parent (str): @@ -2021,7 +2027,7 @@ def import_product_sets( def purge_products( self, - request: product_search_service.PurgeProductsRequest = None, + request: Union[product_search_service.PurgeProductsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -2057,7 +2063,7 @@ def purge_products( ``BatchOperationMetadata``. (progress) Args: - request (google.cloud.vision_v1p4beta1.types.PurgeProductsRequest): + request (Union[google.cloud.vision_v1p4beta1.types.PurgeProductsRequest, dict]): The request object. Request message for the `PurgeProducts` method. parent (str): diff --git a/google/cloud/vision_v1p4beta1/services/product_search/transports/base.py b/google/cloud/vision_v1p4beta1/services/product_search/transports/base.py index ca8b67fc..306075e1 100644 --- a/google/cloud/vision_v1p4beta1/services/product_search/transports/base.py +++ b/google/cloud/vision_v1p4beta1/services/product_search/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/vision_v1p4beta1/services/product_search/transports/grpc.py b/google/cloud/vision_v1p4beta1/services/product_search/transports/grpc.py index 53faa56c..2d593894 100644 --- a/google/cloud/vision_v1p4beta1/services/product_search/transports/grpc.py +++ b/google/cloud/vision_v1p4beta1/services/product_search/transports/grpc.py @@ -102,16 +102,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/vision_v1p4beta1/services/product_search/transports/grpc_asyncio.py b/google/cloud/vision_v1p4beta1/services/product_search/transports/grpc_asyncio.py index 53ec0340..78cb7f81 100644 --- a/google/cloud/vision_v1p4beta1/services/product_search/transports/grpc_asyncio.py +++ b/google/cloud/vision_v1p4beta1/services/product_search/transports/grpc_asyncio.py @@ -149,16 +149,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. From 30e779676740ee6982d0399aaca154cf80cac142 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 14:20:11 +0000 Subject: [PATCH 22/22] chore: release 2.4.3 (#237) :robot: I have created a release \*beep\* \*boop\* --- ### [2.4.3](https://www.github.com/googleapis/python-vision/compare/v2.4.2...v2.4.3) (2021-09-27) ### Bug Fixes * add 'dict' annotation type to 'request' ([87ad0ea](https://www.github.com/googleapis/python-vision/commit/87ad0eabbba08754320fd836c5e76fba48222b5c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7934c45c..0cc849ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-vision/#history +### [2.4.3](https://www.github.com/googleapis/python-vision/compare/v2.4.2...v2.4.3) (2021-09-27) + + +### Bug Fixes + +* add 'dict' annotation type to 'request' ([87ad0ea](https://www.github.com/googleapis/python-vision/commit/87ad0eabbba08754320fd836c5e76fba48222b5c)) + ### [2.4.2](https://www.github.com/googleapis/python-vision/compare/v2.4.1...v2.4.2) (2021-07-29) diff --git a/setup.py b/setup.py index 78c8653d..eb3e2a87 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ name = "google-cloud-vision" description = "Cloud Vision API API client library" -version = "2.4.2" +version = "2.4.3" release_status = "Development Status :: 5 - Production/Stable" dependencies = [ # NOTE: Maintainers, please do not require google-api-core>=2.x.x