From 8cffbb7f7f8bed8dc93a85fd095b3d463fab5289 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Thu, 17 Jun 2021 10:52:29 +0000
Subject: [PATCH 01/11] chore: new owl bot post processor docker image (#129)
Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:58c7342b0bccf85028100adaa3d856cb4a871c22ca9c01960d996e66c40548ce
---
.github/.OwlBot.lock.yaml | 2 +-
docs/conf.py | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index da616c91..ea06d395 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:c66ba3c8d7bc8566f47df841f98cd0097b28fff0b1864c86f5817f4c8c3e8600
+ digest: sha256:58c7342b0bccf85028100adaa3d856cb4a871c22ca9c01960d996e66c40548ce
diff --git a/docs/conf.py b/docs/conf.py
index 485a6f6e..30faa8d1 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -80,9 +80,9 @@
master_doc = "index"
# General information about the project.
-project = u"google-cloud-language"
-copyright = u"2019, Google"
-author = u"Google APIs"
+project = "google-cloud-language"
+copyright = "2019, Google"
+author = "Google APIs"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -281,7 +281,7 @@
(
master_doc,
"google-cloud-language.tex",
- u"google-cloud-language Documentation",
+ "google-cloud-language Documentation",
author,
"manual",
)
@@ -316,7 +316,7 @@
(
master_doc,
"google-cloud-language",
- u"google-cloud-language Documentation",
+ "google-cloud-language Documentation",
[author],
1,
)
@@ -335,7 +335,7 @@
(
master_doc,
"google-cloud-language",
- u"google-cloud-language Documentation",
+ "google-cloud-language Documentation",
author,
"google-cloud-language",
"google-cloud-language Library",
From bc5f89e3d21bccd2d78ae3f2f4038b19db54871d Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Sat, 19 Jun 2021 01:54:05 +0000
Subject: [PATCH 02/11] docs: omit mention of Python 2.7 in 'CONTRIBUTING.rst'
(#1127) (#132)
Source-Link: https://github.com/googleapis/synthtool/commit/b91f129527853d5b756146a0b5044481fb4e09a8
Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:b6169fc6a5207b11800a7c002d0c5c2bc6d82697185ca12e666f44031468cfcd
---
.github/.OwlBot.lock.yaml | 2 +-
CONTRIBUTING.rst | 7 ++-----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index ea06d395..cc49c6a3 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:58c7342b0bccf85028100adaa3d856cb4a871c22ca9c01960d996e66c40548ce
+ digest: sha256:b6169fc6a5207b11800a7c002d0c5c2bc6d82697185ca12e666f44031468cfcd
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 3938ab27..92891290 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -69,7 +69,6 @@ We use `nox `__ to instrument our tests.
- To test your changes, run unit tests with ``nox``::
- $ nox -s unit-2.7
$ nox -s unit-3.8
$ ...
@@ -144,7 +143,6 @@ Running System Tests
# Run all system tests
$ nox -s system-3.8
- $ nox -s system-2.7
# Run a single system test
$ nox -s system-3.8 -- -k
@@ -152,9 +150,8 @@ Running System Tests
.. note::
- System tests are only configured to run under Python 2.7 and
- Python 3.8. For expediency, we do not run them in older versions
- of Python 3.
+ System tests are only configured to run under Python 3.8.
+ For expediency, we do not run them in older versions of Python 3.
This alone will not run the tests. You'll need to change some local
auth settings and change some configuration in your project to
From 0483d783d8c89ae57396dd9c68d8711c84d40685 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Sun, 20 Jun 2021 02:58:02 +0200
Subject: [PATCH 03/11] chore(deps): update dependency google-cloud-language to
v2.1.0 (#130)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-cloud-language](https://togithub.com/googleapis/python-language) | `==2.0.0` -> `==2.1.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/python-language
### [`v2.1.0`](https://togithub.com/googleapis/python-language/blob/master/CHANGELOG.md#210-httpswwwgithubcomgoogleapispython-languagecomparev140v210-2021-06-16)
[Compare Source](https://togithub.com/googleapis/python-language/compare/v2.0.0...v2.1.0)
##### Features
- add 'from_service_account_info' factory to clients ([cc8a180](https://www.github.com/googleapis/python-language/commit/cc8a18032af7c8d8bf45130898eeae7efb17a91e))
- add common resource helper methods; expose client transport ([#55](https://www.github.com/googleapis/python-language/issues/55)) ([8dde55c](https://www.github.com/googleapis/python-language/commit/8dde55cdd0e956c333039c0b74e49a06dd6ad33b))
- add from_service_account_info factory and fix sphinx identifiers ([#66](https://www.github.com/googleapis/python-language/issues/66)) ([cc8a180](https://www.github.com/googleapis/python-language/commit/cc8a18032af7c8d8bf45130898eeae7efb17a91e))
- support self-signed JWT flow for service accounts ([0dcb15e](https://www.github.com/googleapis/python-language/commit/0dcb15eb46b60bd816a6919464be1331c2c8de41))
##### Bug Fixes
- add async client to %name\_%version/init.py ([0dcb15e](https://www.github.com/googleapis/python-language/commit/0dcb15eb46b60bd816a6919464be1331c2c8de41))
- adds underscore to "type" to NL API samples ([#49](https://www.github.com/googleapis/python-language/issues/49)) ([36aa320](https://www.github.com/googleapis/python-language/commit/36aa320bf3e0018d66a7d0c91ce4733f20e9acc0))
- **deps:** add packaging requirement ([#113](https://www.github.com/googleapis/python-language/issues/113)) ([7e711ac](https://www.github.com/googleapis/python-language/commit/7e711ac63c95c1018d24c7c4db3bc02c191efcfc))
- fix sphinx identifiers ([cc8a180](https://www.github.com/googleapis/python-language/commit/cc8a18032af7c8d8bf45130898eeae7efb17a91e))
- remove client recv msg limit fix: add enums to `types/__init__.py` ([#62](https://www.github.com/googleapis/python-language/issues/62)) ([3476c0f](https://www.github.com/googleapis/python-language/commit/3476c0f72529cbcbe61ea5c7e6a22291777bed7e))
- use correct retry deadlines ([#83](https://www.github.com/googleapis/python-language/issues/83)) ([e2be2d8](https://www.github.com/googleapis/python-language/commit/e2be2d8ecf849940f2ea066655fda3bee68d8a74))
##### Documentation
- fix typos ([#125](https://www.github.com/googleapis/python-language/issues/125)) ([788176f](https://www.github.com/googleapis/python-language/commit/788176feff5fb541e0d16f236b10b765d04ecb98))
##### Miscellaneous Chores
- release as 2.1.0 ([#126](https://www.github.com/googleapis/python-language/issues/126)) ([92fa7f9](https://www.github.com/googleapis/python-language/commit/92fa7f995013c302f3bd3eb6bec53d92d8d9990c))
---
### 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-language).
---
samples/snippets/classify_text/requirements.txt | 2 +-
samples/snippets/cloud-client/v1/requirements.txt | 2 +-
samples/snippets/generated-samples/v1/requirements.txt | 2 +-
samples/snippets/sentiment/requirements.txt | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/samples/snippets/classify_text/requirements.txt b/samples/snippets/classify_text/requirements.txt
index 328dc7a5..5c6d9db7 100644
--- a/samples/snippets/classify_text/requirements.txt
+++ b/samples/snippets/classify_text/requirements.txt
@@ -1,3 +1,3 @@
-google-cloud-language==2.0.0
+google-cloud-language==2.1.0
numpy==1.20.1; python_version > '3.6'
numpy==1.19.5; python_version <= '3.6'
diff --git a/samples/snippets/cloud-client/v1/requirements.txt b/samples/snippets/cloud-client/v1/requirements.txt
index 83a8cba4..d79946ba 100644
--- a/samples/snippets/cloud-client/v1/requirements.txt
+++ b/samples/snippets/cloud-client/v1/requirements.txt
@@ -1 +1 @@
-google-cloud-language==2.0.0
+google-cloud-language==2.1.0
diff --git a/samples/snippets/generated-samples/v1/requirements.txt b/samples/snippets/generated-samples/v1/requirements.txt
index 83a8cba4..d79946ba 100644
--- a/samples/snippets/generated-samples/v1/requirements.txt
+++ b/samples/snippets/generated-samples/v1/requirements.txt
@@ -1 +1 @@
-google-cloud-language==2.0.0
+google-cloud-language==2.1.0
diff --git a/samples/snippets/sentiment/requirements.txt b/samples/snippets/sentiment/requirements.txt
index 83a8cba4..d79946ba 100644
--- a/samples/snippets/sentiment/requirements.txt
+++ b/samples/snippets/sentiment/requirements.txt
@@ -1 +1 @@
-google-cloud-language==2.0.0
+google-cloud-language==2.1.0
From cc460bd068c4001e0b5fd774ca1fbf056f289be7 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Sun, 20 Jun 2021 01:12:04 +0000
Subject: [PATCH 04/11] chore: update precommit hook
pre-commit/pre-commit-hooks to v4 (#1083) (#134)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [pre-commit/pre-commit-hooks](https://togithub.com/pre-commit/pre-commit-hooks) | repository | major | `v3.4.0` -> `v4.0.1` |
---
### Release Notes
pre-commit/pre-commit-hooks
### [`v4.0.1`](https://togithub.com/pre-commit/pre-commit-hooks/releases/v4.0.1)
[Compare Source](https://togithub.com/pre-commit/pre-commit-hooks/compare/v4.0.0...v4.0.1)
##### Fixes
- `check-shebang-scripts-are-executable` fix entry point.
- [#602](https://togithub.com/pre-commit/pre-commit-hooks/issues/602) issue by [@Person-93](https://togithub.com/Person-93).
- [#603](https://togithub.com/pre-commit/pre-commit-hooks/issues/603) PR by [@scop](https://togithub.com/scop).
### [`v4.0.0`](https://togithub.com/pre-commit/pre-commit-hooks/releases/v4.0.0)
[Compare Source](https://togithub.com/pre-commit/pre-commit-hooks/compare/v3.4.0...v4.0.0)
##### Features
- `check-json`: report duplicate keys.
- [#558](https://togithub.com/pre-commit/pre-commit-hooks/issues/558) PR by [@AdityaKhursale](https://togithub.com/AdityaKhursale).
- [#554](https://togithub.com/pre-commit/pre-commit-hooks/issues/554) issue by [@adamchainz](https://togithub.com/adamchainz).
- `no-commit-to-branch`: add `main` to default blocked branches.
- [#565](https://togithub.com/pre-commit/pre-commit-hooks/issues/565) PR by [@ndevenish](https://togithub.com/ndevenish).
- `check-case-conflict`: check conflicts in directory names as well.
- [#575](https://togithub.com/pre-commit/pre-commit-hooks/issues/575) PR by [@slsyy](https://togithub.com/slsyy).
- [#70](https://togithub.com/pre-commit/pre-commit-hooks/issues/70) issue by [@andyjack](https://togithub.com/andyjack).
- `check-vcs-permalinks`: forbid other branch names.
- [#582](https://togithub.com/pre-commit/pre-commit-hooks/issues/582) PR by [@jack1142](https://togithub.com/jack1142).
- [#581](https://togithub.com/pre-commit/pre-commit-hooks/issues/581) issue by [@jack1142](https://togithub.com/jack1142).
- `check-shebang-scripts-are-executable`: new hook which ensures shebang'd scripts are executable.
- [#545](https://togithub.com/pre-commit/pre-commit-hooks/issues/545) PR by [@scop](https://togithub.com/scop).
##### Fixes
- `check-executables-have-shebangs`: Short circuit shebang lookup on windows.
- [#544](https://togithub.com/pre-commit/pre-commit-hooks/issues/544) PR by [@scop](https://togithub.com/scop).
- `requirements-txt-fixer`: Fix comments which have indentation
- [#549](https://togithub.com/pre-commit/pre-commit-hooks/issues/549) PR by [@greshilov](https://togithub.com/greshilov).
- [#548](https://togithub.com/pre-commit/pre-commit-hooks/issues/548) issue by [@greshilov](https://togithub.com/greshilov).
- `pretty-format-json`: write to stdout using UTF-8 encoding.
- [#571](https://togithub.com/pre-commit/pre-commit-hooks/issues/571) PR by [@jack1142](https://togithub.com/jack1142).
- [#570](https://togithub.com/pre-commit/pre-commit-hooks/issues/570) issue by [@jack1142](https://togithub.com/jack1142).
- Use more inclusive language.
- [#599](https://togithub.com/pre-commit/pre-commit-hooks/issues/599) PR by [@asottile](https://togithub.com/asottile).
##### Breaking changes
- Remove deprecated hooks: `flake8`, `pyflakes`, `autopep8-wrapper`.
- [#597](https://togithub.com/pre-commit/pre-commit-hooks/issues/597) PR by [@asottile](https://togithub.com/asottile).
---
### 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/synthtool).
Source-Link: https://github.com/googleapis/synthtool/commit/333fd90856f1454380514bc59fc0936cdaf1c202
Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:b8c131c558606d3cea6e18f8e87befbd448c1482319b0db3c5d5388fa6ea72e3
---
.github/.OwlBot.lock.yaml | 2 +-
.pre-commit-config.yaml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index cc49c6a3..9602d540 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:b6169fc6a5207b11800a7c002d0c5c2bc6d82697185ca12e666f44031468cfcd
+ digest: sha256:b8c131c558606d3cea6e18f8e87befbd448c1482319b0db3c5d5388fa6ea72e3
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 4f00c7cf..62eb5a77 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -16,7 +16,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v3.4.0
+ rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
From 617738842d51e86cd0afa5d5689e0c2b9a038d4e Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Tue, 22 Jun 2021 18:30:29 +0000
Subject: [PATCH 05/11] chore: add kokoro 3.9 config templates (#1128) (#136)
Source-Link: https://github.com/googleapis/synthtool/commit/b0eb8a8b30b46a3c98d23c23107acb748c6601a1
Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:df50e8d462f86d6bcb42f27ecad55bb12c404f1c65de9c6fe4c4d25120080bd6
---
.github/.OwlBot.lock.yaml | 2 +-
.kokoro/samples/python3.9/common.cfg | 40 +++++++++++++++++++++
.kokoro/samples/python3.9/continuous.cfg | 6 ++++
.kokoro/samples/python3.9/periodic-head.cfg | 11 ++++++
.kokoro/samples/python3.9/periodic.cfg | 6 ++++
.kokoro/samples/python3.9/presubmit.cfg | 6 ++++
6 files changed, 70 insertions(+), 1 deletion(-)
create mode 100644 .kokoro/samples/python3.9/common.cfg
create mode 100644 .kokoro/samples/python3.9/continuous.cfg
create mode 100644 .kokoro/samples/python3.9/periodic-head.cfg
create mode 100644 .kokoro/samples/python3.9/periodic.cfg
create mode 100644 .kokoro/samples/python3.9/presubmit.cfg
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index 9602d540..0954585f 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:b8c131c558606d3cea6e18f8e87befbd448c1482319b0db3c5d5388fa6ea72e3
+ digest: sha256:df50e8d462f86d6bcb42f27ecad55bb12c404f1c65de9c6fe4c4d25120080bd6
diff --git a/.kokoro/samples/python3.9/common.cfg b/.kokoro/samples/python3.9/common.cfg
new file mode 100644
index 00000000..38c3cc08
--- /dev/null
+++ b/.kokoro/samples/python3.9/common.cfg
@@ -0,0 +1,40 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Build logs will be here
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ }
+}
+
+# Specify which tests to run
+env_vars: {
+ key: "RUN_TESTS_SESSION"
+ value: "py-3.9"
+}
+
+# Declare build specific Cloud project.
+env_vars: {
+ key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
+ value: "python-docs-samples-tests-py39"
+}
+
+env_vars: {
+ key: "TRAMPOLINE_BUILD_FILE"
+ value: "github/python-language/.kokoro/test-samples.sh"
+}
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
+}
+
+# Download secrets for samples
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
+
+# Download trampoline resources.
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
+
+# Use the trampoline script to run in docker.
+build_file: "python-language/.kokoro/trampoline.sh"
\ No newline at end of file
diff --git a/.kokoro/samples/python3.9/continuous.cfg b/.kokoro/samples/python3.9/continuous.cfg
new file mode 100644
index 00000000..a1c8d975
--- /dev/null
+++ b/.kokoro/samples/python3.9/continuous.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/python3.9/periodic-head.cfg b/.kokoro/samples/python3.9/periodic-head.cfg
new file mode 100644
index 00000000..f9cfcd33
--- /dev/null
+++ b/.kokoro/samples/python3.9/periodic-head.cfg
@@ -0,0 +1,11 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
+
+env_vars: {
+ key: "TRAMPOLINE_BUILD_FILE"
+ value: "github/python-pubsub/.kokoro/test-samples-against-head.sh"
+}
diff --git a/.kokoro/samples/python3.9/periodic.cfg b/.kokoro/samples/python3.9/periodic.cfg
new file mode 100644
index 00000000..50fec964
--- /dev/null
+++ b/.kokoro/samples/python3.9/periodic.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "False"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/python3.9/presubmit.cfg b/.kokoro/samples/python3.9/presubmit.cfg
new file mode 100644
index 00000000..a1c8d975
--- /dev/null
+++ b/.kokoro/samples/python3.9/presubmit.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
\ No newline at end of file
From 242aa5e997161104b760f554f69f2eecd86cd560 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Wed, 23 Jun 2021 20:24:43 +0000
Subject: [PATCH 06/11] feat: add always_use_jwt_access (#138)
... chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0
Committer: @miraleung
PiperOrigin-RevId: 380641501
Source-Link: https://github.com/googleapis/googleapis/commit/076f7e9f0b258bdb54338895d7251b202e8f0de3
Source-Link: https://github.com/googleapis/googleapis-gen/commit/27e4c88b4048e5f56508d4e1aa417d60a3380892
---
.coveragerc | 1 -
.../language_service/transports/base.py | 40 +++----
.../language_service/transports/grpc.py | 7 +-
.../transports/grpc_asyncio.py | 7 +-
.../language_service/transports/base.py | 40 +++----
.../language_service/transports/grpc.py | 7 +-
.../transports/grpc_asyncio.py | 7 +-
setup.py | 2 +-
testing/constraints-3.6.txt | 2 +-
.../language_v1/test_language_service.py | 107 +++---------------
.../language_v1beta2/test_language_service.py | 107 +++---------------
11 files changed, 76 insertions(+), 251 deletions(-)
diff --git a/.coveragerc b/.coveragerc
index 8aa27c09..a2e29fbf 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -2,7 +2,6 @@
branch = True
[report]
-fail_under = 100
show_missing = True
omit =
google/cloud/language/__init__.py
diff --git a/google/cloud/language_v1/services/language_service/transports/base.py b/google/cloud/language_v1/services/language_service/transports/base.py
index 4f538035..183851d3 100644
--- a/google/cloud/language_v1/services/language_service/transports/base.py
+++ b/google/cloud/language_v1/services/language_service/transports/base.py
@@ -24,6 +24,7 @@
from google.api_core import gapic_v1 # type: ignore
from google.api_core import retry as retries # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
+from google.oauth2 import service_account # type: ignore
from google.cloud.language_v1.types import language_service
@@ -43,8 +44,6 @@
except pkg_resources.DistributionNotFound: # pragma: NO COVER
_GOOGLE_AUTH_VERSION = None
-_API_CORE_VERSION = google.api_core.__version__
-
class LanguageServiceTransport(abc.ABC):
"""Abstract transport class for LanguageService."""
@@ -65,6 +64,7 @@ def __init__(
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
+ always_use_jwt_access: Optional[bool] = False,
**kwargs,
) -> None:
"""Instantiate the transport.
@@ -88,6 +88,8 @@ def __init__(
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
+ be used for service account credentials.
"""
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
@@ -116,13 +118,20 @@ 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 (
+ always_use_jwt_access
+ and isinstance(credentials, service_account.Credentials)
+ and hasattr(service_account.Credentials, "with_always_use_jwt_access")
+ ):
+ credentials = credentials.with_always_use_jwt_access(True)
+
# Save the credentials.
self._credentials = credentials
- # TODO(busunkim): These two class methods are in the base transport
+ # TODO(busunkim): This method is in the base transport
# to avoid duplicating code across the transport classes. These functions
- # should be deleted once the minimum required versions of google-api-core
- # and google-auth are increased.
+ # should be deleted once the minimum required versions of google-auth is increased.
# TODO: Remove this function once google-auth >= 1.25.0 is required
@classmethod
@@ -143,27 +152,6 @@ def _get_scopes_kwargs(
return scopes_kwargs
- # TODO: Remove this function once google-api-core >= 1.26.0 is required
- @classmethod
- def _get_self_signed_jwt_kwargs(
- cls, host: str, scopes: Optional[Sequence[str]]
- ) -> Dict[str, Union[Optional[Sequence[str]], str]]:
- """Returns kwargs to pass to grpc_helpers.create_channel depending on the google-api-core version"""
-
- self_signed_jwt_kwargs: Dict[str, Union[Optional[Sequence[str]], str]] = {}
-
- if _API_CORE_VERSION and (
- packaging.version.parse(_API_CORE_VERSION)
- >= packaging.version.parse("1.26.0")
- ):
- self_signed_jwt_kwargs["default_scopes"] = cls.AUTH_SCOPES
- self_signed_jwt_kwargs["scopes"] = scopes
- self_signed_jwt_kwargs["default_host"] = cls.DEFAULT_HOST
- else:
- self_signed_jwt_kwargs["scopes"] = scopes or cls.AUTH_SCOPES
-
- return self_signed_jwt_kwargs
-
def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
diff --git a/google/cloud/language_v1/services/language_service/transports/grpc.py b/google/cloud/language_v1/services/language_service/transports/grpc.py
index 209156ba..079c61c1 100644
--- a/google/cloud/language_v1/services/language_service/transports/grpc.py
+++ b/google/cloud/language_v1/services/language_service/transports/grpc.py
@@ -150,6 +150,7 @@ def __init__(
scopes=scopes,
quota_project_id=quota_project_id,
client_info=client_info,
+ always_use_jwt_access=True,
)
if not self._grpc_channel:
@@ -205,14 +206,14 @@ def create_channel(
and ``credentials_file`` are passed.
"""
- self_signed_jwt_kwargs = cls._get_self_signed_jwt_kwargs(host, scopes)
-
return grpc_helpers.create_channel(
host,
credentials=credentials,
credentials_file=credentials_file,
quota_project_id=quota_project_id,
- **self_signed_jwt_kwargs,
+ default_scopes=cls.AUTH_SCOPES,
+ scopes=scopes,
+ default_host=cls.DEFAULT_HOST,
**kwargs,
)
diff --git a/google/cloud/language_v1/services/language_service/transports/grpc_asyncio.py b/google/cloud/language_v1/services/language_service/transports/grpc_asyncio.py
index 1647c0e5..fe2cea52 100644
--- a/google/cloud/language_v1/services/language_service/transports/grpc_asyncio.py
+++ b/google/cloud/language_v1/services/language_service/transports/grpc_asyncio.py
@@ -79,14 +79,14 @@ def create_channel(
aio.Channel: A gRPC AsyncIO channel object.
"""
- self_signed_jwt_kwargs = cls._get_self_signed_jwt_kwargs(host, scopes)
-
return grpc_helpers_async.create_channel(
host,
credentials=credentials,
credentials_file=credentials_file,
quota_project_id=quota_project_id,
- **self_signed_jwt_kwargs,
+ default_scopes=cls.AUTH_SCOPES,
+ scopes=scopes,
+ default_host=cls.DEFAULT_HOST,
**kwargs,
)
@@ -196,6 +196,7 @@ def __init__(
scopes=scopes,
quota_project_id=quota_project_id,
client_info=client_info,
+ always_use_jwt_access=True,
)
if not self._grpc_channel:
diff --git a/google/cloud/language_v1beta2/services/language_service/transports/base.py b/google/cloud/language_v1beta2/services/language_service/transports/base.py
index 66de5600..c9f4b51c 100644
--- a/google/cloud/language_v1beta2/services/language_service/transports/base.py
+++ b/google/cloud/language_v1beta2/services/language_service/transports/base.py
@@ -24,6 +24,7 @@
from google.api_core import gapic_v1 # type: ignore
from google.api_core import retry as retries # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
+from google.oauth2 import service_account # type: ignore
from google.cloud.language_v1beta2.types import language_service
@@ -43,8 +44,6 @@
except pkg_resources.DistributionNotFound: # pragma: NO COVER
_GOOGLE_AUTH_VERSION = None
-_API_CORE_VERSION = google.api_core.__version__
-
class LanguageServiceTransport(abc.ABC):
"""Abstract transport class for LanguageService."""
@@ -65,6 +64,7 @@ def __init__(
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
+ always_use_jwt_access: Optional[bool] = False,
**kwargs,
) -> None:
"""Instantiate the transport.
@@ -88,6 +88,8 @@ def __init__(
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
+ be used for service account credentials.
"""
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
@@ -116,13 +118,20 @@ 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 (
+ always_use_jwt_access
+ and isinstance(credentials, service_account.Credentials)
+ and hasattr(service_account.Credentials, "with_always_use_jwt_access")
+ ):
+ credentials = credentials.with_always_use_jwt_access(True)
+
# Save the credentials.
self._credentials = credentials
- # TODO(busunkim): These two class methods are in the base transport
+ # TODO(busunkim): This method is in the base transport
# to avoid duplicating code across the transport classes. These functions
- # should be deleted once the minimum required versions of google-api-core
- # and google-auth are increased.
+ # should be deleted once the minimum required versions of google-auth is increased.
# TODO: Remove this function once google-auth >= 1.25.0 is required
@classmethod
@@ -143,27 +152,6 @@ def _get_scopes_kwargs(
return scopes_kwargs
- # TODO: Remove this function once google-api-core >= 1.26.0 is required
- @classmethod
- def _get_self_signed_jwt_kwargs(
- cls, host: str, scopes: Optional[Sequence[str]]
- ) -> Dict[str, Union[Optional[Sequence[str]], str]]:
- """Returns kwargs to pass to grpc_helpers.create_channel depending on the google-api-core version"""
-
- self_signed_jwt_kwargs: Dict[str, Union[Optional[Sequence[str]], str]] = {}
-
- if _API_CORE_VERSION and (
- packaging.version.parse(_API_CORE_VERSION)
- >= packaging.version.parse("1.26.0")
- ):
- self_signed_jwt_kwargs["default_scopes"] = cls.AUTH_SCOPES
- self_signed_jwt_kwargs["scopes"] = scopes
- self_signed_jwt_kwargs["default_host"] = cls.DEFAULT_HOST
- else:
- self_signed_jwt_kwargs["scopes"] = scopes or cls.AUTH_SCOPES
-
- return self_signed_jwt_kwargs
-
def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
diff --git a/google/cloud/language_v1beta2/services/language_service/transports/grpc.py b/google/cloud/language_v1beta2/services/language_service/transports/grpc.py
index 9083013f..7b471585 100644
--- a/google/cloud/language_v1beta2/services/language_service/transports/grpc.py
+++ b/google/cloud/language_v1beta2/services/language_service/transports/grpc.py
@@ -150,6 +150,7 @@ def __init__(
scopes=scopes,
quota_project_id=quota_project_id,
client_info=client_info,
+ always_use_jwt_access=True,
)
if not self._grpc_channel:
@@ -205,14 +206,14 @@ def create_channel(
and ``credentials_file`` are passed.
"""
- self_signed_jwt_kwargs = cls._get_self_signed_jwt_kwargs(host, scopes)
-
return grpc_helpers.create_channel(
host,
credentials=credentials,
credentials_file=credentials_file,
quota_project_id=quota_project_id,
- **self_signed_jwt_kwargs,
+ default_scopes=cls.AUTH_SCOPES,
+ scopes=scopes,
+ default_host=cls.DEFAULT_HOST,
**kwargs,
)
diff --git a/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py b/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py
index 6b44fe14..9c23a3e5 100644
--- a/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py
+++ b/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py
@@ -79,14 +79,14 @@ def create_channel(
aio.Channel: A gRPC AsyncIO channel object.
"""
- self_signed_jwt_kwargs = cls._get_self_signed_jwt_kwargs(host, scopes)
-
return grpc_helpers_async.create_channel(
host,
credentials=credentials,
credentials_file=credentials_file,
quota_project_id=quota_project_id,
- **self_signed_jwt_kwargs,
+ default_scopes=cls.AUTH_SCOPES,
+ scopes=scopes,
+ default_host=cls.DEFAULT_HOST,
**kwargs,
)
@@ -196,6 +196,7 @@ def __init__(
scopes=scopes,
quota_project_id=quota_project_id,
client_info=client_info,
+ always_use_jwt_access=True,
)
if not self._grpc_channel:
diff --git a/setup.py b/setup.py
index 4899a7c4..e3503c0c 100644
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
- "google-api-core[grpc] >= 1.22.2, < 2.0.0dev",
+ "google-api-core[grpc] >= 1.26.0, <2.0.0dev",
"proto-plus >= 1.10.0",
"packaging >= 14.3",
]
diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt
index f462eab2..90b6c319 100644
--- a/testing/constraints-3.6.txt
+++ b/testing/constraints-3.6.txt
@@ -4,7 +4,7 @@
# Pin the version to the lower bound.
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev",
# Then this file should have google-cloud-foo==1.14.0
-google-api-core==1.22.2
+google-api-core==1.26.0
proto-plus==1.10.0
libcst==0.2.5
packaging==14.3
diff --git a/tests/unit/gapic/language_v1/test_language_service.py b/tests/unit/gapic/language_v1/test_language_service.py
index a41f245d..6c3e890b 100644
--- a/tests/unit/gapic/language_v1/test_language_service.py
+++ b/tests/unit/gapic/language_v1/test_language_service.py
@@ -36,9 +36,6 @@
)
from google.cloud.language_v1.services.language_service import LanguageServiceClient
from google.cloud.language_v1.services.language_service import transports
-from google.cloud.language_v1.services.language_service.transports.base import (
- _API_CORE_VERSION,
-)
from google.cloud.language_v1.services.language_service.transports.base import (
_GOOGLE_AUTH_VERSION,
)
@@ -47,8 +44,9 @@
import google.auth
-# TODO(busunkim): Once google-api-core >= 1.26.0 is required:
-# - Delete all the api-core and auth "less than" test cases
+# TODO(busunkim): Once google-auth >= 1.25.0 is required transitively
+# through google-api-core:
+# - Delete the auth "less than" test cases
# - Delete these pytest markers (Make the "greater than or equal to" tests the default).
requires_google_auth_lt_1_25_0 = pytest.mark.skipif(
packaging.version.parse(_GOOGLE_AUTH_VERSION) >= packaging.version.parse("1.25.0"),
@@ -59,16 +57,6 @@
reason="This test requires google-auth >= 1.25.0",
)
-requires_api_core_lt_1_26_0 = pytest.mark.skipif(
- packaging.version.parse(_API_CORE_VERSION) >= packaging.version.parse("1.26.0"),
- reason="This test requires google-api-core < 1.26.0",
-)
-
-requires_api_core_gte_1_26_0 = pytest.mark.skipif(
- packaging.version.parse(_API_CORE_VERSION) < packaging.version.parse("1.26.0"),
- reason="This test requires google-api-core >= 1.26.0",
-)
-
def client_cert_source_callback():
return b"cert bytes", b"key bytes"
@@ -131,6 +119,18 @@ def test_language_service_client_from_service_account_info(client_class):
assert client.transport._host == "language.googleapis.com:443"
+@pytest.mark.parametrize(
+ "client_class", [LanguageServiceClient, LanguageServiceAsyncClient,]
+)
+def test_language_service_client_service_account_always_use_jwt(client_class):
+ with mock.patch.object(
+ service_account.Credentials, "with_always_use_jwt_access", create=True
+ ) as use_jwt:
+ creds = service_account.Credentials(None, None, None)
+ client = client_class(credentials=creds)
+ use_jwt.assert_called_with(True)
+
+
@pytest.mark.parametrize(
"client_class", [LanguageServiceClient, LanguageServiceAsyncClient,]
)
@@ -1807,7 +1807,6 @@ def test_language_service_transport_auth_adc_old_google_auth(transport_class):
(transports.LanguageServiceGrpcAsyncIOTransport, grpc_helpers_async),
],
)
-@requires_api_core_gte_1_26_0
def test_language_service_transport_create_channel(transport_class, grpc_helpers):
# If credentials and host are not provided, the transport class should use
# ADC credentials.
@@ -1839,82 +1838,6 @@ def test_language_service_transport_create_channel(transport_class, grpc_helpers
)
-@pytest.mark.parametrize(
- "transport_class,grpc_helpers",
- [
- (transports.LanguageServiceGrpcTransport, grpc_helpers),
- (transports.LanguageServiceGrpcAsyncIOTransport, grpc_helpers_async),
- ],
-)
-@requires_api_core_lt_1_26_0
-def test_language_service_transport_create_channel_old_api_core(
- transport_class, grpc_helpers
-):
- # If credentials and host are not provided, the transport class should use
- # ADC credentials.
- with mock.patch.object(
- google.auth, "default", autospec=True
- ) as adc, mock.patch.object(
- grpc_helpers, "create_channel", autospec=True
- ) as create_channel:
- creds = ga_credentials.AnonymousCredentials()
- adc.return_value = (creds, None)
- transport_class(quota_project_id="octopus")
-
- create_channel.assert_called_with(
- "language.googleapis.com:443",
- credentials=creds,
- credentials_file=None,
- quota_project_id="octopus",
- scopes=(
- "https://www.googleapis.com/auth/cloud-language",
- "https://www.googleapis.com/auth/cloud-platform",
- ),
- ssl_credentials=None,
- options=[
- ("grpc.max_send_message_length", -1),
- ("grpc.max_receive_message_length", -1),
- ],
- )
-
-
-@pytest.mark.parametrize(
- "transport_class,grpc_helpers",
- [
- (transports.LanguageServiceGrpcTransport, grpc_helpers),
- (transports.LanguageServiceGrpcAsyncIOTransport, grpc_helpers_async),
- ],
-)
-@requires_api_core_lt_1_26_0
-def test_language_service_transport_create_channel_user_scopes(
- transport_class, grpc_helpers
-):
- # If credentials and host are not provided, the transport class should use
- # ADC credentials.
- with mock.patch.object(
- google.auth, "default", autospec=True
- ) as adc, mock.patch.object(
- grpc_helpers, "create_channel", autospec=True
- ) as create_channel:
- creds = ga_credentials.AnonymousCredentials()
- adc.return_value = (creds, None)
-
- transport_class(quota_project_id="octopus", scopes=["1", "2"])
-
- create_channel.assert_called_with(
- "language.googleapis.com:443",
- credentials=creds,
- credentials_file=None,
- quota_project_id="octopus",
- scopes=["1", "2"],
- ssl_credentials=None,
- options=[
- ("grpc.max_send_message_length", -1),
- ("grpc.max_receive_message_length", -1),
- ],
- )
-
-
@pytest.mark.parametrize(
"transport_class",
[
diff --git a/tests/unit/gapic/language_v1beta2/test_language_service.py b/tests/unit/gapic/language_v1beta2/test_language_service.py
index 17d28b09..ce020432 100644
--- a/tests/unit/gapic/language_v1beta2/test_language_service.py
+++ b/tests/unit/gapic/language_v1beta2/test_language_service.py
@@ -38,9 +38,6 @@
LanguageServiceClient,
)
from google.cloud.language_v1beta2.services.language_service import transports
-from google.cloud.language_v1beta2.services.language_service.transports.base import (
- _API_CORE_VERSION,
-)
from google.cloud.language_v1beta2.services.language_service.transports.base import (
_GOOGLE_AUTH_VERSION,
)
@@ -49,8 +46,9 @@
import google.auth
-# TODO(busunkim): Once google-api-core >= 1.26.0 is required:
-# - Delete all the api-core and auth "less than" test cases
+# TODO(busunkim): Once google-auth >= 1.25.0 is required transitively
+# through google-api-core:
+# - Delete the auth "less than" test cases
# - Delete these pytest markers (Make the "greater than or equal to" tests the default).
requires_google_auth_lt_1_25_0 = pytest.mark.skipif(
packaging.version.parse(_GOOGLE_AUTH_VERSION) >= packaging.version.parse("1.25.0"),
@@ -61,16 +59,6 @@
reason="This test requires google-auth >= 1.25.0",
)
-requires_api_core_lt_1_26_0 = pytest.mark.skipif(
- packaging.version.parse(_API_CORE_VERSION) >= packaging.version.parse("1.26.0"),
- reason="This test requires google-api-core < 1.26.0",
-)
-
-requires_api_core_gte_1_26_0 = pytest.mark.skipif(
- packaging.version.parse(_API_CORE_VERSION) < packaging.version.parse("1.26.0"),
- reason="This test requires google-api-core >= 1.26.0",
-)
-
def client_cert_source_callback():
return b"cert bytes", b"key bytes"
@@ -133,6 +121,18 @@ def test_language_service_client_from_service_account_info(client_class):
assert client.transport._host == "language.googleapis.com:443"
+@pytest.mark.parametrize(
+ "client_class", [LanguageServiceClient, LanguageServiceAsyncClient,]
+)
+def test_language_service_client_service_account_always_use_jwt(client_class):
+ with mock.patch.object(
+ service_account.Credentials, "with_always_use_jwt_access", create=True
+ ) as use_jwt:
+ creds = service_account.Credentials(None, None, None)
+ client = client_class(credentials=creds)
+ use_jwt.assert_called_with(True)
+
+
@pytest.mark.parametrize(
"client_class", [LanguageServiceClient, LanguageServiceAsyncClient,]
)
@@ -1809,7 +1809,6 @@ def test_language_service_transport_auth_adc_old_google_auth(transport_class):
(transports.LanguageServiceGrpcAsyncIOTransport, grpc_helpers_async),
],
)
-@requires_api_core_gte_1_26_0
def test_language_service_transport_create_channel(transport_class, grpc_helpers):
# If credentials and host are not provided, the transport class should use
# ADC credentials.
@@ -1841,82 +1840,6 @@ def test_language_service_transport_create_channel(transport_class, grpc_helpers
)
-@pytest.mark.parametrize(
- "transport_class,grpc_helpers",
- [
- (transports.LanguageServiceGrpcTransport, grpc_helpers),
- (transports.LanguageServiceGrpcAsyncIOTransport, grpc_helpers_async),
- ],
-)
-@requires_api_core_lt_1_26_0
-def test_language_service_transport_create_channel_old_api_core(
- transport_class, grpc_helpers
-):
- # If credentials and host are not provided, the transport class should use
- # ADC credentials.
- with mock.patch.object(
- google.auth, "default", autospec=True
- ) as adc, mock.patch.object(
- grpc_helpers, "create_channel", autospec=True
- ) as create_channel:
- creds = ga_credentials.AnonymousCredentials()
- adc.return_value = (creds, None)
- transport_class(quota_project_id="octopus")
-
- create_channel.assert_called_with(
- "language.googleapis.com:443",
- credentials=creds,
- credentials_file=None,
- quota_project_id="octopus",
- scopes=(
- "https://www.googleapis.com/auth/cloud-language",
- "https://www.googleapis.com/auth/cloud-platform",
- ),
- ssl_credentials=None,
- options=[
- ("grpc.max_send_message_length", -1),
- ("grpc.max_receive_message_length", -1),
- ],
- )
-
-
-@pytest.mark.parametrize(
- "transport_class,grpc_helpers",
- [
- (transports.LanguageServiceGrpcTransport, grpc_helpers),
- (transports.LanguageServiceGrpcAsyncIOTransport, grpc_helpers_async),
- ],
-)
-@requires_api_core_lt_1_26_0
-def test_language_service_transport_create_channel_user_scopes(
- transport_class, grpc_helpers
-):
- # If credentials and host are not provided, the transport class should use
- # ADC credentials.
- with mock.patch.object(
- google.auth, "default", autospec=True
- ) as adc, mock.patch.object(
- grpc_helpers, "create_channel", autospec=True
- ) as create_channel:
- creds = ga_credentials.AnonymousCredentials()
- adc.return_value = (creds, None)
-
- transport_class(quota_project_id="octopus", scopes=["1", "2"])
-
- create_channel.assert_called_with(
- "language.googleapis.com:443",
- credentials=creds,
- credentials_file=None,
- quota_project_id="octopus",
- scopes=["1", "2"],
- ssl_credentials=None,
- options=[
- ("grpc.max_send_message_length", -1),
- ("grpc.max_receive_message_length", -1),
- ],
- )
-
-
@pytest.mark.parametrize(
"transport_class",
[
From 2d838f1f856f7b7b72d648cb9c4836e5d6359cf5 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Sat, 26 Jun 2021 11:38:10 +0000
Subject: [PATCH 07/11] chore(python): simplify nox steps in CONTRIBUTING.rst
(#141)
Source-Link: https://github.com/googleapis/synthtool/commit/26558bae8976a985d73c2d98c31d8612273f907d
Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:99d90d097e4a4710cc8658ee0b5b963f4426d0e424819787c3ac1405c9a26719
---
.github/.OwlBot.lock.yaml | 2 +-
CONTRIBUTING.rst | 14 ++++++--------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index 0954585f..e2b39f94 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:df50e8d462f86d6bcb42f27ecad55bb12c404f1c65de9c6fe4c4d25120080bd6
+ digest: sha256:99d90d097e4a4710cc8658ee0b5b963f4426d0e424819787c3ac1405c9a26719
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 92891290..750ac35c 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -68,14 +68,12 @@ Using ``nox``
We use `nox `__ to instrument our tests.
- To test your changes, run unit tests with ``nox``::
+ $ nox -s unit
- $ nox -s unit-3.8
- $ ...
+- To run a single unit test::
-- Args to pytest can be passed through the nox command separated by a `--`. For
- example, to run a single test::
+ $ nox -s unit-3.9 -- -k
- $ nox -s unit-3.8 -- -k
.. note::
@@ -142,7 +140,7 @@ Running System Tests
- To run system tests, you can execute::
# Run all system tests
- $ nox -s system-3.8
+ $ nox -s system
# Run a single system test
$ nox -s system-3.8 -- -k
@@ -215,8 +213,8 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
.. _config: https://github.com/googleapis/python-language/blob/master/noxfile.py
-We also explicitly decided to support Python 3 beginning with version
-3.6. Reasons for this include:
+We also explicitly decided to support Python 3 beginning with version 3.6.
+Reasons for this include:
- Encouraging use of newest versions of Python 3
- Taking the lead of `prominent`_ open-source `projects`_
From 85d5e79c2122e82f1851c5dedddea93e6617b682 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Sat, 26 Jun 2021 13:42:10 +0200
Subject: [PATCH 08/11] chore(deps): update dependency google-api-python-client
to v2.10.0 (#139)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-api-python-client](https://togithub.com/googleapis/google-api-python-client) | `==2.9.0` -> `==2.10.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/google-api-python-client
### [`v2.10.0`](https://togithub.com/googleapis/google-api-python-client/blob/master/CHANGELOG.md#2100-httpswwwgithubcomgoogleapisgoogle-api-python-clientcomparev290v2100-2021-06-22)
[Compare Source](https://togithub.com/googleapis/google-api-python-client/compare/v2.9.0...v2.10.0)
##### Features
- **analyticsadmin:** update the api https://github.com/googleapis/google-api-python-client/commit/5a2e42e9a4631216c4883d5538c970a5faad59eb ([b1eafb3](https://www.github.com/googleapis/google-api-python-client/commit/b1eafb327669474d202bb2a430ed9e9561102db3))
- **androidmanagement:** update the api https://github.com/googleapis/google-api-python-client/commit/5fcc274bcd4a9a71a0a568e2771c443a2b2b20b0 ([b1eafb3](https://www.github.com/googleapis/google-api-python-client/commit/b1eafb327669474d202bb2a430ed9e9561102db3))
- **bigqueryreservation:** update the api https://github.com/googleapis/google-api-python-client/commit/63c00f6819408b943c2a7cc4bd2185828be173c6 ([3659137](https://www.github.com/googleapis/google-api-python-client/commit/365913780592552488cc5792d26b3f22b9e9ed1b))
- **dialogflow:** update the api https://github.com/googleapis/google-api-python-client/commit/512fc42343fa946889ec155456a05f0d64969903 ([b1eafb3](https://www.github.com/googleapis/google-api-python-client/commit/b1eafb327669474d202bb2a430ed9e9561102db3))
- **firebaserules:** update the api https://github.com/googleapis/google-api-python-client/commit/7b2000437a01ecd25e4ba571049f62c5b6dc9d63 ([3659137](https://www.github.com/googleapis/google-api-python-client/commit/365913780592552488cc5792d26b3f22b9e9ed1b))
- **iap:** update the api https://github.com/googleapis/google-api-python-client/commit/18550fd0501057584ef6d2fa329f09b75dad97d8 ([3659137](https://www.github.com/googleapis/google-api-python-client/commit/365913780592552488cc5792d26b3f22b9e9ed1b))
- **keep:** update the api https://github.com/googleapis/google-api-python-client/commit/45eb6dac450c1055a6ced84332529b70b0a8c831 ([b1eafb3](https://www.github.com/googleapis/google-api-python-client/commit/b1eafb327669474d202bb2a430ed9e9561102db3))
- **managedidentities:** update the api https://github.com/googleapis/google-api-python-client/commit/d2220014e787c2a2c90808cfd1e49a25cd783e72 ([3659137](https://www.github.com/googleapis/google-api-python-client/commit/365913780592552488cc5792d26b3f22b9e9ed1b))
##### Bug Fixes
- **smartdevicemanagement:** update the api https://github.com/googleapis/google-api-python-client/commit/772982044da691f9116073855e692f7793edacce ([b1eafb3](https://www.github.com/googleapis/google-api-python-client/commit/b1eafb327669474d202bb2a430ed9e9561102db3))
---
### 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-language).
---
samples/snippets/api/requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/snippets/api/requirements.txt b/samples/snippets/api/requirements.txt
index 46527bb0..9d43b1ba 100644
--- a/samples/snippets/api/requirements.txt
+++ b/samples/snippets/api/requirements.txt
@@ -1,3 +1,3 @@
-google-api-python-client==2.9.0
+google-api-python-client==2.10.0
google-auth==1.31.0
google-auth-httplib2==0.1.0
From ae89d265a786a401bd31892a9be1656aeb49b266 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Sat, 26 Jun 2021 13:52:23 +0200
Subject: [PATCH 09/11] chore(deps): update dependency google-auth to v1.32.0
(#137)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-auth](https://togithub.com/googleapis/google-auth-library-python) | `==1.31.0` -> `==1.32.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/google-auth-library-python
### [`v1.32.0`](https://togithub.com/googleapis/google-auth-library-python/blob/master/CHANGELOG.md#1320-httpswwwgithubcomgoogleapisgoogle-auth-library-pythoncomparev1310v1320-2021-06-16)
[Compare Source](https://togithub.com/googleapis/google-auth-library-python/compare/v1.31.0...v1.32.0)
##### Features
- allow scopes for self signed jwt ([#776](https://www.github.com/googleapis/google-auth-library-python/issues/776)) ([2cfe655](https://www.github.com/googleapis/google-auth-library-python/commit/2cfe655bba837170abc07701557a1a5e0fe3294e))
---
### 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-language).
---
samples/snippets/api/requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/snippets/api/requirements.txt b/samples/snippets/api/requirements.txt
index 9d43b1ba..e9032aab 100644
--- a/samples/snippets/api/requirements.txt
+++ b/samples/snippets/api/requirements.txt
@@ -1,3 +1,3 @@
google-api-python-client==2.10.0
-google-auth==1.31.0
+google-auth==1.32.0
google-auth-httplib2==0.1.0
From 21c9d6e1a96707007bdcf23ce667f02b42c8a207 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Thu, 1 Jul 2021 02:20:09 +0000
Subject: [PATCH 10/11] fix: disable always_use_jwt_access (#143)
Committer: @busunkim96
PiperOrigin-RevId: 382142900
Source-Link: https://github.com/googleapis/googleapis/commit/513440fda515f3c799c22a30e3906dcda325004e
Source-Link: https://github.com/googleapis/googleapis-gen/commit/7b1e2c31233f79a704ec21ca410bf661d6bc68d0
---
.../language_service/transports/base.py | 2 +-
.../language_service/transports/grpc.py | 5 ++-
.../transports/grpc_asyncio.py | 5 ++-
.../language_service/transports/base.py | 2 +-
.../language_service/transports/grpc.py | 5 ++-
.../transports/grpc_asyncio.py | 5 ++-
.../language_v1/test_language_service.py | 35 ++++++++++++-------
.../language_v1beta2/test_language_service.py | 35 ++++++++++++-------
8 files changed, 62 insertions(+), 32 deletions(-)
diff --git a/google/cloud/language_v1/services/language_service/transports/base.py b/google/cloud/language_v1/services/language_service/transports/base.py
index 183851d3..42537ea4 100644
--- a/google/cloud/language_v1/services/language_service/transports/base.py
+++ b/google/cloud/language_v1/services/language_service/transports/base.py
@@ -99,7 +99,7 @@ def __init__(
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
# Save the scopes.
- self._scopes = scopes or self.AUTH_SCOPES
+ self._scopes = scopes
# If no credentials are provided, then determine the appropriate
# defaults.
diff --git a/google/cloud/language_v1/services/language_service/transports/grpc.py b/google/cloud/language_v1/services/language_service/transports/grpc.py
index 079c61c1..a059ea93 100644
--- a/google/cloud/language_v1/services/language_service/transports/grpc.py
+++ b/google/cloud/language_v1/services/language_service/transports/grpc.py
@@ -58,6 +58,7 @@ def __init__(
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
+ always_use_jwt_access: Optional[bool] = False,
) -> None:
"""Instantiate the transport.
@@ -98,6 +99,8 @@ def __init__(
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
+ be used for service account credentials.
Raises:
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -150,7 +153,7 @@ def __init__(
scopes=scopes,
quota_project_id=quota_project_id,
client_info=client_info,
- always_use_jwt_access=True,
+ always_use_jwt_access=always_use_jwt_access,
)
if not self._grpc_channel:
diff --git a/google/cloud/language_v1/services/language_service/transports/grpc_asyncio.py b/google/cloud/language_v1/services/language_service/transports/grpc_asyncio.py
index fe2cea52..4f849e85 100644
--- a/google/cloud/language_v1/services/language_service/transports/grpc_asyncio.py
+++ b/google/cloud/language_v1/services/language_service/transports/grpc_asyncio.py
@@ -104,6 +104,7 @@ def __init__(
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
quota_project_id=None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
+ always_use_jwt_access: Optional[bool] = False,
) -> None:
"""Instantiate the transport.
@@ -145,6 +146,8 @@ def __init__(
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
+ be used for service account credentials.
Raises:
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -196,7 +199,7 @@ def __init__(
scopes=scopes,
quota_project_id=quota_project_id,
client_info=client_info,
- always_use_jwt_access=True,
+ always_use_jwt_access=always_use_jwt_access,
)
if not self._grpc_channel:
diff --git a/google/cloud/language_v1beta2/services/language_service/transports/base.py b/google/cloud/language_v1beta2/services/language_service/transports/base.py
index c9f4b51c..38f98b34 100644
--- a/google/cloud/language_v1beta2/services/language_service/transports/base.py
+++ b/google/cloud/language_v1beta2/services/language_service/transports/base.py
@@ -99,7 +99,7 @@ def __init__(
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
# Save the scopes.
- self._scopes = scopes or self.AUTH_SCOPES
+ self._scopes = scopes
# If no credentials are provided, then determine the appropriate
# defaults.
diff --git a/google/cloud/language_v1beta2/services/language_service/transports/grpc.py b/google/cloud/language_v1beta2/services/language_service/transports/grpc.py
index 7b471585..ad25eaa4 100644
--- a/google/cloud/language_v1beta2/services/language_service/transports/grpc.py
+++ b/google/cloud/language_v1beta2/services/language_service/transports/grpc.py
@@ -58,6 +58,7 @@ def __init__(
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
+ always_use_jwt_access: Optional[bool] = False,
) -> None:
"""Instantiate the transport.
@@ -98,6 +99,8 @@ def __init__(
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
+ be used for service account credentials.
Raises:
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -150,7 +153,7 @@ def __init__(
scopes=scopes,
quota_project_id=quota_project_id,
client_info=client_info,
- always_use_jwt_access=True,
+ always_use_jwt_access=always_use_jwt_access,
)
if not self._grpc_channel:
diff --git a/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py b/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py
index 9c23a3e5..a141b4cb 100644
--- a/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py
+++ b/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py
@@ -104,6 +104,7 @@ def __init__(
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
quota_project_id=None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
+ always_use_jwt_access: Optional[bool] = False,
) -> None:
"""Instantiate the transport.
@@ -145,6 +146,8 @@ def __init__(
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
+ be used for service account credentials.
Raises:
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -196,7 +199,7 @@ def __init__(
scopes=scopes,
quota_project_id=quota_project_id,
client_info=client_info,
- always_use_jwt_access=True,
+ always_use_jwt_access=always_use_jwt_access,
)
if not self._grpc_channel:
diff --git a/tests/unit/gapic/language_v1/test_language_service.py b/tests/unit/gapic/language_v1/test_language_service.py
index 6c3e890b..c6b8ffae 100644
--- a/tests/unit/gapic/language_v1/test_language_service.py
+++ b/tests/unit/gapic/language_v1/test_language_service.py
@@ -128,7 +128,25 @@ def test_language_service_client_service_account_always_use_jwt(client_class):
) as use_jwt:
creds = service_account.Credentials(None, None, None)
client = client_class(credentials=creds)
- use_jwt.assert_called_with(True)
+ use_jwt.assert_not_called()
+
+
+@pytest.mark.parametrize(
+ "transport_class,transport_name",
+ [
+ (transports.LanguageServiceGrpcTransport, "grpc"),
+ (transports.LanguageServiceGrpcAsyncIOTransport, "grpc_asyncio"),
+ ],
+)
+def test_language_service_client_service_account_always_use_jwt_true(
+ transport_class, transport_name
+):
+ with mock.patch.object(
+ service_account.Credentials, "with_always_use_jwt_access", create=True
+ ) as use_jwt:
+ creds = service_account.Credentials(None, None, None)
+ transport = transport_class(credentials=creds, always_use_jwt_access=True)
+ use_jwt.assert_called_once_with(True)
@pytest.mark.parametrize(
@@ -1860,10 +1878,7 @@ def test_language_service_grpc_transport_client_cert_source_for_mtls(transport_c
"squid.clam.whelk:443",
credentials=cred,
credentials_file=None,
- scopes=(
- "https://www.googleapis.com/auth/cloud-language",
- "https://www.googleapis.com/auth/cloud-platform",
- ),
+ scopes=None,
ssl_credentials=mock_ssl_channel_creds,
quota_project_id=None,
options=[
@@ -1972,10 +1987,7 @@ def test_language_service_transport_channel_mtls_with_client_cert_source(
"mtls.squid.clam.whelk:443",
credentials=cred,
credentials_file=None,
- scopes=(
- "https://www.googleapis.com/auth/cloud-language",
- "https://www.googleapis.com/auth/cloud-platform",
- ),
+ scopes=None,
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
@@ -2022,10 +2034,7 @@ def test_language_service_transport_channel_mtls_with_adc(transport_class):
"mtls.squid.clam.whelk:443",
credentials=mock_cred,
credentials_file=None,
- scopes=(
- "https://www.googleapis.com/auth/cloud-language",
- "https://www.googleapis.com/auth/cloud-platform",
- ),
+ scopes=None,
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
diff --git a/tests/unit/gapic/language_v1beta2/test_language_service.py b/tests/unit/gapic/language_v1beta2/test_language_service.py
index ce020432..9cf4a9f2 100644
--- a/tests/unit/gapic/language_v1beta2/test_language_service.py
+++ b/tests/unit/gapic/language_v1beta2/test_language_service.py
@@ -130,7 +130,25 @@ def test_language_service_client_service_account_always_use_jwt(client_class):
) as use_jwt:
creds = service_account.Credentials(None, None, None)
client = client_class(credentials=creds)
- use_jwt.assert_called_with(True)
+ use_jwt.assert_not_called()
+
+
+@pytest.mark.parametrize(
+ "transport_class,transport_name",
+ [
+ (transports.LanguageServiceGrpcTransport, "grpc"),
+ (transports.LanguageServiceGrpcAsyncIOTransport, "grpc_asyncio"),
+ ],
+)
+def test_language_service_client_service_account_always_use_jwt_true(
+ transport_class, transport_name
+):
+ with mock.patch.object(
+ service_account.Credentials, "with_always_use_jwt_access", create=True
+ ) as use_jwt:
+ creds = service_account.Credentials(None, None, None)
+ transport = transport_class(credentials=creds, always_use_jwt_access=True)
+ use_jwt.assert_called_once_with(True)
@pytest.mark.parametrize(
@@ -1862,10 +1880,7 @@ def test_language_service_grpc_transport_client_cert_source_for_mtls(transport_c
"squid.clam.whelk:443",
credentials=cred,
credentials_file=None,
- scopes=(
- "https://www.googleapis.com/auth/cloud-language",
- "https://www.googleapis.com/auth/cloud-platform",
- ),
+ scopes=None,
ssl_credentials=mock_ssl_channel_creds,
quota_project_id=None,
options=[
@@ -1974,10 +1989,7 @@ def test_language_service_transport_channel_mtls_with_client_cert_source(
"mtls.squid.clam.whelk:443",
credentials=cred,
credentials_file=None,
- scopes=(
- "https://www.googleapis.com/auth/cloud-language",
- "https://www.googleapis.com/auth/cloud-platform",
- ),
+ scopes=None,
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
@@ -2024,10 +2036,7 @@ def test_language_service_transport_channel_mtls_with_adc(transport_class):
"mtls.squid.clam.whelk:443",
credentials=mock_cred,
credentials_file=None,
- scopes=(
- "https://www.googleapis.com/auth/cloud-language",
- "https://www.googleapis.com/auth/cloud-platform",
- ),
+ scopes=None,
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
From 34face7ed224e389f72ed7cf3d052b5b142d4599 Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Thu, 1 Jul 2021 09:13:23 -0700
Subject: [PATCH 11/11] chore: release 2.2.0 (#140)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
---
CHANGELOG.md | 17 +++++++++++++++++
setup.py | 2 +-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 00186afc..5ea6668d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,23 @@
[1]: https://pypi.org/project/google-cloud-language/#history
+## [2.2.0](https://www.github.com/googleapis/python-language/compare/v2.1.0...v2.2.0) (2021-07-01)
+
+
+### Features
+
+* add always_use_jwt_access ([#138](https://www.github.com/googleapis/python-language/issues/138)) ([242aa5e](https://www.github.com/googleapis/python-language/commit/242aa5e997161104b760f554f69f2eecd86cd560))
+
+
+### Bug Fixes
+
+* disable always_use_jwt_access ([#143](https://www.github.com/googleapis/python-language/issues/143)) ([21c9d6e](https://www.github.com/googleapis/python-language/commit/21c9d6e1a96707007bdcf23ce667f02b42c8a207))
+
+
+### Documentation
+
+* omit mention of Python 2.7 in 'CONTRIBUTING.rst' ([#1127](https://www.github.com/googleapis/python-language/issues/1127)) ([#132](https://www.github.com/googleapis/python-language/issues/132)) ([bc5f89e](https://www.github.com/googleapis/python-language/commit/bc5f89e3d21bccd2d78ae3f2f4038b19db54871d))
+
## [2.1.0](https://www.github.com/googleapis/python-language/compare/v1.4.0...v2.1.0) (2021-06-16)
diff --git a/setup.py b/setup.py
index e3503c0c..f96d2c35 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@
name = "google-cloud-language"
description = "Google Cloud Natural Language API client library"
-version = "2.1.0"
+version = "2.2.0"
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Development Status :: 4 - Beta'