From 36d349d0514da2e3f9fa62fd1e6315f7c571bda4 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:55:22 +0000 Subject: [PATCH 01/11] chore(python): avoid `.nox` directories when building docs (#55) 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 9ee60f7..b771c37 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:a1a891041baa4ffbe1a809ac1b8b9b4a71887293c9101c88e8e255943c5aec2d diff --git a/docs/conf.py b/docs/conf.py index 56e6daa..4714779 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 1c68a6c7280f509b7be487e76de6f09654cd1cd7 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:06:40 -0400 Subject: [PATCH 02/11] chore: drop mention of Python 2.7 from templates (#56) 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 +++++++++--- scripts/readme-gen/templates/install_deps.tmpl.rst | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b771c37..a9fcd07 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 03aa2f5..2bf3ffd 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/scripts/readme-gen/templates/install_deps.tmpl.rst b/scripts/readme-gen/templates/install_deps.tmpl.rst index a0406db..275d649 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 9e1e8499e927792e0ef2fd52a9fcc7cce5d78a68 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Wed, 18 Aug 2021 07:40:25 -0600 Subject: [PATCH 03/11] chore: generate python samples templates in owlbot.py (#57) Generate python samples templates in owlbot.py --- owlbot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/owlbot.py b/owlbot.py index aa75576..aed3c79 100644 --- a/owlbot.py +++ b/owlbot.py @@ -34,6 +34,7 @@ # ---------------------------------------------------------------------------- templated_files = common.py_library(cov_level=98, microgenerator=True) +python.py_samples(skip_readmes=True) # the microgenerator has a good coveragerc file excludes = [".coveragerc"] From 05aedeb2f7c8c65af8c3698c54c88bf2b1d5185e Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 27 Aug 2021 17:15:06 -0400 Subject: [PATCH 04/11] chore: migrate default branch from master to main (#59) --- .kokoro/build.sh | 2 +- .kokoro/test-samples-impl.sh | 2 +- CONTRIBUTING.rst | 12 ++++---- docs/conf.py | 10 +++---- owlbot.py | 57 +++++++++++++++++++++++++++++++++++- 5 files changed, 69 insertions(+), 14 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index d189781..81bfcf0 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 311a8d5..8a324c9 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 af149fe..7a68bc5 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-api-gateway # repository into your local repository. $ git remote add upstream git@github.com:googleapis/python-api-gateway.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-api-gateway``. 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-api-gateway/blob/master/CONTRIBUTING.rst``) +``https://github.com/googleapis/python-api-gateway/blob/main/CONTRIBUTING.rst``) may cause problems creating links or rendering the description. .. _description on PyPI: https://pypi.org/project/google-cloud-api-gateway @@ -234,7 +234,7 @@ We support: Supported versions can be found in our ``noxfile.py`` `config`_. -.. _config: https://github.com/googleapis/python-api-gateway/blob/master/noxfile.py +.. _config: https://github.com/googleapis/python-api-gateway/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 4714779..0f44f74 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-api-gateway" @@ -280,7 +280,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ ( - master_doc, + root_doc, "google-cloud-api-gateway.tex", "google-cloud-api-gateway Documentation", author, @@ -315,7 +315,7 @@ # (source start file, name, description, authors, manual section). man_pages = [ ( - master_doc, + root_doc, "google-cloud-api-gateway", "google-cloud-api-gateway Documentation", [author], @@ -334,7 +334,7 @@ # dir menu entry, description, category) texinfo_documents = [ ( - master_doc, + root_doc, "google-cloud-api-gateway", "google-cloud-api-gateway Documentation", author, diff --git a/owlbot.py b/owlbot.py index aed3c79..d7bbc68 100644 --- a/owlbot.py +++ b/owlbot.py @@ -34,7 +34,6 @@ # ---------------------------------------------------------------------------- templated_files = common.py_library(cov_level=98, microgenerator=True) -python.py_samples(skip_readmes=True) # the microgenerator has a good coveragerc file excludes = [".coveragerc"] @@ -42,4 +41,60 @@ templated_files, excludes=excludes ) +python.py_samples(skip_readmes=True) + +# 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_doc", + "root_doc", +) + +s.replace( + "docs/conf.py", + "# The master toctree document.", + "# The root toctree document.", +) + s.shell.run(["nox", "-s", "blacken"], hide_output=False) \ No newline at end of file From 3091d0ed0e446bdb545dac12558b1ead202ac4d2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 30 Aug 2021 15:26:50 +0000 Subject: [PATCH 05/11] chore(python): disable dependency dashboard (#60) --- .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 a9fcd07..b75186c 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 c048955..9fa8816 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 b35b973fe188227b8d40d535e96b5921a224ae92 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 15:46:25 +0000 Subject: [PATCH 06/11] chore(python): group renovate prs (#61) --- .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 b75186c..ef3cb34 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 9fa8816..c21036d 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,7 @@ { "extends": [ "config:base", + "group:all", ":preserveSemverRanges", ":disableDependencyDashboard" ], From 07ce692cded19888ade835addb56c3676525a277 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 2 Sep 2021 15:04:18 -0400 Subject: [PATCH 07/11] chore(python): rename default branch to main (#62) * chore(python): rename default branch to main Source-Link: https://github.com/googleapis/synthtool/commit/5c0fa62eea9c33ebe61e582424b659eb264e1ba4 Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:0ffe3bdd6c7159692df5f7744da74e5ef19966288a6bf76023e8e04e0c424d7d * chore: remove obsolete replacements in owlbot.py Co-authored-by: Owl Bot Co-authored-by: Nick Cain --- .github/.OwlBot.lock.yaml | 2 +- CONTRIBUTING.rst | 6 ++--- owlbot.py | 54 --------------------------------------- 3 files changed, 4 insertions(+), 58 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index ef3cb34..c07f148 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 7a68bc5..dba09f3 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-api-gateway``. 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-api-gateway``. 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 d7bbc68..bb59c73 100644 --- a/owlbot.py +++ b/owlbot.py @@ -43,58 +43,4 @@ python.py_samples(skip_readmes=True) -# 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_doc", - "root_doc", -) - -s.replace( - "docs/conf.py", - "# The master toctree document.", - "# The root toctree document.", -) - s.shell.run(["nox", "-s", "blacken"], hide_output=False) \ No newline at end of file From 968f35c848c13ce16dd77aef9930e99df7ee4414 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Tue, 7 Sep 2021 10:37:35 -0600 Subject: [PATCH 08/11] chore: reference main branch of google-cloud-python (#64) --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index cd22ae8..b37e7ce 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ means you can better manage cost. - `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-api-gateway.svg :target: https://pypi.org/project/google-cloud-api-gateway/ .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-api-gateway.svg @@ -83,4 +83,4 @@ Next Steps APIs that we cover. .. _API Gateway Product documentation: https://cloud.google.com/api-gateway/docs -.. _README: https://github.com/googleapis/google-cloud-python/blob/master/README.rst +.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst From b7471657e8f9889fe75ff73db6e9e7a342a41996 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Tue, 21 Sep 2021 12:40:27 -0700 Subject: [PATCH 09/11] chore: relocate owl bot post processor (#66) 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 c07f148..2567653 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 + image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest + digest: sha256:87eee22d276554e4e52863ec9b1cb6a7245815dfae20439712bf644348215a5a diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 6b4e87f..1b4c3be 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 39ee308769c9d999acca90c5ac56e4cd5806c822 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 24 Sep 2021 16:02:19 +0000 Subject: [PATCH 10/11] chore: use gapic-generator-python 0.51.2 (#67) - [ ] 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/api_gateway_service/client.py | 62 +++++++++---------- .../api_gateway_service/transports/base.py | 2 +- .../api_gateway_service/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- scripts/fixup_apigateway_v1_keywords.py | 32 +++++----- 5 files changed, 54 insertions(+), 54 deletions(-) diff --git a/google/cloud/apigateway_v1/services/api_gateway_service/client.py b/google/cloud/apigateway_v1/services/api_gateway_service/client.py index c4eb0d0..f098d0f 100644 --- a/google/cloud/apigateway_v1/services/api_gateway_service/client.py +++ b/google/cloud/apigateway_v1/services/api_gateway_service/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 @@ -432,7 +432,7 @@ def __init__( def list_gateways( self, - request: apigateway.ListGatewaysRequest = None, + request: Union[apigateway.ListGatewaysRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -442,7 +442,7 @@ def list_gateways( r"""Lists Gateways in a given project and location. Args: - request (google.cloud.apigateway_v1.types.ListGatewaysRequest): + request (Union[google.cloud.apigateway_v1.types.ListGatewaysRequest, dict]): The request object. Request message for ApiGatewayService.ListGateways parent (str): @@ -512,7 +512,7 @@ def list_gateways( def get_gateway( self, - request: apigateway.GetGatewayRequest = None, + request: Union[apigateway.GetGatewayRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -522,7 +522,7 @@ def get_gateway( r"""Gets details of a single Gateway. Args: - request (google.cloud.apigateway_v1.types.GetGatewayRequest): + request (Union[google.cloud.apigateway_v1.types.GetGatewayRequest, dict]): The request object. Request message for ApiGatewayService.GetGateway name (str): @@ -587,7 +587,7 @@ def get_gateway( def create_gateway( self, - request: apigateway.CreateGatewayRequest = None, + request: Union[apigateway.CreateGatewayRequest, dict] = None, *, parent: str = None, gateway: apigateway.Gateway = None, @@ -600,7 +600,7 @@ def create_gateway( location. Args: - request (google.cloud.apigateway_v1.types.CreateGatewayRequest): + request (Union[google.cloud.apigateway_v1.types.CreateGatewayRequest, dict]): The request object. Request message for ApiGatewayService.CreateGateway parent (str): @@ -690,7 +690,7 @@ def create_gateway( def update_gateway( self, - request: apigateway.UpdateGatewayRequest = None, + request: Union[apigateway.UpdateGatewayRequest, dict] = None, *, gateway: apigateway.Gateway = None, update_mask: field_mask_pb2.FieldMask = None, @@ -701,7 +701,7 @@ def update_gateway( r"""Updates the parameters of a single Gateway. Args: - request (google.cloud.apigateway_v1.types.UpdateGatewayRequest): + request (Union[google.cloud.apigateway_v1.types.UpdateGatewayRequest, dict]): The request object. Request message for ApiGatewayService.UpdateGateway gateway (google.cloud.apigateway_v1.types.Gateway): @@ -787,7 +787,7 @@ def update_gateway( def delete_gateway( self, - request: apigateway.DeleteGatewayRequest = None, + request: Union[apigateway.DeleteGatewayRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -797,7 +797,7 @@ def delete_gateway( r"""Deletes a single Gateway. Args: - request (google.cloud.apigateway_v1.types.DeleteGatewayRequest): + request (Union[google.cloud.apigateway_v1.types.DeleteGatewayRequest, dict]): The request object. Request message for ApiGatewayService.DeleteGateway name (str): @@ -879,7 +879,7 @@ def delete_gateway( def list_apis( self, - request: apigateway.ListApisRequest = None, + request: Union[apigateway.ListApisRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -889,7 +889,7 @@ def list_apis( r"""Lists Apis in a given project and location. Args: - request (google.cloud.apigateway_v1.types.ListApisRequest): + request (Union[google.cloud.apigateway_v1.types.ListApisRequest, dict]): The request object. Request message for ApiGatewayService.ListApis parent (str): @@ -959,7 +959,7 @@ def list_apis( def get_api( self, - request: apigateway.GetApiRequest = None, + request: Union[apigateway.GetApiRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -969,7 +969,7 @@ def get_api( r"""Gets details of a single Api. Args: - request (google.cloud.apigateway_v1.types.GetApiRequest): + request (Union[google.cloud.apigateway_v1.types.GetApiRequest, dict]): The request object. Request message for ApiGatewayService.GetApi name (str): @@ -1030,7 +1030,7 @@ def get_api( def create_api( self, - request: apigateway.CreateApiRequest = None, + request: Union[apigateway.CreateApiRequest, dict] = None, *, parent: str = None, api: apigateway.Api = None, @@ -1042,7 +1042,7 @@ def create_api( r"""Creates a new Api in a given project and location. Args: - request (google.cloud.apigateway_v1.types.CreateApiRequest): + request (Union[google.cloud.apigateway_v1.types.CreateApiRequest, dict]): The request object. Request message for ApiGatewayService.CreateApi parent (str): @@ -1131,7 +1131,7 @@ def create_api( def update_api( self, - request: apigateway.UpdateApiRequest = None, + request: Union[apigateway.UpdateApiRequest, dict] = None, *, api: apigateway.Api = None, update_mask: field_mask_pb2.FieldMask = None, @@ -1142,7 +1142,7 @@ def update_api( r"""Updates the parameters of a single Api. Args: - request (google.cloud.apigateway_v1.types.UpdateApiRequest): + request (Union[google.cloud.apigateway_v1.types.UpdateApiRequest, dict]): The request object. Request message for ApiGatewayService.UpdateApi api (google.cloud.apigateway_v1.types.Api): @@ -1225,7 +1225,7 @@ def update_api( def delete_api( self, - request: apigateway.DeleteApiRequest = None, + request: Union[apigateway.DeleteApiRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1235,7 +1235,7 @@ def delete_api( r"""Deletes a single Api. Args: - request (google.cloud.apigateway_v1.types.DeleteApiRequest): + request (Union[google.cloud.apigateway_v1.types.DeleteApiRequest, dict]): The request object. Request message for ApiGatewayService.DeleteApi name (str): @@ -1317,7 +1317,7 @@ def delete_api( def list_api_configs( self, - request: apigateway.ListApiConfigsRequest = None, + request: Union[apigateway.ListApiConfigsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1327,7 +1327,7 @@ def list_api_configs( r"""Lists ApiConfigs in a given project and location. Args: - request (google.cloud.apigateway_v1.types.ListApiConfigsRequest): + request (Union[google.cloud.apigateway_v1.types.ListApiConfigsRequest, dict]): The request object. Request message for ApiGatewayService.ListApiConfigs parent (str): @@ -1397,7 +1397,7 @@ def list_api_configs( def get_api_config( self, - request: apigateway.GetApiConfigRequest = None, + request: Union[apigateway.GetApiConfigRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1407,7 +1407,7 @@ def get_api_config( r"""Gets details of a single ApiConfig. Args: - request (google.cloud.apigateway_v1.types.GetApiConfigRequest): + request (Union[google.cloud.apigateway_v1.types.GetApiConfigRequest, dict]): The request object. Request message for ApiGatewayService.GetApiConfig name (str): @@ -1469,7 +1469,7 @@ def get_api_config( def create_api_config( self, - request: apigateway.CreateApiConfigRequest = None, + request: Union[apigateway.CreateApiConfigRequest, dict] = None, *, parent: str = None, api_config: apigateway.ApiConfig = None, @@ -1482,7 +1482,7 @@ def create_api_config( location. Args: - request (google.cloud.apigateway_v1.types.CreateApiConfigRequest): + request (Union[google.cloud.apigateway_v1.types.CreateApiConfigRequest, dict]): The request object. Request message for ApiGatewayService.CreateApiConfig parent (str): @@ -1570,7 +1570,7 @@ def create_api_config( def update_api_config( self, - request: apigateway.UpdateApiConfigRequest = None, + request: Union[apigateway.UpdateApiConfigRequest, dict] = None, *, api_config: apigateway.ApiConfig = None, update_mask: field_mask_pb2.FieldMask = None, @@ -1581,7 +1581,7 @@ def update_api_config( r"""Updates the parameters of a single ApiConfig. Args: - request (google.cloud.apigateway_v1.types.UpdateApiConfigRequest): + request (Union[google.cloud.apigateway_v1.types.UpdateApiConfigRequest, dict]): The request object. Request message for ApiGatewayService.UpdateApiConfig api_config (google.cloud.apigateway_v1.types.ApiConfig): @@ -1665,7 +1665,7 @@ def update_api_config( def delete_api_config( self, - request: apigateway.DeleteApiConfigRequest = None, + request: Union[apigateway.DeleteApiConfigRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1675,7 +1675,7 @@ def delete_api_config( r"""Deletes a single ApiConfig. Args: - request (google.cloud.apigateway_v1.types.DeleteApiConfigRequest): + request (Union[google.cloud.apigateway_v1.types.DeleteApiConfigRequest, dict]): The request object. Request message for ApiGatewayService.DeleteApiConfig name (str): diff --git a/google/cloud/apigateway_v1/services/api_gateway_service/transports/base.py b/google/cloud/apigateway_v1/services/api_gateway_service/transports/base.py index ca3bb7b..a38e763 100644 --- a/google/cloud/apigateway_v1/services/api_gateway_service/transports/base.py +++ b/google/cloud/apigateway_v1/services/api_gateway_service/transports/base.py @@ -119,7 +119,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/apigateway_v1/services/api_gateway_service/transports/grpc.py b/google/cloud/apigateway_v1/services/api_gateway_service/transports/grpc.py index 39004f1..576f040 100644 --- a/google/cloud/apigateway_v1/services/api_gateway_service/transports/grpc.py +++ b/google/cloud/apigateway_v1/services/api_gateway_service/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/apigateway_v1/services/api_gateway_service/transports/grpc_asyncio.py b/google/cloud/apigateway_v1/services/api_gateway_service/transports/grpc_asyncio.py index a802a9a..442676e 100644 --- a/google/cloud/apigateway_v1/services/api_gateway_service/transports/grpc_asyncio.py +++ b/google/cloud/apigateway_v1/services/api_gateway_service/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/scripts/fixup_apigateway_v1_keywords.py b/scripts/fixup_apigateway_v1_keywords.py index 893aa60..8e4dc2d 100644 --- a/scripts/fixup_apigateway_v1_keywords.py +++ b/scripts/fixup_apigateway_v1_keywords.py @@ -39,21 +39,21 @@ def partition( class apigatewayCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_api': ('parent', 'api_id', 'api', ), - 'create_api_config': ('parent', 'api_config_id', 'api_config', ), - 'create_gateway': ('parent', 'gateway_id', 'gateway', ), - 'delete_api': ('name', ), - 'delete_api_config': ('name', ), - 'delete_gateway': ('name', ), - 'get_api': ('name', ), - 'get_api_config': ('name', 'view', ), - 'get_gateway': ('name', ), - 'list_api_configs': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), - 'list_apis': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), - 'list_gateways': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), - 'update_api': ('api', 'update_mask', ), - 'update_api_config': ('api_config', 'update_mask', ), - 'update_gateway': ('gateway', 'update_mask', ), + 'create_api': ('parent', 'api_id', 'api', ), + 'create_api_config': ('parent', 'api_config_id', 'api_config', ), + 'create_gateway': ('parent', 'gateway_id', 'gateway', ), + 'delete_api': ('name', ), + 'delete_api_config': ('name', ), + 'delete_gateway': ('name', ), + 'get_api': ('name', ), + 'get_api_config': ('name', 'view', ), + 'get_gateway': ('name', ), + 'list_api_configs': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), + 'list_apis': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), + 'list_gateways': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), + 'update_api': ('api', 'update_mask', ), + 'update_api_config': ('api_config', 'update_mask', ), + 'update_gateway': ('gateway', 'update_mask', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -72,7 +72,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs ) From 1542b05152654384a4d67c39282ce6cd374b18df Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 15:14:14 +0000 Subject: [PATCH 11/11] chore: release 1.0.4 (#68) :robot: I have created a release \*beep\* \*boop\* --- ### [1.0.4](https://www.github.com/googleapis/python-api-gateway/compare/v1.0.3...v1.0.4) (2021-09-24) ### Bug Fixes * add 'dict' annotation type to 'request' ([39ee308](https://www.github.com/googleapis/python-api-gateway/commit/39ee308769c9d999acca90c5ac56e4cd5806c822)) --- 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 01ab959..512fb77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.4](https://www.github.com/googleapis/python-api-gateway/compare/v1.0.3...v1.0.4) (2021-09-24) + + +### Bug Fixes + +* add 'dict' annotation type to 'request' ([39ee308](https://www.github.com/googleapis/python-api-gateway/commit/39ee308769c9d999acca90c5ac56e4cd5806c822)) + ### [1.0.3](https://www.github.com/googleapis/python-api-gateway/compare/v1.0.2...v1.0.3) (2021-07-27) diff --git a/setup.py b/setup.py index 59808b0..0a4ea85 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ import setuptools # type: ignore name = "google-cloud-api-gateway" -version = "1.0.3" +version = "1.0.4" description = "API Gateway client library" release_status = "Development Status :: 5 - Production/Stable" url = "https://github.com/googleapis/python-api-gateway"