From 9edab8d9ca1ee227059f1c394d0894c601b677d7 Mon Sep 17 00:00:00 2001 From: Nickolai Novik Date: Wed, 16 Nov 2016 23:15:36 +0200 Subject: [PATCH 1/7] close responses in tests --- tests/test_basic_s3.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_basic_s3.py b/tests/test_basic_s3.py index 9e68a623..9c5d6ec0 100644 --- a/tests/test_basic_s3.py +++ b/tests/test_basic_s3.py @@ -124,6 +124,7 @@ def test_get_object_stream_wrapper(s3_client, create_object, bucket_name): chunk2 = yield from body.read() assert chunk1 == b'b' assert chunk2 == b'ody contents' + response['Body'].close() @pytest.mark.run_loop @@ -204,6 +205,7 @@ def test_unicode_key_put_list(s3_client, bucket_name, create_object): assert parsed['Contents'][0]['Key'] == key_name parsed = yield from s3_client.get_object(Bucket=bucket_name, Key=key_name) data = yield from parsed['Body'].read() + parsed['Body'].close() assert data == b'foo' @@ -255,6 +257,7 @@ def test_copy_with_quoted_char(s3_client, create_object, bucket_name): # Now verify we can retrieve the copied object. resp = yield from s3_client.get_object(Bucket=bucket_name, Key=key_name2) data = yield from resp['Body'].read() + resp['Body'].close() assert data == b'foo' @@ -271,6 +274,7 @@ def test_copy_with_query_string(s3_client, create_object, bucket_name): # Now verify we can retrieve the copied object. resp = yield from s3_client.get_object(Bucket=bucket_name, Key=key_name2) data = yield from resp['Body'].read() + resp['Body'].close() assert data == b'foo' @@ -287,6 +291,7 @@ def test_can_copy_with_dict_form(s3_client, create_object, bucket_name): # Now verify we can retrieve the copied object. resp = yield from s3_client.get_object(Bucket=bucket_name, Key=key_name2) data = yield from resp['Body'].read() + resp['Body'].close() assert data == b'foo' From ef2cdcc07c2310c2d2b722a8ce087dd2f9dfc362 Mon Sep 17 00:00:00 2001 From: Nickolai Novik Date: Wed, 16 Nov 2016 23:24:23 +0200 Subject: [PATCH 2/7] update comment --- aiobotocore/client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aiobotocore/client.py b/aiobotocore/client.py index ff26eeed..2817c85b 100644 --- a/aiobotocore/client.py +++ b/aiobotocore/client.py @@ -133,9 +133,10 @@ def __aexit__(self, exc_type, exc_val, exc_tb): exc_val, exc_tb) def close(self): - """Close all http connections""" - # ClientSession.close() from aiohttp returns asyncio.Future here so - # this method could be used with yield from/await + """Close all http connections. This is coroutine, and should be + awaited. Method will be coroutine (instead returning Future) once + aiohttp does that. + """ return self._endpoint._aio_session.close() From f438e0a87c10a284fce15075c667b29788a97556 Mon Sep 17 00:00:00 2001 From: Nickolai Novik Date: Wed, 16 Nov 2016 23:27:07 +0200 Subject: [PATCH 3/7] pin aiohttp version to aiohttp>=1.1.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 999d5b6f..0eff1089 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages -install_requires = ['botocore>=1.4.0, <=1.4.73', 'aiohttp>=0.21.2'] +install_requires = ['botocore>=1.4.0, <=1.4.28', 'aiohttp>=1.1.0'] PY_VER = sys.version_info From 1234d78b2ed5ecbcb727c4277519f8361b1aa91c Mon Sep 17 00:00:00 2001 From: Nickolai Novik Date: Wed, 16 Nov 2016 23:31:47 +0200 Subject: [PATCH 4/7] update CHANGES.txt --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index eb39ca55..1b9822d0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,7 @@ Changes ^^^^^^^^^^^^^^^^^^ * Added enforcement of plain response #57 (thanks @rymir) +* botocore updated to version 1.4.73 #74 (thanks @vas3k) 0.0.5 (2016-06-01) From 5197f0681ed6902cc0dec4a14b39e54c209054ac Mon Sep 17 00:00:00 2001 From: Nickolai Novik Date: Wed, 16 Nov 2016 23:32:04 +0200 Subject: [PATCH 5/7] bump version to 0.0.6 --- aiobotocore/__init__.py | 2 +- examples/simple.py | 1 + requirements-dev.txt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/aiobotocore/__init__.py b/aiobotocore/__init__.py index 0f7897fe..ae082d84 100644 --- a/aiobotocore/__init__.py +++ b/aiobotocore/__init__.py @@ -1,4 +1,4 @@ from .session import get_session, AioSession -__version__ = '0.0.5' +__version__ = '0.0.6' (get_session, AioSession) # make pyflakes happy diff --git a/examples/simple.py b/examples/simple.py index a114a1d2..875948f4 100644 --- a/examples/simple.py +++ b/examples/simple.py @@ -32,5 +32,6 @@ def go(loop): resp = yield from client.delete_object(Bucket=bucket, Key=key) print(resp) + loop = asyncio.get_event_loop() loop.run_until_complete(go(loop)) diff --git a/requirements-dev.txt b/requirements-dev.txt index 3bf4ebc1..fbf967a6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -flake8==3.0.4 +flake8==3.2.0 pytest==3.0.4 pytest-cov==2.4.0 coverage==4.2 From 8003e394d876471f45da555e8e74b085ad0ffc43 Mon Sep 17 00:00:00 2001 From: Nickolai Novik Date: Wed, 16 Nov 2016 23:41:56 +0200 Subject: [PATCH 6/7] botocore version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0eff1089..ecc43160 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages -install_requires = ['botocore>=1.4.0, <=1.4.28', 'aiohttp>=1.1.0'] +install_requires = ['botocore>=1.4.29, <=1.4.73', 'aiohttp>=1.1.0'] PY_VER = sys.version_info From 41c3c6aebf885bf92ca5ef9c040901979411d8dc Mon Sep 17 00:00:00 2001 From: Nickolai Novik Date: Sat, 19 Nov 2016 13:53:42 +0200 Subject: [PATCH 7/7] fix aiohttp aiohttp>=0.22.5 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ecc43160..c2afafc3 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages -install_requires = ['botocore>=1.4.29, <=1.4.73', 'aiohttp>=1.1.0'] +install_requires = ['botocore>=1.4.29, <=1.4.73', 'aiohttp>=0.22.5'] PY_VER = sys.version_info