Skip to content

Commit 3c6fc43

Browse files
committed
Attachments upload with 429
Problem: if an attachments upload encounters a 429 then the connection is closed resulting in a zero length file. Solution: Make sure that Verify is True which will enable keep-alive. Additionally upgrade all dependencies and reformat code to latest standard. Signed-off-by: Paul Hewlett <[email protected]>
1 parent 1e18920 commit 3c6fc43

38 files changed

+28
-56
lines changed

archivist/applications.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ def __params(
162162
display_name: Optional[str] = None,
163163
custom_claims: Optional[dict[str, str]] = None,
164164
) -> dict[str, Any]:
165-
166165
params = {}
167166

168167
if display_name is not None:

archivist/archivist.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ def __copy__(self) -> Archivist:
222222
)
223223

224224
def _add_headers(self, headers: dict[str, str] | None) -> dict[str, Any]:
225-
226225
if isinstance(headers, dict):
227226
newheaders = {**headers}
228227
else:

archivist/archivistpublic.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def __init__(
8383
verify: bool = True,
8484
max_time: float = MAX_TIME,
8585
):
86-
8786
self._verify = verify
8887
self._response_ring_buffer = deque(maxlen=self.RING_BUFFER_MAX_LEN)
8988
self._session = None

archivist/cmds/runner/run.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818

1919
def run(arch: archivist.Archivist, args):
20-
2120
LOGGER.info("Using version %s of rkvst-archivist", about.__version__)
2221
LOGGER.info("Namespace %s", args.namespace)
2322

archivist/cmds/template/run.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919

2020
def run(arch: "type_helper.Archivist", args):
21-
2221
LOGGER.info("Using version %s of rkvst-archivist", about.__version__)
2322
LOGGER.info("Namespace %s", args.namespace)
2423

archivist/compliance.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ def compliant_at_report(self, compliance: dict[str, Any]):
106106

107107
LOGGER.info("Compliant %s", compliance["compliant"])
108108
for outcome in compliance["compliance"]:
109-
110109
if outcome["compliant"]:
111110
continue
112111

archivist/parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ def common_parser(description: str):
145145

146146

147147
def endpoint(args):
148-
149148
if args.verbose:
150149
set_logger("DEBUG")
151150
else:
@@ -190,7 +189,7 @@ def endpoint(args):
190189
LOGGER.error("Critical error. Aborting.")
191190
sys_exit(1)
192191

193-
arch = Archivist(args.url, auth, verify=False, fixtures=fixtures)
192+
arch = Archivist(args.url, auth, fixtures=fixtures)
194193
if arch is None:
195194
LOGGER.error("Critical error. Aborting.")
196195
sys_exit(1)

archivist/runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ def args(self, identity_method, step):
280280
label = self.get(f"{noun}_label")
281281
func = self.label("use", noun)
282282
if label is not None and func:
283-
284283
identity = self.identity_from_label(noun, identity_method)
285284
if identity is None:
286285
raise ArchivistInvalidOperationError(f"unknown {noun} '{label}'")

archivist/subjects.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ def __params(
267267
wallet_pub_key: Optional[list[str]] = None,
268268
tessera_pub_key: Optional[list[str]] = None,
269269
) -> dict[str, Any]:
270-
271270
params = {}
272271

273272
if display_name is not None:

examples/access_policies_filter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def main():
3838
"https://app.rkvst.io",
3939
auth,
4040
) as arch:
41-
4241
# count access_policies...
4342
print(
4443
"no.of access_policies",

0 commit comments

Comments
 (0)