From e40148793d5a4f0e7396315a3853c7c9ef4c5c92 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Fri, 6 Aug 2021 16:27:03 -0400 Subject: [PATCH 1/3] tests: allow prerelease dependency versions under Python 3.9 Also, silence a warning from 'charset_normalizer', now used by 'requests' instead of 'chardet'. --- testing/constraints-3.9.txt | 2 ++ tests/unit/test_exceptions.py | 1 + 2 files changed, 3 insertions(+) diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index e69de29b..c0cd0f64 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -0,0 +1,2 @@ +# Allow prerelease versions of deps +--pre diff --git a/tests/unit/test_exceptions.py b/tests/unit/test_exceptions.py index 10599457..e9709f26 100644 --- a/tests/unit/test_exceptions.py +++ b/tests/unit/test_exceptions.py @@ -102,6 +102,7 @@ def test_from_http_response_no_content(): def test_from_http_response_text_content(): response = make_response(b"message") + response.encoding = "UTF8" # suppress charset_normalizer warning exception = exceptions.from_http_response(response) From fb9f186d4873d5d184c521a75c7bb5ddcb03b70d Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 17 Aug 2021 14:21:53 -0400 Subject: [PATCH 2/3] tests: revert testing prerelease deps on Python 3.9 Consensus from today's meeting is that testing against prereleases needs to happen outside the normal presubmit path. --- testing/constraints-3.9.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index c0cd0f64..e69de29b 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -1,2 +0,0 @@ -# Allow prerelease versions of deps ---pre From c9a4924bbae2f3ca196c9f1d016f6d8e6062a9f9 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 18 Aug 2021 12:08:12 -0400 Subject: [PATCH 3/3] chore: remove trailing whitespace --- google/api_core/retry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google/api_core/retry.py b/google/api_core/retry.py index 44cd7469..bd3a4a65 100644 --- a/google/api_core/retry.py +++ b/google/api_core/retry.py @@ -114,9 +114,9 @@ def if_exception_type_predicate(exception): - :class:`google.api_core.exceptions.TooManyRequests` - HTTP 429 - :class:`google.api_core.exceptions.ServiceUnavailable` - HTTP 503 - :class:`requests.exceptions.ConnectionError` -- :class:`requests.exceptions.ChunkedEncodingError` - The server declared +- :class:`requests.exceptions.ChunkedEncodingError` - The server declared chunked encoding but sent an invalid chunk. -- :class:`google.auth.exceptions.TransportError` - Used to indicate an +- :class:`google.auth.exceptions.TransportError` - Used to indicate an error occurred during an HTTP request. """ # pylint: enable=invalid-name