From 12f76670f0f0e329be19964a7c1a678c1fe41534 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 17:55:06 +0200 Subject: [PATCH 1/6] chore(deps): update all dependencies (#367) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .github/workflows/unittest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 1a857a3d..77bfc2cc 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -42,7 +42,7 @@ jobs: run: | nox -s unit${{ matrix.option }}-${{ matrix.python }} - name: Upload coverage results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: coverage-artifacts path: .coverage${{ matrix.option }}-${{ matrix.python }} @@ -64,7 +64,7 @@ jobs: python -m pip install --upgrade setuptools pip wheel python -m pip install coverage - name: Download coverage results - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: coverage-artifacts path: .coverage-results/ From 44978730b9f7fc1e2dcc6a182f282794807f3eae Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 16:26:27 +0000 Subject: [PATCH 2/6] chore(python): use ubuntu 22.04 in docs image (#368) Source-Link: https://github.com/googleapis/synthtool/commit/f15cc72fb401b4861cedebb10af74afe428fb1f8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/docker/docs/Dockerfile | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index bc893c97..64f82d6b 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 -# created: 2022-04-06T10:30:21.687684602Z + digest: sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd +# created: 2022-04-21T15:43:16.246106921Z diff --git a/.kokoro/docker/docs/Dockerfile b/.kokoro/docker/docs/Dockerfile index 4e1b1fb8..238b87b9 100644 --- a/.kokoro/docker/docs/Dockerfile +++ b/.kokoro/docker/docs/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from ubuntu:20.04 +from ubuntu:22.04 ENV DEBIAN_FRONTEND noninteractive @@ -60,8 +60,24 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && rm -f /var/cache/apt/archives/*.deb +###################### Install python 3.8.11 + +# Download python 3.8.11 +RUN wget https://www.python.org/ftp/python/3.8.11/Python-3.8.11.tgz + +# Extract files +RUN tar -xvf Python-3.8.11.tgz + +# Install python 3.8.11 +RUN ./Python-3.8.11/configure --enable-optimizations +RUN make altinstall + +###################### Install pip RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ - && python3.8 /tmp/get-pip.py \ + && python3 /tmp/get-pip.py \ && rm /tmp/get-pip.py +# Test pip +RUN python3 -m pip + CMD ["python3.8"] From 022add16266f9c07f0f88eea13472cc2e0bfc991 Mon Sep 17 00:00:00 2001 From: Dorian Kind Date: Tue, 26 Apr 2022 12:44:33 +0200 Subject: [PATCH 3/6] fix: Avoid AttributeError if grpcio-status is not installed (#370) --- google/api_core/exceptions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/google/api_core/exceptions.py b/google/api_core/exceptions.py index bd2f8562..aaba8791 100644 --- a/google/api_core/exceptions.py +++ b/google/api_core/exceptions.py @@ -599,7 +599,9 @@ def from_grpc_error(rpc_exc): """ # NOTE(lidiz) All gRPC error shares the parent class grpc.RpcError. # However, check for grpc.RpcError breaks backward compatibility. - if isinstance(rpc_exc, grpc.Call) or _is_informative_grpc_error(rpc_exc): + if ( + grpc is not None and isinstance(rpc_exc, grpc.Call) + ) or _is_informative_grpc_error(rpc_exc): details, err_info = _parse_grpc_error_details(rpc_exc) return from_grpc_status( rpc_exc.code(), From 64802e104bf47c32a212e00494d4bf0bbcb2fe33 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 26 Apr 2022 18:26:17 -0400 Subject: [PATCH 4/6] test: use `not` instead of `is False` in assert (#366) * test: use == instead of is when comparing equality * use not instead of == --- tests/unit/test_extended_operation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_extended_operation.py b/tests/unit/test_extended_operation.py index ad62b778..c551bfa8 100644 --- a/tests/unit/test_extended_operation.py +++ b/tests/unit/test_extended_operation.py @@ -70,8 +70,8 @@ def make_extended_operation(responses=None): def test_constructor(): ex_op, refresh, _ = make_extended_operation() assert ex_op._extended_operation == refresh.responses[0] - assert ex_op.cancelled() is False - assert ex_op.done() is False + assert not ex_op.cancelled() + assert not ex_op.done() assert ex_op.name == TEST_OPERATION_NAME assert ex_op.status == CustomOperation.StatusCode.PENDING assert ex_op.error_code is None From 1ce2e5409e5b97a146390fcaaa385fe80087d571 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 29 Apr 2022 13:32:45 -0400 Subject: [PATCH 5/6] test: fix KeyError in test_rest_streaming.py (#373) --- tests/unit/test_rest_streaming.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/test_rest_streaming.py b/tests/unit/test_rest_streaming.py index 1b34a04f..a44c83c0 100644 --- a/tests/unit/test_rest_streaming.py +++ b/tests/unit/test_rest_streaming.py @@ -28,6 +28,7 @@ from google.protobuf import timestamp_pb2 +__protobuf__ = proto.module(package=__name__) SEED = int(time.time()) logging.info(f"Starting rest streaming tests with random seed: {SEED}") random.seed(SEED) From 52366f235bc1b94895d245188c7d71f0d4d1246a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 2 May 2022 05:24:26 -0400 Subject: [PATCH 6/6] chore(main): release 2.7.3 (#371) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ google/api_core/version.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ac245f8..bfebfa51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-api-core/#history +### [2.7.3](https://github.com/googleapis/python-api-core/compare/v2.7.2...v2.7.3) (2022-04-29) + + +### Bug Fixes + +* Avoid AttributeError if grpcio-status is not installed ([#370](https://github.com/googleapis/python-api-core/issues/370)) ([022add1](https://github.com/googleapis/python-api-core/commit/022add16266f9c07f0f88eea13472cc2e0bfc991)) + ### [2.7.2](https://github.com/googleapis/python-api-core/compare/v2.7.1...v2.7.2) (2022-04-13) diff --git a/google/api_core/version.py b/google/api_core/version.py index 52126b8e..138e01b3 100644 --- a/google/api_core/version.py +++ b/google/api_core/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.7.2" +__version__ = "2.7.3"