From 60d5581344f9595fc20e5fe1bb875424a51fd8e6 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Tue, 17 May 2022 17:27:04 +0100 Subject: [PATCH 1/2] add to test matrix --- .github/workflows/code.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 26648cd5..0bff7e87 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -64,10 +64,10 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "windows-latest"] # can add , macos-latest + os: ["ubuntu-latest", "windows-latest", "macos-latest"] # keep matrix tight for now to avoid HTTP 429 errors # TODO: restore macos and 3.9 and 3.10 - python: ["3.8"] + python: ["3.8", "3.9"] lock: [false] include: From a8cefbc69967d0876fe3bf2195bc48c6c362a5ba Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Tue, 17 May 2022 19:59:22 +0100 Subject: [PATCH 2/2] add 429 to the status_forcelist --- src/gphotos_sync/GooglePhotosDownload.py | 2 +- src/gphotos_sync/authorize.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gphotos_sync/GooglePhotosDownload.py b/src/gphotos_sync/GooglePhotosDownload.py index 09b75b52..da03f24c 100644 --- a/src/gphotos_sync/GooglePhotosDownload.py +++ b/src/gphotos_sync/GooglePhotosDownload.py @@ -88,7 +88,7 @@ def __init__( retries = Retry( total=settings.max_retries, backoff_factor=5, - status_forcelist=[500, 502, 503, 504, 509], + status_forcelist=[500, 502, 503, 504, 509, 429], allowed_methods=frozenset(["GET", "POST"]), raise_on_status=False, respect_retry_after_header=True, diff --git a/src/gphotos_sync/authorize.py b/src/gphotos_sync/authorize.py index 9113ce98..dc3fd96f 100644 --- a/src/gphotos_sync/authorize.py +++ b/src/gphotos_sync/authorize.py @@ -112,7 +112,7 @@ def authorize(self): retries = Retry( total=self.max_retries, backoff_factor=5, - status_forcelist=[500, 502, 503, 504], + status_forcelist=[500, 502, 503, 504, 429], allowed_methods=frozenset(["GET", "POST"]), raise_on_status=False, respect_retry_after_header=True,