From dcd86ceee516b6702ed27a68d7f7bbd06939b324 Mon Sep 17 00:00:00 2001 From: "tim.reichard" Date: Mon, 14 Dec 2020 09:55:14 -0600 Subject: [PATCH] Fix bug with s3_list_objects truncating objects --- HISTORY.rst | 6 ++++++ aioradio/aws/s3.py | 1 - aioradio/requirements.txt | 10 +++++----- setup.py | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 921f4f5..9ccf0a9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,12 @@ History ======= +v0.9.5 (2020-12-14) +----------------------- + +* Fix bug with reseting list during paginate of list_objects. + + v0.9.4 (2020-12-11) ----------------------- diff --git a/aioradio/aws/s3.py b/aioradio/aws/s3.py index b61f6b7..f574533 100644 --- a/aioradio/aws/s3.py +++ b/aioradio/aws/s3.py @@ -46,7 +46,6 @@ async def list_s3_objects(bucket: str, s3_prefix: str, with_attributes: bool=Fal arr = [] paginator = S3['client']['obj'].get_paginator('list_objects') async for result in paginator.paginate(Bucket=bucket, Prefix=s3_prefix): - arr = [] for item in result.get('Contents', []): if with_attributes: arr.append(item) diff --git a/aioradio/requirements.txt b/aioradio/requirements.txt index 999b38a..f80840e 100644 --- a/aioradio/requirements.txt +++ b/aioradio/requirements.txt @@ -8,14 +8,14 @@ flask==1.1.2 httpx==0.16.1 mandrill==1.0.59 moto==1.3.16 -orjson==3.4.5 -pre-commit==2.9.2 +orjson==3.4.6 +pre-commit==2.9.3 pylint==2.6.0 pyodbc==4.0.30 -pysmb==1.2.5 -pytest==6.1.2 +pysmb==1.2.6 +pytest==6.2.0 pytest-asyncio==0.14.0 pytest-cov==2.10.1 python-json-logger==2.0.1 twine==3.2.0 -wheel==0.36.0 +wheel==0.36.2 diff --git a/setup.py b/setup.py index 52569b3..58e5d44 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ long_description = fileobj.read() setup(name='aioradio', - version='0.9.4', + version='0.9.5', description='Generic asynchronous i/o python utilities for AWS services (SQS, S3, DynamoDB, Secrets Manager), Redis, MSSQL (pyodbc), JIRA and more', long_description=long_description, long_description_content_type="text/markdown",