From d3fb18c0803fd421eb09aead39cd82013b3cd333 Mon Sep 17 00:00:00 2001 From: Renan Butkeraites Date: Thu, 26 Sep 2024 18:57:54 -0300 Subject: [PATCH] Fix issues with running the tap and with bills execution --- pyproject.toml | 6 +++--- tap_restaurant365/client.py | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3630d09..cdbe923 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,14 +11,14 @@ keywords = [ license = "Apache-2.0" [tool.poetry.dependencies] -python = ">=3.7.1,<4" -singer-sdk = { version="~=0.33.1" } +python = ">=3.7.1,<3.11" +singer-sdk = {git = "https://github.com/hotgluexyz/singer-sdk.git", rev = "v0.4.3"} fs-s3fs = { version = "~=1.1.1", optional = true } requests = "~=2.31.0" [tool.poetry.group.dev.dependencies] pytest = ">=7.4.0" -singer-sdk = { version="~=0.33.1", extras = ["testing"] } +singer-sdk = {git = "https://github.com/hotgluexyz/singer-sdk.git", rev = "v0.4.3", extras = ["testing"]} [tool.poetry.extras] s3 = ["fs-s3fs"] diff --git a/tap_restaurant365/client.py b/tap_restaurant365/client.py index 2fa06d4..30c1bb4 100644 --- a/tap_restaurant365/client.py +++ b/tap_restaurant365/client.py @@ -12,7 +12,6 @@ from dateutil import parser from singer_sdk.authenticators import BasicAuthenticator from singer_sdk.exceptions import FatalAPIError, RetriableAPIError -from singer_sdk.pagination import BaseAPIPaginator # noqa: TCH002 from singer_sdk.streams import RESTStream _Auth = Callable[[requests.PreparedRequest], requests.PreparedRequest] @@ -103,8 +102,8 @@ def get_url_params( def validate_response(self, response: requests.Response) -> None: if ( - response.status_code in self.extra_retry_statuses - or response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + or (hasattr(self, "extra_retry_statuses") and response.status_code in self.extra_retry_statuses) ): msg = self.response_error_message(response) raise RetriableAPIError(msg, response)