shopware-api-client 1.0.106__py3-none-any.whl → 1.0.107__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of shopware-api-client might be problematic. Click here for more details.
- shopware_api_client/base.py +3 -3
- shopware_api_client/exceptions.py +1 -1
- {shopware_api_client-1.0.106.dist-info → shopware_api_client-1.0.107.dist-info}/METADATA +1 -1
- {shopware_api_client-1.0.106.dist-info → shopware_api_client-1.0.107.dist-info}/RECORD +6 -6
- {shopware_api_client-1.0.106.dist-info → shopware_api_client-1.0.107.dist-info}/LICENSE +0 -0
- {shopware_api_client-1.0.106.dist-info → shopware_api_client-1.0.107.dist-info}/WHEEL +0 -0
shopware_api_client/base.py
CHANGED
|
@@ -127,7 +127,7 @@ class ClientBase:
|
|
|
127
127
|
headers = self._get_headers()
|
|
128
128
|
headers.update(kwargs.pop("headers", {}))
|
|
129
129
|
|
|
130
|
-
retry_wait_base = int(kwargs.pop("
|
|
130
|
+
retry_wait_base = int(kwargs.pop("retry_wait_base", 2))
|
|
131
131
|
retries = int(kwargs.pop("retries", 0))
|
|
132
132
|
retry_errors = tuple(
|
|
133
133
|
kwargs.pop("retry_errors", [SWAPIInternalServerError, SWAPIServiceUnavailable, SWAPIGatewayTimeout])
|
|
@@ -158,8 +158,8 @@ class ClientBase:
|
|
|
158
158
|
if not isinstance(errors, (list, tuple)):
|
|
159
159
|
raise ValueError("`errors` attribute in json not a list/tuple!")
|
|
160
160
|
|
|
161
|
-
error: SWAPIError | SWAPIErrorList = SWAPIError.from_errors(errors)
|
|
162
|
-
except ValueError:
|
|
161
|
+
error: SWAPIError | SWAPIErrorList = SWAPIError.from_errors(errors) # type: ignore
|
|
162
|
+
except (json.JSONDecodeError, ValueError):
|
|
163
163
|
error: SWAPIError | SWAPIErrorList = SWAPIError.from_response(response) # type: ignore
|
|
164
164
|
|
|
165
165
|
if isinstance(error, SWAPIErrorList) and len(error.errors) == 1:
|
|
@@ -95,7 +95,7 @@ class SWAPIError(SWAPIException):
|
|
|
95
95
|
@classmethod
|
|
96
96
|
def from_response(cls, response: Response) -> "SWAPIError":
|
|
97
97
|
exception_class = cls.get_exception_class(response.status_code)
|
|
98
|
-
response.headers["requested-url"] = response.request.url
|
|
98
|
+
response.headers["requested-url"] = str(response.request.url)
|
|
99
99
|
return exception_class(
|
|
100
100
|
status=response.status_code,
|
|
101
101
|
title=response.reason_phrase,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
shopware_api_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
shopware_api_client/base.py,sha256=
|
|
2
|
+
shopware_api_client/base.py,sha256=8KrOSxlFXDzkxvAj9YsjZhuEo07ZcXEvK3UvgZxGzZI,25331
|
|
3
3
|
shopware_api_client/client.py,sha256=vkTZ8WLIu0Q3_73gXvidkTSpMJlWsJUjFyhDY2f2ISM,7583
|
|
4
4
|
shopware_api_client/config.py,sha256=HStgfQcClpo_aqaTRDrqdTUjqSGPFkIMjrPwSruVnM8,1565
|
|
5
5
|
shopware_api_client/endpoints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -105,10 +105,10 @@ shopware_api_client/endpoints/store/__init__.py,sha256=LE_GL4jYVGrRdp6M1cPURI-UJ
|
|
|
105
105
|
shopware_api_client/endpoints/store/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
106
106
|
shopware_api_client/endpoints/store/core/address.py,sha256=Tm7ri-i0zhyt4LVEHaQy3xEvjapCCPRsYAp5lOCDOew,2774
|
|
107
107
|
shopware_api_client/endpoints/store/core/cart.py,sha256=34eNwuv7H9WZUtJGf4TkTGHiGynDT6xeAt0gIl7V4KI,2584
|
|
108
|
-
shopware_api_client/exceptions.py,sha256=
|
|
108
|
+
shopware_api_client/exceptions.py,sha256=KnOxav3iBPFfL3DVeURpaP2-lVHNDtiOt8jcmeZgxY8,4529
|
|
109
109
|
shopware_api_client/logging.py,sha256=4QSTK1vcdBew4shvLG-fm-xDOlddhOZeyb5T9Og0fSA,251
|
|
110
110
|
shopware_api_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
111
|
-
shopware_api_client-1.0.
|
|
112
|
-
shopware_api_client-1.0.
|
|
113
|
-
shopware_api_client-1.0.
|
|
114
|
-
shopware_api_client-1.0.
|
|
111
|
+
shopware_api_client-1.0.107.dist-info/LICENSE,sha256=qTihFhbGE2ZJJ7Byc9hnEYBY33yDK2Jw87SpAm0IKUs,1107
|
|
112
|
+
shopware_api_client-1.0.107.dist-info/METADATA,sha256=-kfmkjiQsLqvwM9y4QoeNCnt9qpows2Pg_h8uLbOUd4,22659
|
|
113
|
+
shopware_api_client-1.0.107.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
114
|
+
shopware_api_client-1.0.107.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|