-
-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.4.0: pytest is failing #965
Comments
Here is pytest output: + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.4.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.4.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0, configfile: pytest.ini
plugins: asyncio-0.19.0
asyncio: mode=strict
collected 182 items
tests/test_adaptive.py ........... [ 6%]
tests/test_basic_s3.py FFFFFFFFFFFFFFFFEFFFFsFFFFFFFFFF [ 23%]
tests/test_batch.py F [ 23%]
tests/test_config.py ..... [ 26%]
tests/test_dynamodb.py FFFFFF [ 29%]
tests/test_ec2.py F [ 30%]
tests/test_eventstreams.py FF [ 31%]
tests/test_lambda.py F [ 31%]
tests/test_monitor.py F [ 32%]
tests/test_mturk.py F [ 32%]
tests/test_patches.py .F [ 34%]
tests/test_response.py ............... [ 42%]
tests/test_session.py .. [ 43%]
tests/test_sns.py EEEEEEFF [ 46%]
tests/test_sqs.py FFFF [ 48%]
tests/test_version.py . [ 48%]
tests/test_waiter.py F [ 49%]
tests/boto_tests/test_credentials.py ............................FFFEFFF [ 68%]
tests/boto_tests/test_signers.py F [ 69%]
tests/boto_tests/test_utils.py ........ [ 73%]
tests/python3.8/test_eventstreams.py F [ 74%]
tests/python3.8/boto_tests/test_credentials.py ............... [ 82%]
tests/python3.8/boto_tests/test_signers.py ..FFFFFF [ 86%]
tests/python3.8/boto_tests/test_utils.py ........................ [100%]
================================================================================== ERRORS ==================================================================================
_______________________________________________________________ ERROR at teardown of test_paginate_max_items _______________________________________________________________
/usr/lib/python3.8/site-packages/pygments/lexer.py:218: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
def __init__(self, _root_lexer, _language_lexer, _needle=Other, **options):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
def fin():
event_loop.run_until_complete(
> s3_client.abort_multipart_upload(
UploadId=upload_id, Bucket=bucket_name, Key=_key_name
)
)
E AttributeError: 'async_generator' object has no attribute 'abort_multipart_upload'
tests/conftest.py:497: AttributeError
_________________________________________________________________ ERROR at setup of test_topic_attributes __________________________________________________________________
region = 'us-east-1', create_topic = <function create_topic.<locals>._f at 0x7f3e25b21820>, sns_client = <async_generator object sns_client at 0x7f3e25b21040>
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
@pytest.fixture
def topic_arn(region, create_topic, sns_client, event_loop):
> arn = event_loop.run_until_complete(create_topic())
tests/conftest.py:535:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
async def _f():
nonlocal _topic_arn
> response = await sns_client.create_topic(Name=random_name())
E AttributeError: 'async_generator' object has no attribute 'create_topic'
tests/conftest.py:550: AttributeError
________________________________________________________________ ERROR at teardown of test_topic_attributes ________________________________________________________________
def fin():
> event_loop.run_until_complete(delete_topic(sns_client, _topic_arn))
tests/conftest.py:556:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sns_client = <async_generator object sns_client at 0x7f3e25b21040>, topic_arn = None
async def delete_topic(sns_client, topic_arn):
> response = await sns_client.delete_topic(TopicArn=topic_arn)
E AttributeError: 'async_generator' object has no attribute 'delete_topic'
tests/conftest.py:540: AttributeError
_______________________________________________________________ ERROR at setup of test_creating_subscription _______________________________________________________________
region = 'us-east-1', create_topic = <function create_topic.<locals>._f at 0x7f3e252f1160>, sns_client = <async_generator object sns_client at 0x7f3e252f1280>
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
@pytest.fixture
def topic_arn(region, create_topic, sns_client, event_loop):
> arn = event_loop.run_until_complete(create_topic())
tests/conftest.py:535:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
async def _f():
nonlocal _topic_arn
> response = await sns_client.create_topic(Name=random_name())
E AttributeError: 'async_generator' object has no attribute 'create_topic'
tests/conftest.py:550: AttributeError
_____________________________________________________________ ERROR at teardown of test_creating_subscription ______________________________________________________________
def fin():
> event_loop.run_until_complete(delete_topic(sns_client, _topic_arn))
tests/conftest.py:556:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sns_client = <async_generator object sns_client at 0x7f3e252f1280>, topic_arn = None
async def delete_topic(sns_client, topic_arn):
> response = await sns_client.delete_topic(TopicArn=topic_arn)
E AttributeError: 'async_generator' object has no attribute 'delete_topic'
tests/conftest.py:540: AttributeError
__________________________________________________________________ ERROR at setup of test_publish_to_http __________________________________________________________________
region = 'us-east-1', create_topic = <function create_topic.<locals>._f at 0x7f3e25e75c10>, sns_client = <async_generator object sns_client at 0x7f3e25e75a60>
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
@pytest.fixture
def topic_arn(region, create_topic, sns_client, event_loop):
> arn = event_loop.run_until_complete(create_topic())
tests/conftest.py:535:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
async def _f():
nonlocal _topic_arn
> response = await sns_client.create_topic(Name=random_name())
E AttributeError: 'async_generator' object has no attribute 'create_topic'
tests/conftest.py:550: AttributeError
________________________________________________________________ ERROR at teardown of test_publish_to_http _________________________________________________________________
def fin():
> event_loop.run_until_complete(delete_topic(sns_client, _topic_arn))
tests/conftest.py:556:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sns_client = <async_generator object sns_client at 0x7f3e25e75a60>, topic_arn = None
async def delete_topic(sns_client, topic_arn):
> response = await sns_client.delete_topic(TopicArn=topic_arn)
E AttributeError: 'async_generator' object has no attribute 'delete_topic'
tests/conftest.py:540: AttributeError
________________________________________________________ ERROR at setup of test_load_sso_credentials_without_cache _________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/tests/boto_tests/test_credentials.py, line 1256
def test_load_sso_credentials_without_cache(self):
E fixture 'self' not found
> available fixtures: aa_fail_proxy_config, aa_succeed_proxy_config, aio_session, alternative_region, alternative_s3_client, assume_role_setup, assumerolecredprovider_config_loader, base_assume_role_test_setup, base_env_var_setup, batch_client, batch_server, bucket_name, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, cloudformation_client, cloudformation_server, config, create_bucket, create_multipart_upload, create_object, create_table, create_topic, credential_provider, debug, doctest_namespace, dynamodb2_server, dynamodb_client, dynamodb_put_item, ec2_client, ec2_server, event_loop, exit_stack, iam_client, iam_server, kinesis_client, kinesis_server, lambda_client, lambda_server, mock_session, mocking_test, monkeypatch, patch_attributes, profile_config, pytestconfig, rds_client, rds_server, record_property, record_testsuite_property, record_xml_attribute, recwarn, region, s3_client, s3_server, s3_verify, session, signature_version, sns_client, sns_server, sqs_client, sqs_queue_url, sqs_server, ssl_credential_fetcher_setup, sso_provider_setup, table_name, tempdir, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, topic_arn, unused_tcp_port, unused_tcp_port_factory, unused_udp_port, unused_udp_port_factory
> use 'pytest --fixtures [testpath]' for help on them.
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/tests/boto_tests/test_credentials.py:1256
================================================================================= FAILURES =================================================================================
__________________________________________________________________________ test_can_make_request ___________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25f82280>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_can_make_request(s3_client):
# Basic smoke test to ensure we can talk to s3.
> result = await s3_client.list_buckets()
E AttributeError: 'async_generator' object has no attribute 'list_buckets'
tests/test_basic_s3.py:23: AttributeError
__________________________________________________________________ test_can_make_request_no_verify[False] __________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25ef0dc0>
@pytest.mark.moto
@pytest.mark.parametrize('s3_verify', [False])
@pytest.mark.asyncio
async def test_can_make_request_no_verify(s3_client):
# Basic smoke test to ensure we can talk to s3.
> result = await s3_client.list_buckets()
E AttributeError: 'async_generator' object has no attribute 'list_buckets'
tests/test_basic_s3.py:35: AttributeError
_________________________________________________________________________ test_fail_proxy_request __________________________________________________________________________
aa_fail_proxy_config = None, s3_client = <async_generator object s3_client at 0x7f3e25d92310>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f3e25f7ff10>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_fail_proxy_request(
aa_fail_proxy_config, s3_client, monkeypatch
):
# based on test_can_make_request
with pytest.raises(httpsession.ProxyConnectionError):
> await s3_client.list_buckets()
E AttributeError: 'async_generator' object has no attribute 'list_buckets'
tests/test_basic_s3.py:49: AttributeError
____________________________________________________________________ test_succeed_proxy_request[False] _____________________________________________________________________
aa_succeed_proxy_config = None, s3_client = <async_generator object s3_client at 0x7f3e25d929d0>
@pytest.mark.asyncio
@pytest.mark.parametrize('mocking_test', [False])
async def test_succeed_proxy_request(aa_succeed_proxy_config, s3_client):
> result = await s3_client.list_buckets()
E AttributeError: 'async_generator' object has no attribute 'list_buckets'
tests/test_basic_s3.py:55: AttributeError
_______________________________________________________________________ test_can_get_bucket_location _______________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25d92ee0>, bucket_name = <async_generator object bucket_name at 0x7f3e25cd10d0>
@pytest.mark.asyncio
@pytest.mark.moto
async def test_can_get_bucket_location(s3_client, bucket_name):
> result = await s3_client.get_bucket_location(Bucket=bucket_name)
E AttributeError: 'async_generator' object has no attribute 'get_bucket_location'
tests/test_basic_s3.py:63: AttributeError
____________________________________________________________________ test_can_delete_urlencoded_object _____________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25cd1670>, bucket_name = <async_generator object bucket_name at 0x7f3e25cd18b0>
create_object = <function create_object.<locals>._f at 0x7f3e25cd1940>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_can_delete_urlencoded_object(
s3_client, bucket_name, create_object
):
key_name = 'a+b/foo'
> await create_object(key_name=key_name)
tests/test_basic_s3.py:76:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'a+b/foo', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
____________________________________________________________________________ test_can_paginate _____________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25cd1820>, bucket_name = <async_generator object bucket_name at 0x7f3e25cd1af0>
create_object = <function create_object.<locals>._f at 0x7f3e25cd1ca0>
@pytest.mark.asyncio
@pytest.mark.moto
async def test_can_paginate(s3_client, bucket_name, create_object):
for i in range(5):
key_name = 'key%s' % i
> await create_object(key_name)
tests/test_basic_s3.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'key0', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
_____________________________________________________________________ test_can_paginate_with_page_size _____________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25cd1f70>, bucket_name = <async_generator object bucket_name at 0x7f3e25e971f0>
create_object = <function create_object.<locals>._f at 0x7f3e25e97310>
@pytest.mark.asyncio
@pytest.mark.moto
async def test_can_paginate_with_page_size(
s3_client, bucket_name, create_object
):
for i in range(5):
key_name = 'key%s' % i
> await create_object(key_name)
tests/test_basic_s3.py:115:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'key0', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
_________________________________________________________________________ test_can_search_paginate _________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25e97820>, bucket_name = <async_generator object bucket_name at 0x7f3e25e97a60>
create_object = <function create_object.<locals>._f at 0x7f3e25e97550>
@pytest.mark.asyncio
@pytest.mark.moto
async def test_can_search_paginate(s3_client, bucket_name, create_object):
keys = []
for i in range(5):
key_name = 'key%s' % i
keys.append(key_name)
> await create_object(key_name)
tests/test_basic_s3.py:136:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'key0', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
________________________________________________________________________ test_can_paginate_iterator ________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25e97f70>, bucket_name = <async_generator object bucket_name at 0x7f3e25e350d0>
create_object = <function create_object.<locals>._f at 0x7f3e25e351f0>
@pytest.mark.asyncio
@pytest.mark.moto
async def test_can_paginate_iterator(s3_client, bucket_name, create_object):
for i in range(5):
key_name = 'key%s' % i
> await create_object(key_name)
tests/test_basic_s3.py:149:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'key0', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
__________________________________________________________________________ test_result_key_iters ___________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25e97940>, bucket_name = <async_generator object bucket_name at 0x7f3e25e970d0>
create_object = <function create_object.<locals>._f at 0x7f3e25cd1dc0>
@pytest.mark.asyncio
@pytest.mark.moto
async def test_result_key_iters(s3_client, bucket_name, create_object):
for i in range(5):
key_name = f'key/{i}/{i}'
> await create_object(key_name)
tests/test_basic_s3.py:169:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'key/0/0', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
_______________________________________________________________________ test_can_get_and_put_object ________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25cd1ca0>, create_object = <function create_object.<locals>._f at 0x7f3e25cd1f70>
bucket_name = <async_generator object bucket_name at 0x7f3e25cd1040>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_can_get_and_put_object(s3_client, create_object, bucket_name):
> await create_object('foobarbaz', body='body contents')
tests/test_basic_s3.py:198:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'foobarbaz', body = 'body contents'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
___________________________________________________________________________ test_adaptive_retry ____________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25e35820>, config = <aiobotocore.config.AioConfig object at 0x7f3e25eb3730>
create_object = <function create_object.<locals>._f at 0x7f3e25e35af0>, bucket_name = <async_generator object bucket_name at 0x7f3e25e35430>
patch_attributes = [<function on_sending_request at 0x7f3e25d92dc0>, <function on_receiving_response at 0x7f3e25ef0d30>, <function on_sending_request at 0x7f3e25dde790>, <function on_receiving_response at 0x7f3e25ddec10>]
@pytest.mark.moto
@pytest.mark.asyncio
@pytest.mark.patch_attributes(
[
dict(
target="aiobotocore.retries.adaptive.AsyncClientRateLimiter.on_sending_request",
side_effect=aiobotocore.retries.adaptive.AsyncClientRateLimiter.on_sending_request,
autospec=True,
),
dict(
target="aiobotocore.retries.adaptive.AsyncClientRateLimiter.on_receiving_response",
side_effect=aiobotocore.retries.adaptive.AsyncClientRateLimiter.on_receiving_response,
autospec=True,
),
dict(
target="botocore.retries.adaptive.ClientRateLimiter.on_sending_request",
side_effect=botocore.retries.adaptive.ClientRateLimiter.on_sending_request,
autospec=True,
),
dict(
target="botocore.retries.adaptive.ClientRateLimiter.on_receiving_response",
side_effect=botocore.retries.adaptive.ClientRateLimiter.on_receiving_response,
autospec=True,
),
]
)
@pytest.mark.config_kwargs(
dict(retries={"max_attempts": 5, "mode": "adaptive"})
)
async def test_adaptive_retry(
s3_client, config, create_object, bucket_name, patch_attributes
):
> await create_object('foobarbaz', body='body contents')
tests/test_basic_s3.py:238:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'foobarbaz', body = 'body contents'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
______________________________________________________________________ test_get_object_stream_wrapper ______________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25cd1940>, create_object = <function create_object.<locals>._f at 0x7f3e25c61550>
bucket_name = <async_generator object bucket_name at 0x7f3e25c61310>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_get_object_stream_wrapper(
s3_client, create_object, bucket_name
):
> await create_object('foobarbaz', body='body contents')
tests/test_basic_s3.py:265:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'foobarbaz', body = 'body contents'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
______________________________________________________________________ test_get_object_stream_context ______________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25c61790>, create_object = <function create_object.<locals>._f at 0x7f3e25c611f0>
bucket_name = <async_generator object bucket_name at 0x7f3e25c619d0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_get_object_stream_context(
s3_client, create_object, bucket_name
):
> await create_object('foobarbaz', body='body contents')
tests/test_basic_s3.py:280:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'foobarbaz', body = 'body contents'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
_________________________________________________________________________ test_paginate_max_items __________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25c61ee0>, create_multipart_upload = <function create_multipart_upload.<locals>._f at 0x7f3e25e94160>
bucket_name = <async_generator object bucket_name at 0x7f3e25e94040>
@pytest.mark.asyncio
@pytest.mark.moto
async def test_paginate_max_items(
s3_client, create_multipart_upload, bucket_name
):
> await create_multipart_upload('foo/key1')
tests/test_basic_s3.py:291:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'foo/key1'
async def _f(key_name):
nonlocal _key_name
nonlocal upload_id
_key_name = key_name
> parsed = await s3_client.create_multipart_upload(
Bucket=bucket_name, Key=key_name
)
E AttributeError: 'async_generator' object has no attribute 'create_multipart_upload'
tests/conftest.py:489: AttributeError
___________________________________________________________________ test_paginate_within_page_boundaries ___________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25e949d0>, create_object = <function create_object.<locals>._f at 0x7f3e25e94c10>
bucket_name = <async_generator object bucket_name at 0x7f3e25e944c0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_paginate_within_page_boundaries(
s3_client, create_object, bucket_name
):
> await create_object('a')
tests/test_basic_s3.py:332:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'a', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
_____________________________________________________________________ test_unicode_key_put_list[False] _____________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25d70040>, bucket_name = <async_generator object bucket_name at 0x7f3e25d70280>
create_object = <function create_object.<locals>._f at 0x7f3e25d703a0>
@pytest.mark.asyncio
@pytest.mark.parametrize('mocking_test', [False])
async def test_unicode_key_put_list(s3_client, bucket_name, create_object):
# Verify we can upload a key with a unicode char and list it as well.
key_name = '\u2713'
> await create_object(key_name)
tests/test_basic_s3.py:376:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = '✓', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
___________________________________________________________________ test_unicode_system_character[False] ___________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25d708b0>, bucket_name = <async_generator object bucket_name at 0x7f3e25d70af0>
create_object = <function create_object.<locals>._f at 0x7f3e25d705e0>
@pytest.mark.asyncio
@pytest.mark.parametrize('mocking_test', [False])
async def test_unicode_system_character(s3_client, bucket_name, create_object):
# Verify we can use a unicode system character which would normally
# break the xml parser
key_name = 'foo\x08'
> await create_object(key_name)
tests/test_basic_s3.py:392:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'foo\x08', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
______________________________________________________________________ test_non_normalized_key_paths _______________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25c61ee0>, bucket_name = <async_generator object bucket_name at 0x7f3e25c61c10>
create_object = <function create_object.<locals>._f at 0x7f3e25c619d0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_non_normalized_key_paths(s3_client, bucket_name, create_object):
# The create_object method has assertEqual checks for 200 status.
> await create_object('key./././name')
tests/test_basic_s3.py:408:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'key./././name', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
________________________________________________________________________ test_copy_with_quoted_char ________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25c61160>, create_object = <function create_object.<locals>._f at 0x7f3e25c615e0>
bucket_name = <async_generator object bucket_name at 0x7f3e25c618b0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_copy_with_quoted_char(s3_client, create_object, bucket_name):
key_name = 'a+b/foo'
> await create_object(key_name=key_name)
tests/test_basic_s3.py:428:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'a+b/foo', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
_______________________________________________________________________ test_copy_with_query_string ________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25ef0af0>, create_object = <function create_object.<locals>._f at 0x7f3e25d99040>
bucket_name = <async_generator object bucket_name at 0x7f3e25ef0d30>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_copy_with_query_string(s3_client, create_object, bucket_name):
key_name = 'a+b/foo?notVersionid=bar'
> await create_object(key_name=key_name)
tests/test_basic_s3.py:447:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'a+b/foo?notVersionid=bar', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
_______________________________________________________________________ test_can_copy_with_dict_form _______________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25e35dc0>, create_object = <function create_object.<locals>._f at 0x7f3e25e35700>
bucket_name = <async_generator object bucket_name at 0x7f3e25e35af0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_can_copy_with_dict_form(s3_client, create_object, bucket_name):
key_name = 'a+b/foo?versionId=abcd'
> await create_object(key_name=key_name)
tests/test_basic_s3.py:467:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'a+b/foo?versionId=abcd', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
________________________________________________________________ test_can_copy_with_dict_form_with_version _________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25e35940>, create_object = <function create_object.<locals>._f at 0x7f3e25cd1af0>
bucket_name = <async_generator object bucket_name at 0x7f3e25e35550>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_can_copy_with_dict_form_with_version(
s3_client, create_object, bucket_name
):
key_name = 'a+b/foo?versionId=abcd'
> response = await create_object(key_name=key_name)
tests/test_basic_s3.py:489:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'a+b/foo?versionId=abcd', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
________________________________________________________________________ test_copy_with_s3_metadata ________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25cd1040>, create_object = <function create_object.<locals>._f at 0x7f3e25cd1790>
bucket_name = <async_generator object bucket_name at 0x7f3e25cd1280>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_copy_with_s3_metadata(s3_client, create_object, bucket_name):
key_name = 'foo.txt'
> await create_object(key_name=key_name)
tests/test_basic_s3.py:512:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'foo.txt', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
____________________________________________________ test_presign_with_existing_query_string_values[False-s3-us-east-1] ____________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25d923a0>, bucket_name = <async_generator object bucket_name at 0x7f3e25d92af0>
aio_session = <async_generator object aio_session at 0x7f3e25d92430>, create_object = <function create_object.<locals>._f at 0x7f3e25e97ee0>
@pytest.mark.parametrize('region', ['us-east-1'])
@pytest.mark.parametrize('signature_version', ['s3'])
# 'Content-Disposition' not supported by moto yet
@pytest.mark.parametrize('mocking_test', [False])
@pytest.mark.asyncio
async def test_presign_with_existing_query_string_values(
s3_client, bucket_name, aio_session, create_object
):
key_name = 'foo.txt'
> await create_object(key_name=key_name)
tests/test_basic_s3.py:533:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'foo.txt', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
_________________________________________________________________ test_presign_sigv4[False-s3v4-us-east-1] _________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25e97af0>, bucket_name = <async_generator object bucket_name at 0x7f3e25e973a0>
aio_session = <async_generator object aio_session at 0x7f3e25e97c10>, create_object = <function create_object.<locals>._f at 0x7f3e25e97f70>
@pytest.mark.parametrize('region', ['us-east-1'])
@pytest.mark.parametrize('signature_version', ['s3v4'])
# moto host will be localhost
@pytest.mark.parametrize('mocking_test', [False])
@pytest.mark.asyncio
async def test_presign_sigv4(
s3_client, bucket_name, aio_session, create_object
):
key = 'myobject'
> await create_object(key_name=key)
tests/test_basic_s3.py:560:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'myobject', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
_____________________________________________________________ test_can_follow_signed_url_redirect[False-s3v4] ______________________________________________________________
alternative_s3_client = <async_generator object alternative_s3_client at 0x7f3e25e97160>, create_object = <function create_object.<locals>._f at 0x7f3e25d70b80>
bucket_name = <async_generator object bucket_name at 0x7f3e25d70940>
@pytest.mark.parametrize('signature_version', ['s3v4'])
@pytest.mark.parametrize('mocking_test', [False])
@pytest.mark.asyncio
async def test_can_follow_signed_url_redirect(
alternative_s3_client, create_object, bucket_name
):
> await create_object('foobarbaz')
tests/test_basic_s3.py:584:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'foobarbaz', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
_____________________________________________________________ test_bucket_redirect[False-us-west-2-eu-west-1] ______________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25d923a0>, alternative_s3_client = <async_generator object alternative_s3_client at 0x7f3e25e35160>
region = 'eu-west-1', create_bucket = <async_generator object create_bucket at 0x7f3e25e35280>
@pytest.mark.parametrize('region', ['eu-west-1'])
@pytest.mark.parametrize('alternative_region', ['us-west-2'])
@pytest.mark.parametrize('mocking_test', [False])
@pytest.mark.asyncio
async def test_bucket_redirect(
s3_client, alternative_s3_client, region, create_bucket
):
key = 'foobarbaz'
# create bucket in alternative region
> bucket_name = await create_bucket(region)
E TypeError: 'async_generator' object is not callable
tests/test_basic_s3.py:605: TypeError
_______________________________________________________________________ test_head_object_keys[s3v4] ________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25e35310>, create_object = <function create_object.<locals>._f at 0x7f3e25e35dc0>
bucket_name = <async_generator object bucket_name at 0x7f3e25e35af0>
@pytest.mark.parametrize('signature_version', ['s3v4'])
@pytest.mark.asyncio
@pytest.mark.moto
async def test_head_object_keys(s3_client, create_object, bucket_name):
> await create_object('foobarbaz')
tests/test_basic_s3.py:621:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_name = 'foobarbaz', body = 'foo'
async def _f(key_name, body='foo'):
> r = await s3_client.put_object(
Bucket=bucket_name, Key=key_name, Body=body
)
E AttributeError: 'async_generator' object has no attribute 'put_object'
tests/conftest.py:470: AttributeError
________________________________________________________________________________ test_batch ________________________________________________________________________________
batch_client = <async_generator object batch_client at 0x7f3e25e97430>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_batch(batch_client):
> job_queues = await batch_client.describe_job_queues()
E AttributeError: 'async_generator' object has no attribute 'describe_job_queues'
tests/test_batch.py:7: AttributeError
____________________________________________________________________________ test_get_item[v4] _____________________________________________________________________________
dynamodb_client = <async_generator object dynamodb_client at 0x7f3e2500e280>, table_name = <async_generator object table_name at 0x7f3e2500e550>
dynamodb_put_item = <function dynamodb_put_item.<locals>._f at 0x7f3e2500e670>
@pytest.mark.moto
@pytest.mark.parametrize('signature_version', ['v4'])
@pytest.mark.asyncio
async def test_get_item(dynamodb_client, table_name, dynamodb_put_item):
test_value = 'testValue'
> await dynamodb_put_item(test_value)
tests/test_dynamodb.py:32:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
key_string_value = 'testValue'
async def _f(key_string_value):
> response = await dynamodb_client.put_item(
TableName=table_name,
Item={'testKey': {'S': key_string_value}},
)
E AttributeError: 'async_generator' object has no attribute 'put_item'
tests/conftest.py:524: AttributeError
__________________________________________________________________________ test_create_waiter[v4] __________________________________________________________________________
dynamodb_client = <async_generator object dynamodb_client at 0x7f3e250b2280>
dynamodb_table_def = {'AttributeDefinitions': [{'AttributeName': 'testKey', 'AttributeType': 'N'}], 'KeySchema': [{'AttributeName': 'testKe...nedThroughput': {'ReadCapacityUnits': 1, 'WriteCapacityUnits': 1}, 'TableName': 'cf5179d6-7603-44e9-994d-fc4b448683d6'}
@pytest.mark.moto
@pytest.mark.parametrize('signature_version', ['v4'])
@pytest.mark.asyncio
async def test_create_waiter(dynamodb_client, dynamodb_table_def):
table_name = dynamodb_table_def['TableName']
> response = await dynamodb_client.create_table(**dynamodb_table_def)
E AttributeError: 'async_generator' object has no attribute 'create_table'
tests/test_dynamodb.py:46: AttributeError
________________________________________________________________________ test_batch_write_scan[v4] _________________________________________________________________________
dynamodb_client = <async_generator object dynamodb_client at 0x7f3e2500e430>, table_name = <async_generator object table_name at 0x7f3e2500e8b0>
@pytest.mark.moto
@pytest.mark.parametrize('signature_version', ['v4'])
@pytest.mark.asyncio
async def test_batch_write_scan(dynamodb_client, table_name):
> response = await dynamodb_client.batch_write_item(
RequestItems={
table_name: [
{
'PutRequest': {
'Item': {
'testKey': {'S': 'key1'},
'testKey2': {'S': 'key2'},
}
}
},
{
'PutRequest': {
'Item': {
'testKey': {'S': 'key3'},
'testKey2': {'S': 'key4'},
}
}
},
]
}
)
E AttributeError: 'async_generator' object has no attribute 'batch_write_item'
tests/test_dynamodb.py:61: AttributeError
__________________________________________________________________________ test_delete_table[v4] ___________________________________________________________________________
dynamodb_client = <async_generator object dynamodb_client at 0x7f3e2500edc0>
dynamodb_table_def = {'AttributeDefinitions': [{'AttributeName': 'testKey', 'AttributeType': 'N'}], 'KeySchema': [{'AttributeName': 'testKe...nedThroughput': {'ReadCapacityUnits': 1, 'WriteCapacityUnits': 1}, 'TableName': '57a5f6ab-da7e-41d5-845a-abefba34eb04'}
@pytest.mark.moto
@pytest.mark.parametrize('signature_version', ['v4'])
@pytest.mark.asyncio
async def test_delete_table(dynamodb_client, dynamodb_table_def):
table_name = dynamodb_table_def['TableName']
> await dynamodb_client.create_table(**dynamodb_table_def)
E AttributeError: 'async_generator' object has no attribute 'create_table'
tests/test_dynamodb.py:98: AttributeError
___________________________________________________________________ test_waiter_table_exists_failure[v4] ___________________________________________________________________
dynamodb_client = <async_generator object dynamodb_client at 0x7f3e250253a0>
@pytest.mark.moto
@pytest.mark.parametrize('signature_version', ['v4'])
@pytest.mark.asyncio
async def test_waiter_table_exists_failure(dynamodb_client):
> waiter = dynamodb_client.get_waiter('table_exists')
E AttributeError: 'async_generator' object has no attribute 'get_waiter'
tests/test_dynamodb.py:114: AttributeError
_______________________________________________________________________ test_waiter_table_exists[v4] _______________________________________________________________________
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, dynamodb_client = <async_generator object dynamodb_client at 0x7f3e250b20d0>
dynamodb_table_def = {'AttributeDefinitions': [{'AttributeName': 'testKey', 'AttributeType': 'N'}], 'KeySchema': [{'AttributeName': 'testKe...nedThroughput': {'ReadCapacityUnits': 1, 'WriteCapacityUnits': 1}, 'TableName': '9fd3455d-5857-4f83-8b94-7f629ac3eee6'}
@pytest.mark.moto
@pytest.mark.parametrize('signature_version', ['v4'])
@pytest.mark.asyncio
async def test_waiter_table_exists(
event_loop, dynamodb_client, dynamodb_table_def
):
table_name = dynamodb_table_def['TableName']
async def _create_table():
await asyncio.sleep(2)
await dynamodb_client.create_table(**dynamodb_table_def)
task = event_loop.create_task(_create_table())
assert not task.done()
> waiter = dynamodb_client.get_waiter('table_exists')
E AttributeError: 'async_generator' object has no attribute 'get_waiter'
tests/test_dynamodb.py:138: AttributeError
____________________________________________________________________________ test_ec2_snapshot _____________________________________________________________________________
ec2_client = <async_generator object ec2_client at 0x7f3e250251f0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_ec2_snapshot(ec2_client):
# TODO: this needs to somehow validate the presigned url sent because moto is not
> volume_response = await ec2_client.create_volume(
AvailabilityZone="us-east-1", Size=10
)
E AttributeError: 'async_generator' object has no attribute 'create_volume'
tests/test_ec2.py:8: AttributeError
________________________________________________________________________ test_eventstream_chunking _________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e25025b80>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_eventstream_chunking(s3_client):
# These are the options passed to the EventStream class
# during a normal run with botocore.
operation_name = 'SelectObjectContent'
> outputshape = s3_client._service_model.operation_model(
operation_name
).output_shape.members['Payload']
E AttributeError: 'async_generator' object has no attribute '_service_model'
tests/test_eventstreams.py:52: AttributeError
_________________________________________________________________________ test_eventstream_no_iter _________________________________________________________________________
s3_client = <async_generator object s3_client at 0x7f3e24fe7670>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_eventstream_no_iter(s3_client):
# These are the options passed to the EventStream class
# during a normal run with botocore.
operation_name = 'SelectObjectContent'
> outputshape = s3_client._service_model.operation_model(
operation_name
).output_shape.members['Payload']
E AttributeError: 'async_generator' object has no attribute '_service_model'
tests/test_eventstreams.py:83: AttributeError
_____________________________________________________________________________ test_run_lambda ______________________________________________________________________________
iam_client = <async_generator object iam_client at 0x7f3e24fe7c10>, lambda_client = <async_generator object lambda_client at 0x7f3e24fe7e50>
aws_lambda_zip = b'PK\x03\x04\x14\x00\x00\x00\x08\x00\x80c\x19U*\x12\x1c6c\x00\x00\x00p\x00\x00\x00\x12\x00\x00\x00lambda_function.py%\...0\x01\x00\x00\x00\x00lambda_function.pyPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00@\x00\x00\x00\x93\x00\x00\x00\x00\x00'
@pytest.mark.moto
@pytest.mark.asyncio
async def test_run_lambda(iam_client, lambda_client, aws_lambda_zip):
> role_arn = await _get_role_arn(iam_client, 'test-iam-role')
tests/test_lambda.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
iam_client = <async_generator object iam_client at 0x7f3e24fe7c10>, role_name = 'test-iam-role'
async def _get_role_arn(iam_client, role_name: str):
try:
> response = await iam_client.get_role(RoleName=role_name)
E AttributeError: 'async_generator' object has no attribute 'get_role'
tests/test_lambda.py:13: AttributeError
______________________________________________________________________ test_monitor_response_received ______________________________________________________________________
session = <aiobotocore.session.AioSession object at 0x7f3e25f13520>, s3_client = <async_generator object s3_client at 0x7f3e250254c0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_monitor_response_received(session: AioSession, s3_client):
# Basic smoke test to ensure we can talk to s3.
handler_kwargs = {}
def handler(**kwargs):
nonlocal handler_kwargs
handler_kwargs = kwargs
> s3_client.meta.events.register('response-received.s3.ListBuckets', handler)
E AttributeError: 'async_generator' object has no attribute 'meta'
tests/test_monitor.py:16: AttributeError
____________________________________________________________________________ test_mturk_stubber ____________________________________________________________________________
self = <aiohttp.connector.TCPConnector object at 0x7f3e25f4b0d0>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e25f4b400>
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1), client_error = <class 'aiohttp.client_exceptions.ClientConnectorError'>
args = (functools.partial(<class 'aiohttp.client_proto.ResponseHandler'>, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '169.254.169.254', 80)
kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...}
async def _wrap_create_connection(
self,
*args: Any,
req: "ClientRequest",
timeout: "ClientTimeout",
client_error: Type[Exception] = ClientConnectorError,
**kwargs: Any,
) -> Tuple[asyncio.Transport, ResponseHandler]:
try:
async with ceil_timeout(timeout.sock_connect):
> return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:986:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_UnixSelectorEventLoop running=False closed=False debug=False>
protocol_factory = functools.partial(<class 'aiohttp.client_proto.ResponseHandler'>, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>)
host = '169.254.169.254', port = 80
async def create_connection(
self, protocol_factory, host=None, port=None,
*, ssl=None, family=0,
proto=0, flags=0, sock=None,
local_addr=None, server_hostname=None,
ssl_handshake_timeout=None,
happy_eyeballs_delay=None, interleave=None):
"""Connect to a TCP server.
Create a streaming transport connection to a given Internet host and
port: socket family AF_INET or socket.AF_INET6 depending on host (or
family if specified), socket type SOCK_STREAM. protocol_factory must be
a callable returning a protocol instance.
This method is a coroutine which will try to establish the connection
in the background. When successful, the coroutine returns a
(transport, protocol) pair.
"""
if server_hostname is not None and not ssl:
raise ValueError('server_hostname is only meaningful with ssl')
if server_hostname is None and ssl:
# Use host as default for server_hostname. It is an error
# if host is empty or not set, e.g. when an
# already-connected socket was passed or when only a port
# is given. To avoid this error, you can pass
# server_hostname='' -- this will bypass the hostname
# check. (This also means that if host is a numeric
# IP/IPv6 address, we will attempt to verify that exact
# address; this will probably fail, but it is possible to
# create a certificate for a specific IP address, so we
# don't judge it here.)
if not host:
raise ValueError('You must set server_hostname '
'when using ssl without a host')
server_hostname = host
if ssl_handshake_timeout is not None and not ssl:
raise ValueError(
'ssl_handshake_timeout is only meaningful with ssl')
if happy_eyeballs_delay is not None and interleave is None:
# If using happy eyeballs, default to interleave addresses by family
interleave = 1
if host is not None or port is not None:
if sock is not None:
raise ValueError(
'host/port and sock can not be specified at the same time')
infos = await self._ensure_resolved(
(host, port), family=family,
type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self)
if not infos:
raise OSError('getaddrinfo() returned empty list')
if local_addr is not None:
laddr_infos = await self._ensure_resolved(
local_addr, family=family,
type=socket.SOCK_STREAM, proto=proto,
flags=flags, loop=self)
if not laddr_infos:
raise OSError('getaddrinfo() returned empty list')
else:
laddr_infos = None
if interleave:
infos = _interleave_addrinfos(infos, interleave)
exceptions = []
if happy_eyeballs_delay is None:
# not using happy eyeballs
for addrinfo in infos:
try:
> sock = await self._connect_sock(
exceptions, addrinfo, laddr_infos)
/usr/lib64/python3.8/asyncio/base_events.py:1010:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_UnixSelectorEventLoop running=False closed=False debug=False>, exceptions = [[]]
addr_info = (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('169.254.169.254', 80)), local_addr_infos = None
async def _connect_sock(self, exceptions, addr_info, local_addr_infos=None):
"""Create, bind and connect one socket."""
my_exceptions = []
exceptions.append(my_exceptions)
family, type_, proto, _, address = addr_info
sock = None
try:
sock = socket.socket(family=family, type=type_, proto=proto)
sock.setblocking(False)
if local_addr_infos is not None:
for _, _, _, _, laddr in local_addr_infos:
try:
sock.bind(laddr)
break
except OSError as exc:
msg = (
f'error while attempting to bind on '
f'address {laddr!r}: '
f'{exc.strerror.lower()}'
)
exc = OSError(exc.errno, msg)
my_exceptions.append(exc)
else: # all bind attempts failed
raise my_exceptions.pop()
> await self.sock_connect(sock, address)
/usr/lib64/python3.8/asyncio/base_events.py:924:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_UnixSelectorEventLoop running=False closed=False debug=False>
sock = <socket.socket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>, address = ('169.254.169.254', 80)
async def sock_connect(self, sock, address):
"""Connect to a remote socket at address.
This method is a coroutine.
"""
_check_ssl_socket(sock)
if self._debug and sock.gettimeout() != 0:
raise ValueError("the socket must be non-blocking")
if not hasattr(socket, 'AF_UNIX') or sock.family != socket.AF_UNIX:
resolved = await self._ensure_resolved(
address, family=sock.family, proto=sock.proto, loop=self)
_, _, _, _, address = resolved[0]
fut = self.create_future()
self._sock_connect(fut, sock, address)
> return await fut
E asyncio.exceptions.CancelledError
/usr/lib64/python3.8/asyncio/selector_events.py:496: CancelledError
During handling of the above exception, another exception occurred:
self = <aiohttp.client.ClientSession object at 0x7f3e25f4b9a0>, method = 'PUT', str_or_url = URL('http://169.254.169.254/latest/api/token')
async def _request(
self,
method: str,
str_or_url: StrOrURL,
*,
params: Optional[Mapping[str, str]] = None,
data: Any = None,
json: Any = None,
cookies: Optional[LooseCookies] = None,
headers: Optional[LooseHeaders] = None,
skip_auto_headers: Optional[Iterable[str]] = None,
auth: Optional[BasicAuth] = None,
allow_redirects: bool = True,
max_redirects: int = 10,
compress: Optional[str] = None,
chunked: Optional[bool] = None,
expect100: bool = False,
raise_for_status: Optional[bool] = None,
read_until_eof: bool = True,
proxy: Optional[StrOrURL] = None,
proxy_auth: Optional[BasicAuth] = None,
timeout: Union[ClientTimeout, object] = sentinel,
verify_ssl: Optional[bool] = None,
fingerprint: Optional[bytes] = None,
ssl_context: Optional[SSLContext] = None,
ssl: Optional[Union[SSLContext, bool, Fingerprint]] = None,
proxy_headers: Optional[LooseHeaders] = None,
trace_request_ctx: Optional[SimpleNamespace] = None,
read_bufsize: Optional[int] = None,
) -> ClientResponse:
# NOTE: timeout clamps existing connect and read timeouts. We cannot
# set the default to None because we need to detect if the user wants
# to use the existing timeouts by setting timeout to None.
if self.closed:
raise RuntimeError("Session is closed")
ssl = _merge_ssl_params(ssl, verify_ssl, ssl_context, fingerprint)
if data is not None and json is not None:
raise ValueError(
"data and json parameters can not be used at the same time"
)
elif json is not None:
data = payload.JsonPayload(json, dumps=self._json_serialize)
if not isinstance(chunked, bool) and chunked is not None:
warnings.warn("Chunk size is deprecated #1615", DeprecationWarning)
redirects = 0
history = []
version = self._version
# Merge with default headers and transform to CIMultiDict
headers = self._prepare_headers(headers)
proxy_headers = self._prepare_headers(proxy_headers)
try:
url = self._build_url(str_or_url)
except ValueError as e:
raise InvalidURL(str_or_url) from e
skip_headers = set(self._skip_auto_headers)
if skip_auto_headers is not None:
for i in skip_auto_headers:
skip_headers.add(istr(i))
if proxy is not None:
try:
proxy = URL(proxy)
except ValueError as e:
raise InvalidURL(proxy) from e
if timeout is sentinel:
real_timeout = self._timeout # type: ClientTimeout
else:
if not isinstance(timeout, ClientTimeout):
real_timeout = ClientTimeout(total=timeout) # type: ignore[arg-type]
else:
real_timeout = timeout
# timeout is cumulative for all request operations
# (request, redirects, responses, data consuming)
tm = TimeoutHandle(self._loop, real_timeout.total)
handle = tm.start()
if read_bufsize is None:
read_bufsize = self._read_bufsize
traces = [
Trace(
self,
trace_config,
trace_config.trace_config_ctx(trace_request_ctx=trace_request_ctx),
)
for trace_config in self._trace_configs
]
for trace in traces:
await trace.send_request_start(method, url.update_query(params), headers)
timer = tm.timer()
try:
with timer:
while True:
url, auth_from_url = strip_auth_from_url(url)
if auth and auth_from_url:
raise ValueError(
"Cannot combine AUTH argument with "
"credentials encoded in URL"
)
if auth is None:
auth = auth_from_url
if auth is None:
auth = self._default_auth
# It would be confusing if we support explicit
# Authorization header with auth argument
if (
headers is not None
and auth is not None
and hdrs.AUTHORIZATION in headers
):
raise ValueError(
"Cannot combine AUTHORIZATION header "
"with AUTH argument or credentials "
"encoded in URL"
)
all_cookies = self._cookie_jar.filter_cookies(url)
if cookies is not None:
tmp_cookie_jar = CookieJar()
tmp_cookie_jar.update_cookies(cookies)
req_cookies = tmp_cookie_jar.filter_cookies(url)
if req_cookies:
all_cookies.load(req_cookies)
if proxy is not None:
proxy = URL(proxy)
elif self._trust_env:
with suppress(LookupError):
proxy, proxy_auth = get_env_proxy_for_url(url)
req = self._request_class(
method,
url,
params=params,
headers=headers,
skip_auto_headers=skip_headers,
data=data,
cookies=all_cookies,
auth=auth,
version=version,
compress=compress,
chunked=chunked,
expect100=expect100,
loop=self._loop,
response_class=self._response_class,
proxy=proxy,
proxy_auth=proxy_auth,
timer=timer,
session=self,
ssl=ssl,
proxy_headers=proxy_headers,
traces=traces,
)
# connection timeout
try:
async with ceil_timeout(real_timeout.connect):
assert self._connector is not None
> conn = await self._connector.connect(
req, traces=traces, timeout=real_timeout
)
/usr/lib64/python3.8/site-packages/aiohttp/client.py:535:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.connector.TCPConnector object at 0x7f3e25f4b0d0>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e25f4b400>, traces = []
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1)
async def connect(
self, req: "ClientRequest", traces: List["Trace"], timeout: "ClientTimeout"
) -> Connection:
"""Get from pool or create new connection."""
key = req.connection_key
available = self._available_connections(key)
# Wait if there are no available connections or if there are/were
# waiters (i.e. don't steal connection from a waiter about to wake up)
if available <= 0 or key in self._waiters:
fut = self._loop.create_future()
# This connection will now count towards the limit.
self._waiters[key].append(fut)
if traces:
for trace in traces:
await trace.send_connection_queued_start()
try:
await fut
except BaseException as e:
if key in self._waiters:
# remove a waiter even if it was cancelled, normally it's
# removed when it's notified
try:
self._waiters[key].remove(fut)
except ValueError: # fut may no longer be in list
pass
raise e
finally:
if key in self._waiters and not self._waiters[key]:
del self._waiters[key]
if traces:
for trace in traces:
await trace.send_connection_queued_end()
proto = self._get(key)
if proto is None:
placeholder = cast(ResponseHandler, _TransportPlaceholder())
self._acquired.add(placeholder)
self._acquired_per_host[key].add(placeholder)
if traces:
for trace in traces:
await trace.send_connection_create_start()
try:
> proto = await self._create_connection(req, traces, timeout)
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:542:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.connector.TCPConnector object at 0x7f3e25f4b0d0>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e25f4b400>, traces = []
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1)
async def _create_connection(
self, req: "ClientRequest", traces: List["Trace"], timeout: "ClientTimeout"
) -> ResponseHandler:
"""Create connection.
Has same keyword arguments as BaseEventLoop.create_connection.
"""
if req.proxy:
_, proto = await self._create_proxy_connection(req, traces, timeout)
else:
> _, proto = await self._create_direct_connection(req, traces, timeout)
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:907:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.connector.TCPConnector object at 0x7f3e25f4b0d0>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e25f4b400>, traces = []
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1)
async def _create_direct_connection(
self,
req: "ClientRequest",
traces: List["Trace"],
timeout: "ClientTimeout",
*,
client_error: Type[Exception] = ClientConnectorError,
) -> Tuple[asyncio.Transport, ResponseHandler]:
sslcontext = self._get_ssl_context(req)
fingerprint = self._get_fingerprint(req)
host = req.url.raw_host
assert host is not None
port = req.port
assert port is not None
host_resolved = asyncio.ensure_future(
self._resolve_host(host, port, traces=traces), loop=self._loop
)
try:
# Cancelling this lookup should not cancel the underlying lookup
# or else the cancel event will get broadcast to all the waiters
# across all connections.
hosts = await asyncio.shield(host_resolved)
except asyncio.CancelledError:
def drop_exception(fut: "asyncio.Future[List[Dict[str, Any]]]") -> None:
with suppress(Exception, asyncio.CancelledError):
fut.result()
host_resolved.add_done_callback(drop_exception)
raise
except OSError as exc:
# in case of proxy it is not ClientProxyConnectionError
# it is problem of resolving proxy ip itself
raise ClientConnectorError(req.connection_key, exc) from exc
last_exc = None # type: Optional[Exception]
for hinfo in hosts:
host = hinfo["host"]
port = hinfo["port"]
try:
> transp, proto = await self._wrap_create_connection(
self._factory,
host,
port,
timeout=timeout,
ssl=sslcontext,
family=hinfo["family"],
proto=hinfo["proto"],
flags=hinfo["flags"],
server_hostname=hinfo["hostname"] if sslcontext else None,
local_addr=self._local_addr,
req=req,
client_error=client_error,
)
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:1175:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.connector.TCPConnector object at 0x7f3e25f4b0d0>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e25f4b400>
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1), client_error = <class 'aiohttp.client_exceptions.ClientConnectorError'>
args = (functools.partial(<class 'aiohttp.client_proto.ResponseHandler'>, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '169.254.169.254', 80)
kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...}
async def _wrap_create_connection(
self,
*args: Any,
req: "ClientRequest",
timeout: "ClientTimeout",
client_error: Type[Exception] = ClientConnectorError,
**kwargs: Any,
) -> Tuple[asyncio.Transport, ResponseHandler]:
try:
async with ceil_timeout(timeout.sock_connect):
> return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:986:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <async_timeout.Timeout object at 0x7f3e2501e0c0>, exc_type = <class 'asyncio.exceptions.CancelledError'>, exc_val = CancelledError()
exc_tb = <traceback object at 0x7f3e2501efc0>
async def __aexit__(
self,
exc_type: Optional[Type[BaseException]],
exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType],
) -> Optional[bool]:
> self._do_exit(exc_type)
/usr/lib/python3.8/site-packages/async_timeout/__init__.py:129:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <async_timeout.Timeout object at 0x7f3e2501e0c0>, exc_type = <class 'asyncio.exceptions.CancelledError'>
def _do_exit(self, exc_type: Optional[Type[BaseException]]) -> None:
if exc_type is asyncio.CancelledError and self._state == _State.TIMEOUT:
self._timeout_handler = None
> raise asyncio.TimeoutError
E asyncio.exceptions.TimeoutError
/usr/lib/python3.8/site-packages/async_timeout/__init__.py:212: TimeoutError
The above exception was the direct cause of the following exception:
self = <aiobotocore.utils._RefCountedSession object at 0x7f3e25f44670>
request = <AWSPreparedRequest stream_output=False, method=PUT, url=http://169.254.169.254/latest/api/token, headers={'x-aws-ec2-... 'Botocore/1.27.57 Python/3.8.13 Linux/5.17.11-300.fc36.x86_64', 'Content-Length': '0', 'Accept-Encoding': 'identity'}>
async def send(self, request):
try:
proxy_url = self._proxy_config.proxy_url_for(request.url)
proxy_headers = self._proxy_config.proxy_headers_for(request.url)
url = request.url
headers = request.headers
data = request.body
if ensure_boolean(
os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '')
):
# This is currently an "experimental" feature which provides
# no guarantees of backwards compatibility. It may be subject
# to change or removal in any patch version. Anyone opting in
# to this feature should strictly pin botocore.
host = urlparse(request.url).hostname
proxy_headers['host'] = host
# https://github.com/boto/botocore/issues/1255
headers['Accept-Encoding'] = 'identity'
headers_ = MultiDict(
(z[0], _text(z[1], encoding='utf-8')) for z in headers.items()
)
if isinstance(data, io.IOBase):
data = _IOBaseWrapper(data)
url = URL(url, encoded=True)
> response = await self._session.request(
request.method,
url=url,
headers=headers_,
data=data,
proxy=proxy_url,
proxy_headers=proxy_headers,
)
aiobotocore/httpsession.py:202:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.client.ClientSession object at 0x7f3e25f4b9a0>, method = 'PUT', str_or_url = URL('http://169.254.169.254/latest/api/token')
async def _request(
self,
method: str,
str_or_url: StrOrURL,
*,
params: Optional[Mapping[str, str]] = None,
data: Any = None,
json: Any = None,
cookies: Optional[LooseCookies] = None,
headers: Optional[LooseHeaders] = None,
skip_auto_headers: Optional[Iterable[str]] = None,
auth: Optional[BasicAuth] = None,
allow_redirects: bool = True,
max_redirects: int = 10,
compress: Optional[str] = None,
chunked: Optional[bool] = None,
expect100: bool = False,
raise_for_status: Optional[bool] = None,
read_until_eof: bool = True,
proxy: Optional[StrOrURL] = None,
proxy_auth: Optional[BasicAuth] = None,
timeout: Union[ClientTimeout, object] = sentinel,
verify_ssl: Optional[bool] = None,
fingerprint: Optional[bytes] = None,
ssl_context: Optional[SSLContext] = None,
ssl: Optional[Union[SSLContext, bool, Fingerprint]] = None,
proxy_headers: Optional[LooseHeaders] = None,
trace_request_ctx: Optional[SimpleNamespace] = None,
read_bufsize: Optional[int] = None,
) -> ClientResponse:
# NOTE: timeout clamps existing connect and read timeouts. We cannot
# set the default to None because we need to detect if the user wants
# to use the existing timeouts by setting timeout to None.
if self.closed:
raise RuntimeError("Session is closed")
ssl = _merge_ssl_params(ssl, verify_ssl, ssl_context, fingerprint)
if data is not None and json is not None:
raise ValueError(
"data and json parameters can not be used at the same time"
)
elif json is not None:
data = payload.JsonPayload(json, dumps=self._json_serialize)
if not isinstance(chunked, bool) and chunked is not None:
warnings.warn("Chunk size is deprecated #1615", DeprecationWarning)
redirects = 0
history = []
version = self._version
# Merge with default headers and transform to CIMultiDict
headers = self._prepare_headers(headers)
proxy_headers = self._prepare_headers(proxy_headers)
try:
url = self._build_url(str_or_url)
except ValueError as e:
raise InvalidURL(str_or_url) from e
skip_headers = set(self._skip_auto_headers)
if skip_auto_headers is not None:
for i in skip_auto_headers:
skip_headers.add(istr(i))
if proxy is not None:
try:
proxy = URL(proxy)
except ValueError as e:
raise InvalidURL(proxy) from e
if timeout is sentinel:
real_timeout = self._timeout # type: ClientTimeout
else:
if not isinstance(timeout, ClientTimeout):
real_timeout = ClientTimeout(total=timeout) # type: ignore[arg-type]
else:
real_timeout = timeout
# timeout is cumulative for all request operations
# (request, redirects, responses, data consuming)
tm = TimeoutHandle(self._loop, real_timeout.total)
handle = tm.start()
if read_bufsize is None:
read_bufsize = self._read_bufsize
traces = [
Trace(
self,
trace_config,
trace_config.trace_config_ctx(trace_request_ctx=trace_request_ctx),
)
for trace_config in self._trace_configs
]
for trace in traces:
await trace.send_request_start(method, url.update_query(params), headers)
timer = tm.timer()
try:
with timer:
while True:
url, auth_from_url = strip_auth_from_url(url)
if auth and auth_from_url:
raise ValueError(
"Cannot combine AUTH argument with "
"credentials encoded in URL"
)
if auth is None:
auth = auth_from_url
if auth is None:
auth = self._default_auth
# It would be confusing if we support explicit
# Authorization header with auth argument
if (
headers is not None
and auth is not None
and hdrs.AUTHORIZATION in headers
):
raise ValueError(
"Cannot combine AUTHORIZATION header "
"with AUTH argument or credentials "
"encoded in URL"
)
all_cookies = self._cookie_jar.filter_cookies(url)
if cookies is not None:
tmp_cookie_jar = CookieJar()
tmp_cookie_jar.update_cookies(cookies)
req_cookies = tmp_cookie_jar.filter_cookies(url)
if req_cookies:
all_cookies.load(req_cookies)
if proxy is not None:
proxy = URL(proxy)
elif self._trust_env:
with suppress(LookupError):
proxy, proxy_auth = get_env_proxy_for_url(url)
req = self._request_class(
method,
url,
params=params,
headers=headers,
skip_auto_headers=skip_headers,
data=data,
cookies=all_cookies,
auth=auth,
version=version,
compress=compress,
chunked=chunked,
expect100=expect100,
loop=self._loop,
response_class=self._response_class,
proxy=proxy,
proxy_auth=proxy_auth,
timer=timer,
session=self,
ssl=ssl,
proxy_headers=proxy_headers,
traces=traces,
)
# connection timeout
try:
async with ceil_timeout(real_timeout.connect):
assert self._connector is not None
conn = await self._connector.connect(
req, traces=traces, timeout=real_timeout
)
except asyncio.TimeoutError as exc:
> raise ServerTimeoutError(
"Connection timeout " "to host {}".format(url)
) from exc
E aiohttp.client_exceptions.ServerTimeoutError: Connection timeout to host http://169.254.169.254/latest/api/token
/usr/lib64/python3.8/site-packages/aiohttp/client.py:539: ServerTimeoutError
During handling of the above exception, another exception occurred:
session = <aiobotocore.session.AioSession object at 0x7f3e25f13be0>
@pytest.mark.asyncio
async def test_mturk_stubber(session):
> async with session.create_client(
'mturk', region_name='us-east-1'
) as client:
tests/test_mturk.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiobotocore/session.py:26: in __aenter__
self._client = await self._coro
aiobotocore/session.py:169: in _create_client
credentials = await self.get_credentials()
aiobotocore/session.py:79: in get_credentials
self._credentials = await (
aiobotocore/credentials.py:951: in load_credentials
creds = await provider.load()
aiobotocore/credentials.py:537: in load
metadata = await fetcher.retrieve_iam_role_credentials()
aiobotocore/utils.py:214: in retrieve_iam_role_credentials
token = await self._fetch_metadata_token()
aiobotocore/utils.py:116: in _fetch_metadata_token
response = await session.send(request.prepare())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiobotocore.utils._RefCountedSession object at 0x7f3e25f44670>
request = <AWSPreparedRequest stream_output=False, method=PUT, url=http://169.254.169.254/latest/api/token, headers={'x-aws-ec2-... 'Botocore/1.27.57 Python/3.8.13 Linux/5.17.11-300.fc36.x86_64', 'Content-Length': '0', 'Accept-Encoding': 'identity'}>
async def send(self, request):
try:
proxy_url = self._proxy_config.proxy_url_for(request.url)
proxy_headers = self._proxy_config.proxy_headers_for(request.url)
url = request.url
headers = request.headers
data = request.body
if ensure_boolean(
os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '')
):
# This is currently an "experimental" feature which provides
# no guarantees of backwards compatibility. It may be subject
# to change or removal in any patch version. Anyone opting in
# to this feature should strictly pin botocore.
host = urlparse(request.url).hostname
proxy_headers['host'] = host
# https://github.com/boto/botocore/issues/1255
headers['Accept-Encoding'] = 'identity'
headers_ = MultiDict(
(z[0], _text(z[1], encoding='utf-8')) for z in headers.items()
)
if isinstance(data, io.IOBase):
data = _IOBaseWrapper(data)
url = URL(url, encoded=True)
response = await self._session.request(
request.method,
url=url,
headers=headers_,
data=data,
proxy=proxy_url,
proxy_headers=proxy_headers,
)
http_response = aiobotocore.awsrequest.AioAWSResponse(
str(response.url), response.status, response.headers, response
)
if not request.stream_output:
# Cause the raw stream to be exhausted immediately. We do it
# this way instead of using preload_content because
# preload_content will never buffer chunked responses
await http_response.content
return http_response
except ClientSSLError as e:
raise SSLError(endpoint_url=request.url, error=e)
except (ClientProxyConnectionError, ClientHttpProxyError) as e:
raise ProxyConnectionError(
proxy_url=mask_proxy_url(proxy_url), error=e
)
except (
ServerDisconnectedError,
aiohttp.ClientPayloadError,
aiohttp.http_exceptions.BadStatusLine,
) as e:
raise ConnectionClosedError(
error=e, request=request, endpoint_url=request.url
)
except ServerTimeoutError as e:
if str(e).lower().startswith('connect'):
> raise ConnectTimeoutError(endpoint_url=request.url, error=e)
E botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254.169.254/latest/api/token"
aiobotocore/httpsession.py:238: ConnectTimeoutError
_______________________________________________________________________________ test_patches _______________________________________________________________________________
@pytest.mark.moto
def test_patches():
print(
"Botocore version: {} aiohttp version: {}".format(
botocore.__version__, aiohttp.__version__
)
)
success = True
for obj, digests in chain(_AIOHTTP_DIGESTS.items(), _API_DIGESTS.items()):
try:
source = getsource(obj)
except TypeError:
obj = obj.fget
source = getsource(obj)
digest = hashlib.sha1(source.encode('utf-8')).hexdigest()
if digest not in digests:
print(
"Digest of {}:{} not found in: {}".format(
obj.__qualname__, digest, digests
)
)
success = False
> assert success
E assert False
tests/test_patches.py:632: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
Botocore version: 1.27.57 aiohttp version: 3.8.1
Digest of ClientResponse:9da098725acbea71b221c556f72dae287f853a94 not found in: {'225e8033bfcff8cccbc2e975d7bd0c7993f14366', 'e178726065b609c69a1c02e8bb78f22efce90792'}
___________________________________________________________________ test_get_missing_endpoint_attributes ___________________________________________________________________
sns_client = <async_generator object sns_client at 0x7f3e252f13a0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_get_missing_endpoint_attributes(sns_client):
with pytest.raises(botocore.exceptions.ClientError):
> await sns_client.get_endpoint_attributes(EndpointArn="arn1")
E AttributeError: 'async_generator' object has no attribute 'get_endpoint_attributes'
tests/test_sns.py:97: AttributeError
________________________________________________________________________ test_platform_applications ________________________________________________________________________
sns_client = <async_generator object sns_client at 0x7f3e25c46dc0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_platform_applications(sns_client):
> await sns_client.create_platform_application(
Name="app1",
Platform="APNS",
Attributes={},
)
E AttributeError: 'async_generator' object has no attribute 'create_platform_application'
tests/test_sns.py:103: AttributeError
_____________________________________________________________________________ test_list_queues _____________________________________________________________________________
sqs_client = <async_generator object sqs_client at 0x7f3e25c465e0>, sqs_queue_url = <async_generator object sqs_queue_url at 0x7f3e24fe71f0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_list_queues(sqs_client, sqs_queue_url):
> response = await sqs_client.list_queues()
E AttributeError: 'async_generator' object has no attribute 'list_queues'
tests/test_sqs.py:9: AttributeError
___________________________________________________________________________ test_get_queue_name ____________________________________________________________________________
sqs_client = <async_generator object sqs_client at 0x7f3e25025a60>, sqs_queue_url = <async_generator object sqs_queue_url at 0x7f3e25025790>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_get_queue_name(sqs_client, sqs_queue_url):
> queue_name = sqs_queue_url.rsplit('/', 1)[-1]
E AttributeError: 'async_generator' object has no attribute 'rsplit'
tests/test_sqs.py:18: AttributeError
________________________________________________________________________ test_put_pull_delete_test _________________________________________________________________________
sqs_client = <async_generator object sqs_client at 0x7f3e255c8ca0>, sqs_queue_url = <async_generator object sqs_queue_url at 0x7f3e255c8b80>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_put_pull_delete_test(sqs_client, sqs_queue_url):
> response = await sqs_client.send_message(
QueueUrl=sqs_queue_url,
MessageBody='test_message_1',
MessageAttributes={
'attr1': {'DataType': 'String', 'StringValue': 'value1'}
},
)
E AttributeError: 'async_generator' object has no attribute 'send_message'
tests/test_sqs.py:29: AttributeError
____________________________________________________________________________ test_put_pull_wait ____________________________________________________________________________
sqs_client = <async_generator object sqs_client at 0x7f3e255c8550>, sqs_queue_url = <async_generator object sqs_queue_url at 0x7f3e255c8040>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_put_pull_wait(sqs_client, sqs_queue_url):
start = time.perf_counter()
> response = await sqs_client.receive_message(
QueueUrl=sqs_queue_url, WaitTimeSeconds=2
)
E AttributeError: 'async_generator' object has no attribute 'receive_message'
tests/test_sqs.py:65: AttributeError
_________________________________________________________________________________ test_sqs _________________________________________________________________________________
cloudformation_client = <async_generator object cloudformation_client at 0x7f3e252f1280>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_sqs(cloudformation_client):
cloudformation_template = """{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"queue1": {
"Type": "AWS::SQS::Queue",
"Properties": {
"QueueName": "my-queue"
}
}
}
}"""
# Create stack
> resp = await cloudformation_client.create_stack(
StackName='my-stack', TemplateBody=cloudformation_template
)
E AttributeError: 'async_generator' object has no attribute 'create_stack'
tests/test_waiter.py:20: AttributeError
___________________________________________________________________________ test_get_credentials ___________________________________________________________________________
self = <aiohttp.connector.TCPConnector object at 0x7f3e24ec3130>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e24ec3520>
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1), client_error = <class 'aiohttp.client_exceptions.ClientConnectorError'>
args = (functools.partial(<class 'aiohttp.client_proto.ResponseHandler'>, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), 'fd00:ec2::254', 80)
kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...}
async def _wrap_create_connection(
self,
*args: Any,
req: "ClientRequest",
timeout: "ClientTimeout",
client_error: Type[Exception] = ClientConnectorError,
**kwargs: Any,
) -> Tuple[asyncio.Transport, ResponseHandler]:
try:
async with ceil_timeout(timeout.sock_connect):
> return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:986:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_UnixSelectorEventLoop running=False closed=False debug=False>
protocol_factory = functools.partial(<class 'aiohttp.client_proto.ResponseHandler'>, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>)
host = 'fd00:ec2::254', port = 80
async def create_connection(
self, protocol_factory, host=None, port=None,
*, ssl=None, family=0,
proto=0, flags=0, sock=None,
local_addr=None, server_hostname=None,
ssl_handshake_timeout=None,
happy_eyeballs_delay=None, interleave=None):
"""Connect to a TCP server.
Create a streaming transport connection to a given Internet host and
port: socket family AF_INET or socket.AF_INET6 depending on host (or
family if specified), socket type SOCK_STREAM. protocol_factory must be
a callable returning a protocol instance.
This method is a coroutine which will try to establish the connection
in the background. When successful, the coroutine returns a
(transport, protocol) pair.
"""
if server_hostname is not None and not ssl:
raise ValueError('server_hostname is only meaningful with ssl')
if server_hostname is None and ssl:
# Use host as default for server_hostname. It is an error
# if host is empty or not set, e.g. when an
# already-connected socket was passed or when only a port
# is given. To avoid this error, you can pass
# server_hostname='' -- this will bypass the hostname
# check. (This also means that if host is a numeric
# IP/IPv6 address, we will attempt to verify that exact
# address; this will probably fail, but it is possible to
# create a certificate for a specific IP address, so we
# don't judge it here.)
if not host:
raise ValueError('You must set server_hostname '
'when using ssl without a host')
server_hostname = host
if ssl_handshake_timeout is not None and not ssl:
raise ValueError(
'ssl_handshake_timeout is only meaningful with ssl')
if happy_eyeballs_delay is not None and interleave is None:
# If using happy eyeballs, default to interleave addresses by family
interleave = 1
if host is not None or port is not None:
if sock is not None:
raise ValueError(
'host/port and sock can not be specified at the same time')
infos = await self._ensure_resolved(
(host, port), family=family,
type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self)
if not infos:
raise OSError('getaddrinfo() returned empty list')
if local_addr is not None:
laddr_infos = await self._ensure_resolved(
local_addr, family=family,
type=socket.SOCK_STREAM, proto=proto,
flags=flags, loop=self)
if not laddr_infos:
raise OSError('getaddrinfo() returned empty list')
else:
laddr_infos = None
if interleave:
infos = _interleave_addrinfos(infos, interleave)
exceptions = []
if happy_eyeballs_delay is None:
# not using happy eyeballs
for addrinfo in infos:
try:
sock = await self._connect_sock(
exceptions, addrinfo, laddr_infos)
break
except OSError:
continue
else: # using happy eyeballs
sock, _, _ = await staggered.staggered_race(
(functools.partial(self._connect_sock,
exceptions, addrinfo, laddr_infos)
for addrinfo in infos),
happy_eyeballs_delay, loop=self)
if sock is None:
exceptions = [exc for sub in exceptions for exc in sub]
if len(exceptions) == 1:
> raise exceptions[0]
/usr/lib64/python3.8/asyncio/base_events.py:1025:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_UnixSelectorEventLoop running=False closed=False debug=False>
protocol_factory = functools.partial(<class 'aiohttp.client_proto.ResponseHandler'>, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>)
host = 'fd00:ec2::254', port = 80
async def create_connection(
self, protocol_factory, host=None, port=None,
*, ssl=None, family=0,
proto=0, flags=0, sock=None,
local_addr=None, server_hostname=None,
ssl_handshake_timeout=None,
happy_eyeballs_delay=None, interleave=None):
"""Connect to a TCP server.
Create a streaming transport connection to a given Internet host and
port: socket family AF_INET or socket.AF_INET6 depending on host (or
family if specified), socket type SOCK_STREAM. protocol_factory must be
a callable returning a protocol instance.
This method is a coroutine which will try to establish the connection
in the background. When successful, the coroutine returns a
(transport, protocol) pair.
"""
if server_hostname is not None and not ssl:
raise ValueError('server_hostname is only meaningful with ssl')
if server_hostname is None and ssl:
# Use host as default for server_hostname. It is an error
# if host is empty or not set, e.g. when an
# already-connected socket was passed or when only a port
# is given. To avoid this error, you can pass
# server_hostname='' -- this will bypass the hostname
# check. (This also means that if host is a numeric
# IP/IPv6 address, we will attempt to verify that exact
# address; this will probably fail, but it is possible to
# create a certificate for a specific IP address, so we
# don't judge it here.)
if not host:
raise ValueError('You must set server_hostname '
'when using ssl without a host')
server_hostname = host
if ssl_handshake_timeout is not None and not ssl:
raise ValueError(
'ssl_handshake_timeout is only meaningful with ssl')
if happy_eyeballs_delay is not None and interleave is None:
# If using happy eyeballs, default to interleave addresses by family
interleave = 1
if host is not None or port is not None:
if sock is not None:
raise ValueError(
'host/port and sock can not be specified at the same time')
infos = await self._ensure_resolved(
(host, port), family=family,
type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self)
if not infos:
raise OSError('getaddrinfo() returned empty list')
if local_addr is not None:
laddr_infos = await self._ensure_resolved(
local_addr, family=family,
type=socket.SOCK_STREAM, proto=proto,
flags=flags, loop=self)
if not laddr_infos:
raise OSError('getaddrinfo() returned empty list')
else:
laddr_infos = None
if interleave:
infos = _interleave_addrinfos(infos, interleave)
exceptions = []
if happy_eyeballs_delay is None:
# not using happy eyeballs
for addrinfo in infos:
try:
> sock = await self._connect_sock(
exceptions, addrinfo, laddr_infos)
/usr/lib64/python3.8/asyncio/base_events.py:1010:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_UnixSelectorEventLoop running=False closed=False debug=False>, exceptions = [[OSError(101, 'Network is unreachable')]]
addr_info = (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('fd00:ec2::254', 80, 0, 0)), local_addr_infos = None
async def _connect_sock(self, exceptions, addr_info, local_addr_infos=None):
"""Create, bind and connect one socket."""
my_exceptions = []
exceptions.append(my_exceptions)
family, type_, proto, _, address = addr_info
sock = None
try:
sock = socket.socket(family=family, type=type_, proto=proto)
sock.setblocking(False)
if local_addr_infos is not None:
for _, _, _, _, laddr in local_addr_infos:
try:
sock.bind(laddr)
break
except OSError as exc:
msg = (
f'error while attempting to bind on '
f'address {laddr!r}: '
f'{exc.strerror.lower()}'
)
exc = OSError(exc.errno, msg)
my_exceptions.append(exc)
else: # all bind attempts failed
raise my_exceptions.pop()
> await self.sock_connect(sock, address)
/usr/lib64/python3.8/asyncio/base_events.py:924:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_UnixSelectorEventLoop running=False closed=False debug=False>
sock = <socket.socket [closed] fd=-1, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6>, address = ('fd00:ec2::254', 80, 0, 0)
async def sock_connect(self, sock, address):
"""Connect to a remote socket at address.
This method is a coroutine.
"""
_check_ssl_socket(sock)
if self._debug and sock.gettimeout() != 0:
raise ValueError("the socket must be non-blocking")
if not hasattr(socket, 'AF_UNIX') or sock.family != socket.AF_UNIX:
resolved = await self._ensure_resolved(
address, family=sock.family, proto=sock.proto, loop=self)
_, _, _, _, address = resolved[0]
fut = self.create_future()
self._sock_connect(fut, sock, address)
> return await fut
/usr/lib64/python3.8/asyncio/selector_events.py:496:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_UnixSelectorEventLoop running=False closed=False debug=False>, fut = <Future finished exception=OSError(101, 'Network is unreachable')>
sock = <socket.socket [closed] fd=-1, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6>, address = ('fd00:ec2::254', 80, 0, 0)
def _sock_connect(self, fut, sock, address):
fd = sock.fileno()
try:
> sock.connect(address)
E OSError: [Errno 101] Network is unreachable
/usr/lib64/python3.8/asyncio/selector_events.py:501: OSError
The above exception was the direct cause of the following exception:
self = <aiobotocore.utils._RefCountedSession object at 0x7f3e25bf4fd0>
request = <AWSPreparedRequest stream_output=False, method=PUT, url=http://[fd00:ec2::254]/latest/api/token, headers={'x-aws-ec2-...er-Agent': <Mock name='mock.user_agent()' id='139904897992016'>, 'Content-Length': '0', 'Accept-Encoding': 'identity'}>
async def send(self, request):
try:
proxy_url = self._proxy_config.proxy_url_for(request.url)
proxy_headers = self._proxy_config.proxy_headers_for(request.url)
url = request.url
headers = request.headers
data = request.body
if ensure_boolean(
os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '')
):
# This is currently an "experimental" feature which provides
# no guarantees of backwards compatibility. It may be subject
# to change or removal in any patch version. Anyone opting in
# to this feature should strictly pin botocore.
host = urlparse(request.url).hostname
proxy_headers['host'] = host
# https://github.com/boto/botocore/issues/1255
headers['Accept-Encoding'] = 'identity'
headers_ = MultiDict(
(z[0], _text(z[1], encoding='utf-8')) for z in headers.items()
)
if isinstance(data, io.IOBase):
data = _IOBaseWrapper(data)
url = URL(url, encoded=True)
> response = await self._session.request(
request.method,
url=url,
headers=headers_,
data=data,
proxy=proxy_url,
proxy_headers=proxy_headers,
)
aiobotocore/httpsession.py:202:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.client.ClientSession object at 0x7f3e24ec3e80>, method = 'PUT', str_or_url = URL('http://[fd00:ec2::254]/latest/api/token')
async def _request(
self,
method: str,
str_or_url: StrOrURL,
*,
params: Optional[Mapping[str, str]] = None,
data: Any = None,
json: Any = None,
cookies: Optional[LooseCookies] = None,
headers: Optional[LooseHeaders] = None,
skip_auto_headers: Optional[Iterable[str]] = None,
auth: Optional[BasicAuth] = None,
allow_redirects: bool = True,
max_redirects: int = 10,
compress: Optional[str] = None,
chunked: Optional[bool] = None,
expect100: bool = False,
raise_for_status: Optional[bool] = None,
read_until_eof: bool = True,
proxy: Optional[StrOrURL] = None,
proxy_auth: Optional[BasicAuth] = None,
timeout: Union[ClientTimeout, object] = sentinel,
verify_ssl: Optional[bool] = None,
fingerprint: Optional[bytes] = None,
ssl_context: Optional[SSLContext] = None,
ssl: Optional[Union[SSLContext, bool, Fingerprint]] = None,
proxy_headers: Optional[LooseHeaders] = None,
trace_request_ctx: Optional[SimpleNamespace] = None,
read_bufsize: Optional[int] = None,
) -> ClientResponse:
# NOTE: timeout clamps existing connect and read timeouts. We cannot
# set the default to None because we need to detect if the user wants
# to use the existing timeouts by setting timeout to None.
if self.closed:
raise RuntimeError("Session is closed")
ssl = _merge_ssl_params(ssl, verify_ssl, ssl_context, fingerprint)
if data is not None and json is not None:
raise ValueError(
"data and json parameters can not be used at the same time"
)
elif json is not None:
data = payload.JsonPayload(json, dumps=self._json_serialize)
if not isinstance(chunked, bool) and chunked is not None:
warnings.warn("Chunk size is deprecated #1615", DeprecationWarning)
redirects = 0
history = []
version = self._version
# Merge with default headers and transform to CIMultiDict
headers = self._prepare_headers(headers)
proxy_headers = self._prepare_headers(proxy_headers)
try:
url = self._build_url(str_or_url)
except ValueError as e:
raise InvalidURL(str_or_url) from e
skip_headers = set(self._skip_auto_headers)
if skip_auto_headers is not None:
for i in skip_auto_headers:
skip_headers.add(istr(i))
if proxy is not None:
try:
proxy = URL(proxy)
except ValueError as e:
raise InvalidURL(proxy) from e
if timeout is sentinel:
real_timeout = self._timeout # type: ClientTimeout
else:
if not isinstance(timeout, ClientTimeout):
real_timeout = ClientTimeout(total=timeout) # type: ignore[arg-type]
else:
real_timeout = timeout
# timeout is cumulative for all request operations
# (request, redirects, responses, data consuming)
tm = TimeoutHandle(self._loop, real_timeout.total)
handle = tm.start()
if read_bufsize is None:
read_bufsize = self._read_bufsize
traces = [
Trace(
self,
trace_config,
trace_config.trace_config_ctx(trace_request_ctx=trace_request_ctx),
)
for trace_config in self._trace_configs
]
for trace in traces:
await trace.send_request_start(method, url.update_query(params), headers)
timer = tm.timer()
try:
with timer:
while True:
url, auth_from_url = strip_auth_from_url(url)
if auth and auth_from_url:
raise ValueError(
"Cannot combine AUTH argument with "
"credentials encoded in URL"
)
if auth is None:
auth = auth_from_url
if auth is None:
auth = self._default_auth
# It would be confusing if we support explicit
# Authorization header with auth argument
if (
headers is not None
and auth is not None
and hdrs.AUTHORIZATION in headers
):
raise ValueError(
"Cannot combine AUTHORIZATION header "
"with AUTH argument or credentials "
"encoded in URL"
)
all_cookies = self._cookie_jar.filter_cookies(url)
if cookies is not None:
tmp_cookie_jar = CookieJar()
tmp_cookie_jar.update_cookies(cookies)
req_cookies = tmp_cookie_jar.filter_cookies(url)
if req_cookies:
all_cookies.load(req_cookies)
if proxy is not None:
proxy = URL(proxy)
elif self._trust_env:
with suppress(LookupError):
proxy, proxy_auth = get_env_proxy_for_url(url)
req = self._request_class(
method,
url,
params=params,
headers=headers,
skip_auto_headers=skip_headers,
data=data,
cookies=all_cookies,
auth=auth,
version=version,
compress=compress,
chunked=chunked,
expect100=expect100,
loop=self._loop,
response_class=self._response_class,
proxy=proxy,
proxy_auth=proxy_auth,
timer=timer,
session=self,
ssl=ssl,
proxy_headers=proxy_headers,
traces=traces,
)
# connection timeout
try:
async with ceil_timeout(real_timeout.connect):
assert self._connector is not None
> conn = await self._connector.connect(
req, traces=traces, timeout=real_timeout
)
/usr/lib64/python3.8/site-packages/aiohttp/client.py:535:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.connector.TCPConnector object at 0x7f3e24ec3130>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e24ec3520>, traces = []
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1)
async def connect(
self, req: "ClientRequest", traces: List["Trace"], timeout: "ClientTimeout"
) -> Connection:
"""Get from pool or create new connection."""
key = req.connection_key
available = self._available_connections(key)
# Wait if there are no available connections or if there are/were
# waiters (i.e. don't steal connection from a waiter about to wake up)
if available <= 0 or key in self._waiters:
fut = self._loop.create_future()
# This connection will now count towards the limit.
self._waiters[key].append(fut)
if traces:
for trace in traces:
await trace.send_connection_queued_start()
try:
await fut
except BaseException as e:
if key in self._waiters:
# remove a waiter even if it was cancelled, normally it's
# removed when it's notified
try:
self._waiters[key].remove(fut)
except ValueError: # fut may no longer be in list
pass
raise e
finally:
if key in self._waiters and not self._waiters[key]:
del self._waiters[key]
if traces:
for trace in traces:
await trace.send_connection_queued_end()
proto = self._get(key)
if proto is None:
placeholder = cast(ResponseHandler, _TransportPlaceholder())
self._acquired.add(placeholder)
self._acquired_per_host[key].add(placeholder)
if traces:
for trace in traces:
await trace.send_connection_create_start()
try:
> proto = await self._create_connection(req, traces, timeout)
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:542:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.connector.TCPConnector object at 0x7f3e24ec3130>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e24ec3520>, traces = []
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1)
async def _create_connection(
self, req: "ClientRequest", traces: List["Trace"], timeout: "ClientTimeout"
) -> ResponseHandler:
"""Create connection.
Has same keyword arguments as BaseEventLoop.create_connection.
"""
if req.proxy:
_, proto = await self._create_proxy_connection(req, traces, timeout)
else:
> _, proto = await self._create_direct_connection(req, traces, timeout)
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:907:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.connector.TCPConnector object at 0x7f3e24ec3130>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e24ec3520>, traces = []
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1)
async def _create_direct_connection(
self,
req: "ClientRequest",
traces: List["Trace"],
timeout: "ClientTimeout",
*,
client_error: Type[Exception] = ClientConnectorError,
) -> Tuple[asyncio.Transport, ResponseHandler]:
sslcontext = self._get_ssl_context(req)
fingerprint = self._get_fingerprint(req)
host = req.url.raw_host
assert host is not None
port = req.port
assert port is not None
host_resolved = asyncio.ensure_future(
self._resolve_host(host, port, traces=traces), loop=self._loop
)
try:
# Cancelling this lookup should not cancel the underlying lookup
# or else the cancel event will get broadcast to all the waiters
# across all connections.
hosts = await asyncio.shield(host_resolved)
except asyncio.CancelledError:
def drop_exception(fut: "asyncio.Future[List[Dict[str, Any]]]") -> None:
with suppress(Exception, asyncio.CancelledError):
fut.result()
host_resolved.add_done_callback(drop_exception)
raise
except OSError as exc:
# in case of proxy it is not ClientProxyConnectionError
# it is problem of resolving proxy ip itself
raise ClientConnectorError(req.connection_key, exc) from exc
last_exc = None # type: Optional[Exception]
for hinfo in hosts:
host = hinfo["host"]
port = hinfo["port"]
try:
transp, proto = await self._wrap_create_connection(
self._factory,
host,
port,
timeout=timeout,
ssl=sslcontext,
family=hinfo["family"],
proto=hinfo["proto"],
flags=hinfo["flags"],
server_hostname=hinfo["hostname"] if sslcontext else None,
local_addr=self._local_addr,
req=req,
client_error=client_error,
)
except ClientConnectorError as exc:
last_exc = exc
continue
if req.is_ssl() and fingerprint:
try:
fingerprint.check(transp)
except ServerFingerprintMismatch as exc:
transp.close()
if not self._cleanup_closed_disabled:
self._cleanup_closed_transports.append(transp)
last_exc = exc
continue
return transp, proto
else:
assert last_exc is not None
> raise last_exc
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:1206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.connector.TCPConnector object at 0x7f3e24ec3130>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e24ec3520>, traces = []
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1)
async def _create_direct_connection(
self,
req: "ClientRequest",
traces: List["Trace"],
timeout: "ClientTimeout",
*,
client_error: Type[Exception] = ClientConnectorError,
) -> Tuple[asyncio.Transport, ResponseHandler]:
sslcontext = self._get_ssl_context(req)
fingerprint = self._get_fingerprint(req)
host = req.url.raw_host
assert host is not None
port = req.port
assert port is not None
host_resolved = asyncio.ensure_future(
self._resolve_host(host, port, traces=traces), loop=self._loop
)
try:
# Cancelling this lookup should not cancel the underlying lookup
# or else the cancel event will get broadcast to all the waiters
# across all connections.
hosts = await asyncio.shield(host_resolved)
except asyncio.CancelledError:
def drop_exception(fut: "asyncio.Future[List[Dict[str, Any]]]") -> None:
with suppress(Exception, asyncio.CancelledError):
fut.result()
host_resolved.add_done_callback(drop_exception)
raise
except OSError as exc:
# in case of proxy it is not ClientProxyConnectionError
# it is problem of resolving proxy ip itself
raise ClientConnectorError(req.connection_key, exc) from exc
last_exc = None # type: Optional[Exception]
for hinfo in hosts:
host = hinfo["host"]
port = hinfo["port"]
try:
> transp, proto = await self._wrap_create_connection(
self._factory,
host,
port,
timeout=timeout,
ssl=sslcontext,
family=hinfo["family"],
proto=hinfo["proto"],
flags=hinfo["flags"],
server_hostname=hinfo["hostname"] if sslcontext else None,
local_addr=self._local_addr,
req=req,
client_error=client_error,
)
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:1175:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.connector.TCPConnector object at 0x7f3e24ec3130>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7f3e24ec3520>
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1), client_error = <class 'aiohttp.client_exceptions.ClientConnectorError'>
args = (functools.partial(<class 'aiohttp.client_proto.ResponseHandler'>, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), 'fd00:ec2::254', 80)
kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...}
async def _wrap_create_connection(
self,
*args: Any,
req: "ClientRequest",
timeout: "ClientTimeout",
client_error: Type[Exception] = ClientConnectorError,
**kwargs: Any,
) -> Tuple[asyncio.Transport, ResponseHandler]:
try:
async with ceil_timeout(timeout.sock_connect):
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
except cert_errors as exc:
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
except ssl_errors as exc:
raise ClientConnectorSSLError(req.connection_key, exc) from exc
except OSError as exc:
> raise client_error(req.connection_key, exc) from exc
E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host fd00:ec2::254:80 ssl:default [Network is unreachable]
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:992: ClientConnectorError
During handling of the above exception, another exception occurred:
mock_session = <function mock_session.<locals>._f at 0x7f3e252f1d30>
@pytest.mark.asyncio
async def test_get_credentials(mock_session):
session = mock_session()
> creds = await credentials.get_credentials(session)
tests/boto_tests/test_credentials.py:876:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiobotocore/credentials.py:199: in get_credentials
return await resolver.load_credentials()
aiobotocore/credentials.py:951: in load_credentials
creds = await provider.load()
aiobotocore/credentials.py:537: in load
metadata = await fetcher.retrieve_iam_role_credentials()
aiobotocore/utils.py:214: in retrieve_iam_role_credentials
token = await self._fetch_metadata_token()
aiobotocore/utils.py:116: in _fetch_metadata_token
response = await session.send(request.prepare())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiobotocore.utils._RefCountedSession object at 0x7f3e25bf4fd0>
request = <AWSPreparedRequest stream_output=False, method=PUT, url=http://[fd00:ec2::254]/latest/api/token, headers={'x-aws-ec2-...er-Agent': <Mock name='mock.user_agent()' id='139904897992016'>, 'Content-Length': '0', 'Accept-Encoding': 'identity'}>
async def send(self, request):
try:
proxy_url = self._proxy_config.proxy_url_for(request.url)
proxy_headers = self._proxy_config.proxy_headers_for(request.url)
url = request.url
headers = request.headers
data = request.body
if ensure_boolean(
os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '')
):
# This is currently an "experimental" feature which provides
# no guarantees of backwards compatibility. It may be subject
# to change or removal in any patch version. Anyone opting in
# to this feature should strictly pin botocore.
host = urlparse(request.url).hostname
proxy_headers['host'] = host
# https://github.com/boto/botocore/issues/1255
headers['Accept-Encoding'] = 'identity'
headers_ = MultiDict(
(z[0], _text(z[1], encoding='utf-8')) for z in headers.items()
)
if isinstance(data, io.IOBase):
data = _IOBaseWrapper(data)
url = URL(url, encoded=True)
response = await self._session.request(
request.method,
url=url,
headers=headers_,
data=data,
proxy=proxy_url,
proxy_headers=proxy_headers,
)
http_response = aiobotocore.awsrequest.AioAWSResponse(
str(response.url), response.status, response.headers, response
)
if not request.stream_output:
# Cause the raw stream to be exhausted immediately. We do it
# this way instead of using preload_content because
# preload_content will never buffer chunked responses
await http_response.content
return http_response
except ClientSSLError as e:
raise SSLError(endpoint_url=request.url, error=e)
except (ClientProxyConnectionError, ClientHttpProxyError) as e:
raise ProxyConnectionError(
proxy_url=mask_proxy_url(proxy_url), error=e
)
except (
ServerDisconnectedError,
aiohttp.ClientPayloadError,
aiohttp.http_exceptions.BadStatusLine,
) as e:
raise ConnectionClosedError(
error=e, request=request, endpoint_url=request.url
)
except ServerTimeoutError as e:
if str(e).lower().startswith('connect'):
raise ConnectTimeoutError(endpoint_url=request.url, error=e)
else:
raise ReadTimeoutError(endpoint_url=request.url, error=e)
except (
ClientConnectorError,
ClientConnectionError,
socket.gaierror,
) as e:
> raise EndpointConnectionError(endpoint_url=request.url, error=e)
E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://[fd00:ec2::254]/latest/api/token"
aiobotocore/httpsession.py:246: EndpointConnectionError
____________________________________________________________ test_sso_credential_fetcher_can_fetch_credentials _____________________________________________________________
ssl_credential_fetcher_setup = <async_generator object ssl_credential_fetcher_setup at 0x7f3e254d41f0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_sso_credential_fetcher_can_fetch_credentials(
ssl_credential_fetcher_setup,
):
self = ssl_credential_fetcher_setup
expected_params = {
> 'roleName': self.role_name,
'accountId': self.account_id,
'accessToken': self.access_token,
}
E AttributeError: 'async_generator' object has no attribute 'role_name'
tests/boto_tests/test_credentials.py:1115: AttributeError
__________________________________________________ test_sso_cred_fetcher_raises_helpful_message_on_unauthorized_exception __________________________________________________
ssl_credential_fetcher_setup = <async_generator object ssl_credential_fetcher_setup at 0x7f3e254d49d0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_sso_cred_fetcher_raises_helpful_message_on_unauthorized_exception(
ssl_credential_fetcher_setup,
):
self = ssl_credential_fetcher_setup
expected_params = {
> 'roleName': self.role_name,
'accountId': self.account_id,
'accessToken': self.access_token,
}
E AttributeError: 'async_generator' object has no attribute 'role_name'
tests/boto_tests/test_credentials.py:1158: AttributeError
___________________________________________________________________ test_load_sso_credentials_with_cache ___________________________________________________________________
sso_provider_setup = <async_generator object sso_provider_setup at 0x7f3e254d4160>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_load_sso_credentials_with_cache(sso_provider_setup):
self = sso_provider_setup
cached_creds = {
'Credentials': {
'AccessKeyId': 'cached-akid',
'SecretAccessKey': 'cached-sak',
'SessionToken': 'cached-st',
> 'Expiration': self.expires_at.strftime('%Y-%m-%dT%H:%M:%S%Z'),
}
}
E AttributeError: 'async_generator' object has no attribute 'expires_at'
tests/boto_tests/test_credentials.py:1275: AttributeError
_______________________________________________________________ test_load_sso_credentials_with_cache_expired _______________________________________________________________
sso_provider_setup = <async_generator object sso_provider_setup at 0x7f3e25b21e50>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_load_sso_credentials_with_cache_expired(sso_provider_setup):
self = sso_provider_setup
cached_creds = {
'Credentials': {
'AccessKeyId': 'expired-akid',
'SecretAccessKey': 'expired-sak',
'SessionToken': 'expired-st',
'Expiration': '2002-10-22T20:52:11UTC',
}
}
> self.cache[self.cached_creds_key] = cached_creds
E AttributeError: 'async_generator' object has no attribute 'cache'
tests/boto_tests/test_credentials.py:1298: AttributeError
_______________________________________________________________________ test_required_config_not_set _______________________________________________________________________
sso_provider_setup = <async_generator object sso_provider_setup at 0x7f3e252f1280>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_required_config_not_set(sso_provider_setup):
self = sso_provider_setup
> del self.config['sso_start_url']
E AttributeError: 'async_generator' object has no attribute 'config'
tests/boto_tests/test_credentials.py:1314: AttributeError
___________________________________________________________________ test_signers_generate_db_auth_token ____________________________________________________________________
rds_client = <async_generator object rds_client at 0x7f3e258339d0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_signers_generate_db_auth_token(rds_client):
hostname = 'prod-instance.us-east-1.rds.amazonaws.com'
port = 3306
username = 'someusername'
clock = datetime.datetime(2016, 11, 7, 17, 39, 33, tzinfo=timezone.utc)
with mock.patch('datetime.datetime') as dt:
dt.utcnow.return_value = clock
> result = await aiobotocore.signers.generate_db_auth_token(
rds_client, hostname, port, username
)
tests/boto_tests/test_signers.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <async_generator object rds_client at 0x7f3e258339d0>, DBHostname = 'prod-instance.us-east-1.rds.amazonaws.com', Port = 3306, DBUsername = 'someusername'
Region = None
async def generate_db_auth_token(
self, DBHostname, Port, DBUsername, Region=None
):
"""Generates an auth token used to connect to a db with IAM credentials.
:type DBHostname: str
:param DBHostname: The hostname of the database to connect to.
:type Port: int
:param Port: The port number the database is listening on.
:type DBUsername: str
:param DBUsername: The username to log in as.
:type Region: str
:param Region: The region the database is in. If None, the client
region will be used.
:return: A presigned url which can be used as an auth token.
"""
region = Region
if region is None:
> region = self.meta.region_name
E AttributeError: 'async_generator' object has no attribute 'meta'
aiobotocore/signers.py:196: AttributeError
_____________________________________________________________________ test_kinesis_stream_json_parser ______________________________________________________________________
exit_stack = <async_generator object exit_stack at 0x7f3e252ebe50>
@pytest.mark.asyncio
async def test_kinesis_stream_json_parser(exit_stack: AsyncExitStack):
# unfortunately moto doesn't support kinesis register_stream_consumer +
# subscribe_to_shard yet
stream_name = "my_stream"
stream_arn = consumer_arn = None
consumer_name = 'consumer'
session = aiobotocore.session.AioSession()
> kinesis_client = await exit_stack.enter_async_context(
session.create_client('kinesis')
)
E AttributeError: 'async_generator' object has no attribute 'enter_async_context'
tests/python3.8/test_eventstreams.py:19: AttributeError
_________________________________________________________________________ test_testsigner_get_auth _________________________________________________________________________
base_signer_setup = <coroutine object base_signer_setup at 0x7f3e259511c0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_testsigner_get_auth(base_signer_setup: dict):
auth_cls = mock.Mock()
with mock.patch.dict(botocore.auth.AUTH_TYPE_MAPS, {'v4': auth_cls}):
> signer = base_signer_setup['signer']
E TypeError: 'coroutine' object is not subscriptable
tests/python3.8/boto_tests/test_signers.py:154: TypeError
_________________________________________________________________ test_testsigner_region_required_for_sig4 _________________________________________________________________
base_signer_setup = <coroutine object base_signer_setup at 0x7f3e2583d840>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_testsigner_region_required_for_sig4(base_signer_setup: dict):
signer = aiobotocore.signers.AioRequestSigner(
ServiceId('service_name'),
None,
'signing_name',
'v4',
> base_signer_setup['credentials'],
base_signer_setup['emitter'],
)
E TypeError: 'coroutine' object is not subscriptable
tests/python3.8/boto_tests/test_signers.py:173: TypeError
___________________________________________________________________ test_testsigner_custom_sign_version ____________________________________________________________________
base_signer_setup = <coroutine object base_signer_setup at 0x7f3e2583df40>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_testsigner_custom_sign_version(base_signer_setup: dict):
> signer = base_signer_setup['signer']
E TypeError: 'coroutine' object is not subscriptable
tests/python3.8/boto_tests/test_signers.py:184: TypeError
__________________________________________________________________ test_testsigner_choose_signer_override __________________________________________________________________
base_signer_setup = <coroutine object base_signer_setup at 0x7f3e2583d9c0>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_testsigner_choose_signer_override(base_signer_setup: dict):
auth_cls = mock.Mock()
auth_cls.REQUIRES_REGION = False
> base_signer_setup['emitter'].emit_until_response.return_value = (
None,
'custom',
)
E TypeError: 'coroutine' object is not subscriptable
tests/python3.8/boto_tests/test_signers.py:196: TypeError
__________________________________________________________________ test_testsigner_generate_presigned_url __________________________________________________________________
base_signer_setup = <coroutine object base_signer_setup at 0x7f3e2583de40>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_testsigner_generate_presigned_url(base_signer_setup: dict):
auth_cls = mock.Mock()
auth_cls.REQUIRES_REGION = True
request_dict = {
'headers': {},
'url': 'https://foo.com',
'body': b'',
'url_path': '/',
'method': 'GET',
'context': {},
}
with mock.patch.dict(botocore.auth.AUTH_TYPE_MAPS, {'v4-query': auth_cls}):
> signer = base_signer_setup['signer']
E TypeError: 'coroutine' object is not subscriptable
tests/python3.8/boto_tests/test_signers.py:227: TypeError
_________________________________________________________________ test_testsigner_generate_presigned_post __________________________________________________________________
base_signer_setup_s3v4 = <coroutine object base_signer_setup_s3v4 at 0x7f3e2583dd40>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_testsigner_generate_presigned_post(
base_signer_setup_s3v4: dict,
):
auth_cls = mock.Mock()
auth_cls.REQUIRES_REGION = True
request_dict = {
'headers': {},
'url': 'https://s3.amazonaws.com/mybucket',
'body': b'',
'url_path': '/',
'method': 'POST',
'context': {},
}
with mock.patch.dict(
botocore.auth.AUTH_TYPE_MAPS, {'s3v4-presign-post': auth_cls}
):
> signer = base_signer_setup_s3v4['signer']
E TypeError: 'coroutine' object is not subscriptable
tests/python3.8/boto_tests/test_signers.py:262: TypeError
============================================================================= warnings summary =============================================================================
tests/conftest.py:25
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/tests/conftest.py:25: PytestRemovedIn8Warning: The pytest_cmdline_preparse hook is deprecated and will be removed in a future release.
Please use pytest_load_initial_conftests hook instead.
def pytest_cmdline_preparse(args):
tests/test_config.py::test_connector_args
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/tests/test_config.py:52: DeprecationWarning: The object should be created within an async function
AioConfig({"resolver": aiohttp.resolver.DefaultResolver()})
tests/boto_tests/test_utils.py::test_idmsfetcher_retry
/usr/lib/python3.8/site-packages/botocore/awsrequest.py:606: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
self.update(*args, **kwargs)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/boto_tests/test_utils.py::test_idmsfetcher_retry
/usr/lib/python3.8/site-packages/botocore/awsrequest.py:606: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
self.update(*args, **kwargs)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser
/usr/lib/python3.8/site-packages/botocore/hooks.py:470: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
event_parts[event_parts.index(old_part)] = new_part
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser
/usr/lib/python3.8/site-packages/botocore/hooks.py:470: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
event_parts[event_parts.index(old_part)] = new_part
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::TestInstanceMetadataFetcher::test_disabling_env_var_not_true
/usr/lib64/python3.8/linecache.py:65: RuntimeWarning: coroutine 'base_signer_setup' was never awaited
for filename in filenames:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::TestInstanceMetadataFetcher::test_disabling_env_var_not_true
/usr/lib64/python3.8/linecache.py:65: RuntimeWarning: coroutine 'base_signer_setup_s3v4' was never awaited
for filename in filenames:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_bad_status
/usr/lib64/python3.8/inspect.py:2177: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
parameters.append(Parameter(name, annotation=annotation,
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_not_json
/usr/lib64/python3.8/unittest/mock.py:2076: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
self.name = name
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_basic_s3.py:415: Not supported
ERROR tests/test_basic_s3.py::test_paginate_max_items - AttributeError: 'async_generator' object has no attribute 'abort_multipart_upload'
ERROR tests/test_sns.py::test_topic_attributes - AttributeError: 'async_generator' object has no attribute 'create_topic'
ERROR tests/test_sns.py::test_topic_attributes - AttributeError: 'async_generator' object has no attribute 'delete_topic'
ERROR tests/test_sns.py::test_creating_subscription - AttributeError: 'async_generator' object has no attribute 'create_topic'
ERROR tests/test_sns.py::test_creating_subscription - AttributeError: 'async_generator' object has no attribute 'delete_topic'
ERROR tests/test_sns.py::test_publish_to_http - AttributeError: 'async_generator' object has no attribute 'create_topic'
ERROR tests/test_sns.py::test_publish_to_http - AttributeError: 'async_generator' object has no attribute 'delete_topic'
ERROR tests/boto_tests/test_credentials.py::test_load_sso_credentials_without_cache
FAILED tests/test_basic_s3.py::test_can_make_request - AttributeError: 'async_generator' object has no attribute 'list_buckets'
FAILED tests/test_basic_s3.py::test_can_make_request_no_verify[False] - AttributeError: 'async_generator' object has no attribute 'list_buckets'
FAILED tests/test_basic_s3.py::test_fail_proxy_request - AttributeError: 'async_generator' object has no attribute 'list_buckets'
FAILED tests/test_basic_s3.py::test_succeed_proxy_request[False] - AttributeError: 'async_generator' object has no attribute 'list_buckets'
FAILED tests/test_basic_s3.py::test_can_get_bucket_location - AttributeError: 'async_generator' object has no attribute 'get_bucket_location'
FAILED tests/test_basic_s3.py::test_can_delete_urlencoded_object - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_can_paginate - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_can_paginate_with_page_size - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_can_search_paginate - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_can_paginate_iterator - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_result_key_iters - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_can_get_and_put_object - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_adaptive_retry - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_get_object_stream_wrapper - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_get_object_stream_context - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_paginate_max_items - AttributeError: 'async_generator' object has no attribute 'create_multipart_upload'
FAILED tests/test_basic_s3.py::test_paginate_within_page_boundaries - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_unicode_key_put_list[False] - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_unicode_system_character[False] - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_non_normalized_key_paths - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_copy_with_quoted_char - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_copy_with_query_string - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_can_copy_with_dict_form - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_copy_with_s3_metadata - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_presign_with_existing_query_string_values[False-s3-us-east-1] - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_presign_sigv4[False-s3v4-us-east-1] - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_can_follow_signed_url_redirect[False-s3v4] - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_basic_s3.py::test_bucket_redirect[False-us-west-2-eu-west-1] - TypeError: 'async_generator' object is not callable
FAILED tests/test_basic_s3.py::test_head_object_keys[s3v4] - AttributeError: 'async_generator' object has no attribute 'put_object'
FAILED tests/test_batch.py::test_batch - AttributeError: 'async_generator' object has no attribute 'describe_job_queues'
FAILED tests/test_dynamodb.py::test_get_item[v4] - AttributeError: 'async_generator' object has no attribute 'put_item'
FAILED tests/test_dynamodb.py::test_create_waiter[v4] - AttributeError: 'async_generator' object has no attribute 'create_table'
FAILED tests/test_dynamodb.py::test_batch_write_scan[v4] - AttributeError: 'async_generator' object has no attribute 'batch_write_item'
FAILED tests/test_dynamodb.py::test_delete_table[v4] - AttributeError: 'async_generator' object has no attribute 'create_table'
FAILED tests/test_dynamodb.py::test_waiter_table_exists_failure[v4] - AttributeError: 'async_generator' object has no attribute 'get_waiter'
FAILED tests/test_dynamodb.py::test_waiter_table_exists[v4] - AttributeError: 'async_generator' object has no attribute 'get_waiter'
FAILED tests/test_ec2.py::test_ec2_snapshot - AttributeError: 'async_generator' object has no attribute 'create_volume'
FAILED tests/test_eventstreams.py::test_eventstream_chunking - AttributeError: 'async_generator' object has no attribute '_service_model'
FAILED tests/test_eventstreams.py::test_eventstream_no_iter - AttributeError: 'async_generator' object has no attribute '_service_model'
FAILED tests/test_lambda.py::test_run_lambda - AttributeError: 'async_generator' object has no attribute 'get_role'
FAILED tests/test_monitor.py::test_monitor_response_received - AttributeError: 'async_generator' object has no attribute 'meta'
FAILED tests/test_mturk.py::test_mturk_stubber - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254.169.254/latest/api/token"
FAILED tests/test_patches.py::test_patches - assert False
FAILED tests/test_sns.py::test_get_missing_endpoint_attributes - AttributeError: 'async_generator' object has no attribute 'get_endpoint_attributes'
FAILED tests/test_sns.py::test_platform_applications - AttributeError: 'async_generator' object has no attribute 'create_platform_application'
FAILED tests/test_sqs.py::test_list_queues - AttributeError: 'async_generator' object has no attribute 'list_queues'
FAILED tests/test_sqs.py::test_get_queue_name - AttributeError: 'async_generator' object has no attribute 'rsplit'
FAILED tests/test_sqs.py::test_put_pull_delete_test - AttributeError: 'async_generator' object has no attribute 'send_message'
FAILED tests/test_sqs.py::test_put_pull_wait - AttributeError: 'async_generator' object has no attribute 'receive_message'
FAILED tests/test_waiter.py::test_sqs - AttributeError: 'async_generator' object has no attribute 'create_stack'
FAILED tests/boto_tests/test_credentials.py::test_get_credentials - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://[fd00:ec2...
FAILED tests/boto_tests/test_credentials.py::test_sso_credential_fetcher_can_fetch_credentials - AttributeError: 'async_generator' object has no attribute 'role_name'
FAILED tests/boto_tests/test_credentials.py::test_sso_cred_fetcher_raises_helpful_message_on_unauthorized_exception - AttributeError: 'async_generator' object has no att...
FAILED tests/boto_tests/test_credentials.py::test_load_sso_credentials_with_cache - AttributeError: 'async_generator' object has no attribute 'expires_at'
FAILED tests/boto_tests/test_credentials.py::test_load_sso_credentials_with_cache_expired - AttributeError: 'async_generator' object has no attribute 'cache'
FAILED tests/boto_tests/test_credentials.py::test_required_config_not_set - AttributeError: 'async_generator' object has no attribute 'config'
FAILED tests/boto_tests/test_signers.py::test_signers_generate_db_auth_token - AttributeError: 'async_generator' object has no attribute 'meta'
FAILED tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser - AttributeError: 'async_generator' object has no attribute 'enter_async_context'
FAILED tests/python3.8/boto_tests/test_signers.py::test_testsigner_get_auth - TypeError: 'coroutine' object is not subscriptable
FAILED tests/python3.8/boto_tests/test_signers.py::test_testsigner_region_required_for_sig4 - TypeError: 'coroutine' object is not subscriptable
FAILED tests/python3.8/boto_tests/test_signers.py::test_testsigner_custom_sign_version - TypeError: 'coroutine' object is not subscriptable
FAILED tests/python3.8/boto_tests/test_signers.py::test_testsigner_choose_signer_override - TypeError: 'coroutine' object is not subscriptable
FAILED tests/python3.8/boto_tests/test_signers.py::test_testsigner_generate_presigned_url - TypeError: 'coroutine' object is not subscriptable
FAILED tests/python3.8/boto_tests/test_signers.py::test_testsigner_generate_presigned_post - TypeError: 'coroutine' object is not subscriptable
==================================================== 65 failed, 112 passed, 1 skipped, 10 warnings, 8 errors in 14.21s ===================================================== |
compare to https://github.com/aio-libs/aiobotocore/runs/8013297817?check_suite_focus=true where it's passing. Are you using an environment created by the Pipfile.lock? |
No I'm using environment created inside LXC zone using rpm packages. BTW in CI output I see that you are sunning So you have no idea what could be missing in my env? |
that's fine, the issue is you need to use pipenv to ensure your python environment has the packages required. |
The issue is that the test suite is not compatible with pytest-asyncio >= 0.19 yet. If I add the following line to pytest.ini, most tests can pass. diff --git a/pytest.ini b/pytest.ini
index 319ae64..753266c 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,4 +1,5 @@
[pytest]
+asyncio_mode = auto
markers =
moto
config_kwargs |
Summary result with ============================================================================= warnings summary =============================================================================
tests/conftest.py:25
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/tests/conftest.py:25: PytestRemovedIn8Warning: The pytest_cmdline_preparse hook is deprecated and will be removed in a future release.
Please use pytest_load_initial_conftests hook instead.
def pytest_cmdline_preparse(args):
tests/test_basic_s3.py: 23 warnings
tests/test_config.py: 2 warnings
tests/test_eventstreams.py: 2 warnings
tests/test_monitor.py: 1 warning
tests/test_session.py: 1 warning
tests/python3.8/boto_tests/test_signers.py: 2 warnings
/usr/lib/python3.8/site-packages/botocore/utils.py:1719: FutureWarning: The S3RegionRedirector class has been deprecated for a new internal replacement. A future version of botocore may remove this class.
warnings.warn(
tests/test_basic_s3.py::test_can_make_request_no_verify[False]
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/aiobotocore/httpsession.py:111: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._create_connector = lambda: aiohttp.TCPConnector(
tests/test_config.py::test_connector_args
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/tests/test_config.py:52: DeprecationWarning: The object should be created within an async function
AioConfig({"resolver": aiohttp.resolver.DefaultResolver()})
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/usr/lib/python3.8/site-packages/botocore/awsrequest.py:452: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
params = {} if params is None else params
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/usr/lib/python3.8/site-packages/botocore/awsrequest.py:452: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
params = {} if params is None else params
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_bad_status
/usr/lib64/python3.8/inspect.py:2985: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
for param in itertools.chain(parameters_ex, parameters):
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_not_json
/usr/lib64/python3.8/unittest/mock.py:2030: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
setattr(_type, entry, MagicProxy(entry, self))
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_basic_s3.py:415: Not supported
ERROR tests/test_basic_s3.py::test_succeed_proxy_request[False] - botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://127.0.0.1:54321"
ERROR tests/test_basic_s3.py::test_can_get_bucket_location - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_delete_urlencoded_object - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_paginate - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_paginate_with_page_size - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_search_paginate - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_paginate_iterator - assert 200 == 204
ERROR tests/test_basic_s3.py::test_result_key_iters - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_get_and_put_object - assert 200 == 204
ERROR tests/test_basic_s3.py::test_adaptive_retry - assert 200 == 204
ERROR tests/test_basic_s3.py::test_get_object_stream_wrapper - assert 200 == 204
ERROR tests/test_basic_s3.py::test_get_object_stream_context - assert 200 == 204
ERROR tests/test_basic_s3.py::test_paginate_max_items - botocore.exceptions.ParamValidationError: Parameter validation failed:
ERROR tests/test_basic_s3.py::test_paginate_within_page_boundaries - assert 200 == 204
ERROR tests/test_basic_s3.py::test_unicode_key_put_list[False] - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254.169.254/latest...
ERROR tests/test_basic_s3.py::test_unicode_system_character[False] - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254.169.254/la...
ERROR tests/test_basic_s3.py::test_non_normalized_key_paths - assert 200 == 204
ERROR tests/test_basic_s3.py::test_copy_with_quoted_char - assert 200 == 204
ERROR tests/test_basic_s3.py::test_copy_with_query_string - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - assert 200 == 204
ERROR tests/test_basic_s3.py::test_copy_with_s3_metadata - assert 200 == 204
ERROR tests/test_basic_s3.py::test_presign_with_existing_query_string_values[False-s3-us-east-1] - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint U...
ERROR tests/test_basic_s3.py::test_presign_sigv4[False-s3v4-us-east-1] - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254.169.25...
ERROR tests/test_basic_s3.py::test_can_follow_signed_url_redirect[False-s3v4] - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254...
ERROR tests/test_basic_s3.py::test_bucket_redirect[False-us-west-2-eu-west-1] - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254...
ERROR tests/test_basic_s3.py::test_head_object_keys[s3v4] - assert 200 == 204
ERROR tests/boto_tests/test_credentials.py::test_sso_credential_fetcher_can_fetch_credentials - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL:...
ERROR tests/boto_tests/test_credentials.py::test_sso_cred_fetcher_raises_helpful_message_on_unauthorized_exception - botocore.exceptions.ConnectTimeoutError: Connect tim...
ERROR tests/boto_tests/test_credentials.py::test_load_sso_credentials_without_cache
ERROR tests/boto_tests/test_credentials.py::test_load_sso_credentials_with_cache - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169....
ERROR tests/boto_tests/test_credentials.py::test_load_sso_credentials_with_cache_expired - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "htt...
ERROR tests/boto_tests/test_credentials.py::test_required_config_not_set - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254.169....
FAILED tests/test_basic_s3.py::test_can_delete_urlencoded_object - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operat...
FAILED tests/test_basic_s3.py::test_can_paginate - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4)...
FAILED tests/test_basic_s3.py::test_can_paginate_with_page_size - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached ...
FAILED tests/test_basic_s3.py::test_can_search_paginate - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retr...
FAILED tests/test_basic_s3.py::test_can_paginate_iterator - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max re...
FAILED tests/test_basic_s3.py::test_result_key_iters - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: The spe...
FAILED tests/test_basic_s3.py::test_can_get_and_put_object - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max r...
FAILED tests/test_basic_s3.py::test_adaptive_retry - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: ...
FAILED tests/test_basic_s3.py::test_get_object_stream_wrapper - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached ma...
FAILED tests/test_basic_s3.py::test_get_object_stream_context - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached ma...
FAILED tests/test_basic_s3.py::test_paginate_max_items - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the CreateMultipartUpload oper...
FAILED tests/test_basic_s3.py::test_paginate_within_page_boundaries - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reac...
FAILED tests/test_basic_s3.py::test_non_normalized_key_paths - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation:...
FAILED tests/test_basic_s3.py::test_copy_with_quoted_char - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: Th...
FAILED tests/test_basic_s3.py::test_copy_with_query_string - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: T...
FAILED tests/test_basic_s3.py::test_can_copy_with_dict_form - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: ...
FAILED tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObjec...
FAILED tests/test_basic_s3.py::test_copy_with_s3_metadata - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max re...
FAILED tests/test_basic_s3.py::test_head_object_keys[s3v4] - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max r...
FAILED tests/test_lambda.py::test_run_lambda - botocore.exceptions.ClientError: An error occurred (500) when calling the CreateFunction operation (reached max retries: 4...
FAILED tests/test_mturk.py::test_mturk_stubber - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254.169.254/latest/api/token"
FAILED tests/test_patches.py::test_patches - assert False
FAILED tests/test_waiter.py::test_sqs - botocore.parsers.ResponseParserError: Unable to parse response (syntax error: line 1, column 0), invalid XML received. Further re...
FAILED tests/boto_tests/test_credentials.py::test_get_credentials - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://[fd00:ec2...
FAILED tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser - botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254....
FAILED tests/python3.8/boto_tests/test_signers.py::test_signers_generate_presigned_urls - AssertionError: expected call not found.
============================================== 26 failed, 142 passed, 1 skipped, 38 warnings, 33 errors in 193.01s (0:03:13) =============================================== Some of the units are failing because |
docker is used by moto for lambda testing |
if we don't have lambda then probably don't need |
FWIW, I have once got similar errors, and I got rid of them by adding some environment variables. See #948 (comment) |
Tested ant it does not change anything and more even units fails. ========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_basic_s3.py:415: Not supported
ERROR tests/test_basic_s3.py::test_can_get_bucket_location - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_delete_urlencoded_object - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_paginate - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_paginate_with_page_size - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_search_paginate - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_paginate_iterator - assert 200 == 204
ERROR tests/test_basic_s3.py::test_result_key_iters - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_get_and_put_object - assert 200 == 204
ERROR tests/test_basic_s3.py::test_adaptive_retry - assert 200 == 204
ERROR tests/test_basic_s3.py::test_get_object_stream_wrapper - assert 200 == 204
ERROR tests/test_basic_s3.py::test_get_object_stream_context - assert 200 == 204
ERROR tests/test_basic_s3.py::test_paginate_max_items - botocore.exceptions.ParamValidationError: Parameter validation failed:
ERROR tests/test_basic_s3.py::test_paginate_within_page_boundaries - assert 200 == 204
ERROR tests/test_basic_s3.py::test_unicode_key_put_list[False] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the CreateBucket op...
ERROR tests/test_basic_s3.py::test_unicode_key_put_list[False] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the ListObjectVersi...
ERROR tests/test_basic_s3.py::test_unicode_system_character[False] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the CreateBucke...
ERROR tests/test_basic_s3.py::test_unicode_system_character[False] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the ListObjectV...
ERROR tests/test_basic_s3.py::test_non_normalized_key_paths - assert 200 == 204
ERROR tests/test_basic_s3.py::test_copy_with_quoted_char - assert 200 == 204
ERROR tests/test_basic_s3.py::test_copy_with_query_string - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - assert 200 == 204
ERROR tests/test_basic_s3.py::test_copy_with_s3_metadata - assert 200 == 204
ERROR tests/test_basic_s3.py::test_presign_with_existing_query_string_values[False-s3-us-east-1] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId...
ERROR tests/test_basic_s3.py::test_presign_with_existing_query_string_values[False-s3-us-east-1] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId...
ERROR tests/test_basic_s3.py::test_presign_sigv4[False-s3v4-us-east-1] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the CreateB...
ERROR tests/test_basic_s3.py::test_presign_sigv4[False-s3v4-us-east-1] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the ListObj...
ERROR tests/test_basic_s3.py::test_can_follow_signed_url_redirect[False-s3v4] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the ...
ERROR tests/test_basic_s3.py::test_can_follow_signed_url_redirect[False-s3v4] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the ...
ERROR tests/test_basic_s3.py::test_bucket_redirect[False-us-west-2-eu-west-1] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the ...
ERROR tests/test_basic_s3.py::test_head_object_keys[s3v4] - assert 200 == 204
ERROR tests/boto_tests/test_credentials.py::test_load_sso_credentials_without_cache
FAILED tests/test_basic_s3.py::test_succeed_proxy_request[False] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the ListBuckets o...
FAILED tests/test_basic_s3.py::test_can_delete_urlencoded_object - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operat...
FAILED tests/test_basic_s3.py::test_can_paginate - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4)...
FAILED tests/test_basic_s3.py::test_can_paginate_with_page_size - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached ...
FAILED tests/test_basic_s3.py::test_can_search_paginate - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retr...
FAILED tests/test_basic_s3.py::test_can_paginate_iterator - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max re...
FAILED tests/test_basic_s3.py::test_result_key_iters - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: The spe...
FAILED tests/test_basic_s3.py::test_can_get_and_put_object - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max r...
FAILED tests/test_basic_s3.py::test_adaptive_retry - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: ...
FAILED tests/test_basic_s3.py::test_get_object_stream_wrapper - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached ma...
FAILED tests/test_basic_s3.py::test_get_object_stream_context - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached ma...
FAILED tests/test_basic_s3.py::test_paginate_max_items - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the CreateMultipartUpload oper...
FAILED tests/test_basic_s3.py::test_paginate_within_page_boundaries - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reac...
FAILED tests/test_basic_s3.py::test_non_normalized_key_paths - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation:...
FAILED tests/test_basic_s3.py::test_copy_with_quoted_char - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: Th...
FAILED tests/test_basic_s3.py::test_copy_with_query_string - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: T...
FAILED tests/test_basic_s3.py::test_can_copy_with_dict_form - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: ...
FAILED tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObjec...
FAILED tests/test_basic_s3.py::test_copy_with_s3_metadata - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max re...
FAILED tests/test_basic_s3.py::test_bucket_redirect[False-us-west-2-eu-west-1] - botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the...
FAILED tests/test_basic_s3.py::test_head_object_keys[s3v4] - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max r...
FAILED tests/test_lambda.py::test_run_lambda - botocore.exceptions.ClientError: An error occurred (500) when calling the CreateFunction operation (reached max retries: 4...
FAILED tests/test_mturk.py::test_mturk_stubber - AttributeError: 'MTurk' object has no attribute 'list_hi_ts_for_qualification_type'
FAILED tests/test_patches.py::test_patches - assert False
FAILED tests/test_waiter.py::test_sqs - botocore.parsers.ResponseParserError: Unable to parse response (syntax error: line 1, column 0), invalid XML received. Further re...
FAILED tests/boto_tests/test_credentials.py::test_get_credentials - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://[fd00:ec2...
FAILED tests/boto_tests/test_credentials.py::test_load_sso_credentials_with_cache_expired - botocore.exceptions.StubAssertionError: Error getting response stub for opera...
FAILED tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser - botocore.exceptions.NoRegionError: You must specify a region.
FAILED tests/python3.8/boto_tests/test_signers.py::test_signers_generate_presigned_urls - AssertionError: expected call not found.
============================================== 29 failed, 146 passed, 1 skipped, 47 warnings, 32 errors in 209.63s (0:03:29) =============================================== Looks like test suite needs access to AWS services |
After add to my build procedure all those units which are falis or ends with error to --deselect list I was able to produce clean output with some warnings. + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.4.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.4.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --deselect tests/boto_tests/test_credentials.py::test_get_credentials --deselect tests/boto_tests/test_credentials.py::test_load_sso_credentials_with_cache --deselect tests/boto_tests/test_credentials.py::test_load_sso_credentials_with_cache_expired --deselect tests/boto_tests/test_credentials.py::test_load_sso_credentials_without_cache --deselect tests/boto_tests/test_credentials.py::test_required_config_not_set --deselect tests/boto_tests/test_credentials.py::test_sso_credential_fetcher_can_fetch_credentials --deselect tests/boto_tests/test_credentials.py::test_sso_cred_fetcher_raises_helpful_message_on_unauthorized_exception --deselect tests/python3.8/boto_tests/test_signers.py::test_signers_generate_presigned_urls --deselect tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser --deselect tests/test_basic_s3.py::test_adaptive_retry --deselect 'tests/test_basic_s3.py::test_bucket_redirect[False-us-west-2-eu-west-1]' --deselect tests/test_basic_s3.py::test_can_copy_with_dict_form --deselect tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version --deselect tests/test_basic_s3.py::test_can_delete_urlencoded_object --deselect 'tests/test_basic_s3.py::test_can_follow_signed_url_redirect[False-s3v4]' --deselect tests/test_basic_s3.py::test_can_get_and_put_object --deselect tests/test_basic_s3.py::test_can_get_bucket_location --deselect tests/test_basic_s3.py::test_can_paginate --deselect tests/test_basic_s3.py::test_can_paginate_iterator --deselect tests/test_basic_s3.py::test_can_paginate_with_page_size --deselect tests/test_basic_s3.py::test_can_search_paginate --deselect tests/test_basic_s3.py::test_copy_with_query_string --deselect tests/test_basic_s3.py::test_copy_with_quoted_char --deselect tests/test_basic_s3.py::test_copy_with_s3_metadata --deselect tests/test_basic_s3.py::test_get_object_stream_context --deselect tests/test_basic_s3.py::test_get_object_stream_wrapper --deselect 'tests/test_basic_s3.py::test_head_object_keys[s3v4]' --deselect tests/test_basic_s3.py::test_non_normalized_key_paths --deselect tests/test_basic_s3.py::test_paginate_max_items --deselect tests/test_basic_s3.py::test_paginate_within_page_boundaries --deselect 'tests/test_basic_s3.py::test_presign_sigv4[False-s3v4-us-east-1]' --deselect 'tests/test_basic_s3.py::test_presign_with_existing_query_string_values[False-s3-us-east-1]' --deselect tests/test_basic_s3.py::test_result_key_iters --deselect 'tests/test_basic_s3.py::test_succeed_proxy_request[False]' --deselect 'tests/test_basic_s3.py::test_unicode_key_put_list[False]' --deselect 'tests/test_basic_s3.py::test_unicode_system_character[False]' --deselect tests/test_lambda.py::test_run_lambda --deselect tests/test_mturk.py::test_mturk_stubber --deselect tests/test_patches.py::test_patches --deselect tests/test_waiter.py::test_sqs
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.15, pytest-7.1.3, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0, configfile: pytest.ini
plugins: asyncio-0.20.2
asyncio: mode=auto
collected 182 items / 40 deselected / 142 selected
tests/test_adaptive.py ........... [ 7%]
tests/test_basic_s3.py ...s [ 10%]
tests/test_batch.py . [ 11%]
tests/test_config.py ..... [ 14%]
tests/test_dynamodb.py ...... [ 19%]
tests/test_ec2.py . [ 19%]
tests/test_eventstreams.py .. [ 21%]
tests/test_monitor.py . [ 21%]
tests/test_patches.py . [ 22%]
tests/test_response.py ............... [ 33%]
tests/test_session.py .. [ 34%]
tests/test_sns.py ..... [ 38%]
tests/test_sqs.py .... [ 40%]
tests/test_version.py . [ 41%]
tests/boto_tests/test_credentials.py ............................ [ 61%]
tests/boto_tests/test_signers.py . [ 61%]
tests/boto_tests/test_utils.py ........ [ 67%]
tests/python3.8/boto_tests/test_credentials.py ............... [ 78%]
tests/python3.8/boto_tests/test_signers.py ....... [ 83%]
tests/python3.8/boto_tests/test_utils.py ........................ [100%]
============================================================================= warnings summary =============================================================================
tests/conftest.py:25
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/tests/conftest.py:25: PytestRemovedIn8Warning: The pytest_cmdline_preparse hook is deprecated and will be removed in a future release.
Please use pytest_load_initial_conftests hook instead.
def pytest_cmdline_preparse(args):
tests/test_basic_s3.py: 3 warnings
tests/test_config.py: 2 warnings
tests/test_eventstreams.py: 2 warnings
tests/test_monitor.py: 1 warning
tests/test_session.py: 1 warning
tests/python3.8/boto_tests/test_signers.py: 1 warning
/usr/lib/python3.8/site-packages/botocore/utils.py:1719: FutureWarning: The S3RegionRedirector class has been deprecated for a new internal replacement. A future version of botocore may remove this class.
warnings.warn(
tests/test_basic_s3.py::test_can_make_request_no_verify[False]
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/aiobotocore/httpsession.py:111: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._create_connector = lambda: aiohttp.TCPConnector(
tests/test_config.py::test_connector_args
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/tests/test_config.py:52: DeprecationWarning: The object should be created within an async function
AioConfig({"resolver": aiohttp.resolver.DefaultResolver()})
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/tests/boto_tests/test_utils.py:28: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
class FakeAioHttpSession:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.0/tests/boto_tests/test_utils.py:28: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
class FakeAioHttpSession:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_credentials.py::test_session_credentials
/usr/lib64/python3.8/inspect.py:2821: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
params = OrderedDict(((param.name, param)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_credentials.py::test_session_credentials
/usr/lib64/python3.8/inspect.py:2821: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
params = OrderedDict(((param.name, param)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_bad_status
/usr/lib64/python3.8/enum.py:339: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
return cls.__new__(cls, value)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_not_json
/usr/lib64/python3.8/unittest/mock.py:2076: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
self.name = name
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_basic_s3.py:415: Not supported
======================================================= 141 passed, 1 skipped, 40 deselected, 19 warnings in 49.95s ========================================================
sys:1: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback |
I also got many failures from |
Just retested 2.4.2. ===================================================================================== warnings summary ======================================================================================
tests/conftest.py:25
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.2/tests/conftest.py:25: PytestRemovedIn8Warning: The pytest_cmdline_preparse hook is deprecated and will be removed in a future release.
Please use pytest_load_initial_conftests hook instead.
def pytest_cmdline_preparse(args):
tests/test_basic_s3.py: 61 warnings
tests/test_batch.py: 2 warnings
tests/test_dynamodb.py: 12 warnings
tests/test_ec2.py: 1 warning
tests/test_eventstreams.py: 4 warnings
tests/test_lambda.py: 4 warnings
tests/test_monitor.py: 2 warnings
tests/test_sns.py: 10 warnings
tests/test_sqs.py: 8 warnings
tests/test_waiter.py: 2 warnings
tests/boto_tests/test_signers.py: 2 warnings
/usr/lib64/python3.8/site-packages/aiohttp/client.py:1141: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._resp = await self._coro
tests/test_basic_s3.py: 30 warnings
tests/test_config.py: 2 warnings
tests/test_eventstreams.py: 2 warnings
tests/test_monitor.py: 1 warning
tests/test_session.py: 1 warning
tests/python3.8/boto_tests/test_signers.py: 2 warnings
/usr/lib/python3.8/site-packages/botocore/utils.py:1720: FutureWarning: The S3RegionRedirector class has been deprecated for a new internal replacement. A future version of botocore may remove this class.
warnings.warn(
tests/test_basic_s3.py::test_can_make_request_no_verify[False]
tests/test_basic_s3.py::test_put_object_sha256[False-https]
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.2/aiobotocore/httpsession.py:111: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._create_connector = lambda: aiohttp.TCPConnector(
tests/test_config.py::test_connector_args
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.2/tests/test_config.py:52: DeprecationWarning: The object should be created within an async function
AioConfig({"resolver": aiohttp.resolver.DefaultResolver()})
tests/test_version.py::test_release_versions
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.4.2/tests/test_version.py:35: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
settings = docutils.frontend.OptionParser(
tests/test_version.py: 68 warnings
/usr/lib64/python3.8/optparse.py:1000: DeprecationWarning: The frontend.Option class will be removed in Docutils 0.21 or later.
option = self.option_class(*args, **kwargs)
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/usr/lib64/python3.8/os.py:708: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
return dict(self)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/usr/lib64/python3.8/os.py:708: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
return dict(self)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser
/usr/lib/python3.8/site-packages/botocore/httpsession.py:216: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
proxies = {}
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser
/usr/lib/python3.8/site-packages/botocore/httpsession.py:216: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
proxies = {}
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_bad_status
/usr/lib64/python3.8/unittest/mock.py:2076: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
self.name = name
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
../../../../../usr/lib64/python3.8/json/encoder.py:253
/usr/lib64/python3.8/json/encoder.py:253: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
_iterencode = _make_iterencode(
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_basic_s3.py:417: Not supported
XFAIL tests/test_basic_s3.py::test_put_object_sha256[False-https] - moto does not yet support Checksum: https://github.com/spulec/moto/issues/5719
XFAIL tests/test_basic_s3.py::test_put_object_sha256[False-https] - moto does not yet support Checksum: https://github.com/spulec/moto/issues/5719
ERROR tests/test_basic_s3.py::test_succeed_proxy_request[False] - botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://127.0.0.1:54321"
ERROR tests/test_basic_s3.py::test_can_get_bucket_location - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_delete_urlencoded_object - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_paginate - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_paginate_with_page_size - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_search_paginate - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_paginate_iterator - assert 200 == 204
ERROR tests/test_basic_s3.py::test_result_key_iters - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_get_and_put_object - assert 200 == 204
ERROR tests/test_basic_s3.py::test_adaptive_retry - assert 200 == 204
ERROR tests/test_basic_s3.py::test_get_object_stream_wrapper - assert 200 == 204
ERROR tests/test_basic_s3.py::test_get_object_stream_context - assert 200 == 204
ERROR tests/test_basic_s3.py::test_paginate_max_items - botocore.exceptions.ParamValidationError: Parameter validation failed:
ERROR tests/test_basic_s3.py::test_paginate_within_page_boundaries - assert 200 == 204
ERROR tests/test_basic_s3.py::test_unicode_key_put_list[False] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_unicode_key_put_list[False] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_unicode_system_character[False] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_unicode_system_character[False] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_non_normalized_key_paths - assert 200 == 204
ERROR tests/test_basic_s3.py::test_copy_with_quoted_char - assert 200 == 204
ERROR tests/test_basic_s3.py::test_copy_with_query_string - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form - assert 200 == 204
ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - assert 200 == 204
ERROR tests/test_basic_s3.py::test_copy_with_s3_metadata - assert 200 == 204
ERROR tests/test_basic_s3.py::test_presign_with_existing_query_string_values[False-s3-us-east-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_presign_with_existing_query_string_values[False-s3-us-east-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_presign_sigv4[False-s3v4-us-east-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_presign_sigv4[False-s3v4-us-east-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_can_follow_signed_url_redirect[False-s3v4] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_can_follow_signed_url_redirect[False-s3v4] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_bucket_redirect[False-us-west-2-eu-west-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_head_object_keys[s3v4] - assert 200 == 204
ERROR tests/boto_tests/test_credentials.py::test_load_sso_credentials_without_cache
FAILED tests/test_basic_s3.py::test_can_delete_urlencoded_object - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist
FAILED tests/test_basic_s3.py::test_can_paginate - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
FAILED tests/test_basic_s3.py::test_can_paginate_with_page_size - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
FAILED tests/test_basic_s3.py::test_can_search_paginate - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
FAILED tests/test_basic_s3.py::test_can_paginate_iterator - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
FAILED tests/test_basic_s3.py::test_result_key_iters - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist
FAILED tests/test_basic_s3.py::test_can_get_and_put_object - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
FAILED tests/test_basic_s3.py::test_adaptive_retry - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 5): Internal Server Error
FAILED tests/test_basic_s3.py::test_get_object_stream_wrapper - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
FAILED tests/test_basic_s3.py::test_get_object_stream_context - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
FAILED tests/test_basic_s3.py::test_paginate_max_items - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the CreateMultipartUpload operation: The specified bucket does not exist
FAILED tests/test_basic_s3.py::test_paginate_within_page_boundaries - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
FAILED tests/test_basic_s3.py::test_non_normalized_key_paths - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist
FAILED tests/test_basic_s3.py::test_copy_with_quoted_char - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist
FAILED tests/test_basic_s3.py::test_copy_with_query_string - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist
FAILED tests/test_basic_s3.py::test_can_copy_with_dict_form - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist
FAILED tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist
FAILED tests/test_basic_s3.py::test_copy_with_s3_metadata - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
FAILED tests/test_basic_s3.py::test_bucket_redirect[False-us-west-2-eu-west-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
FAILED tests/test_basic_s3.py::test_head_object_keys[s3v4] - botocore.exceptions.ClientError: An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
FAILED tests/test_lambda.py::test_run_lambda - botocore.exceptions.ClientError: An error occurred (500) when calling the CreateFunction operation (reached max retries: 4): <!doctype html>
FAILED tests/test_mturk.py::test_mturk_stubber - AttributeError: 'MTurk' object has no attribute 'list_hi_ts_for_qualification_type'
FAILED tests/test_patches.py::test_patches - assert False
FAILED tests/test_waiter.py::test_sqs - botocore.parsers.ResponseParserError: Unable to parse response (syntax error: line 1, column 0), invalid XML received. Further retries may succeed:
FAILED tests/boto_tests/test_credentials.py::test_load_sso_credentials_with_cache_expired - botocore.exceptions.StubAssertionError: Error getting response stub for operation GetRoleCredentials: Expected parameters:
FAILED tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser - botocore.exceptions.NoRegionError: You must specify a region.
FAILED tests/python3.8/boto_tests/test_signers.py::test_signers_generate_presigned_urls - AssertionError: expected call not found.
================================================= 27 failed, 147 passed, 1 skipped, 2 xfailed, 225 warnings, 33 errors in 238.86s (0:03:58) ================================================= And full log python-aiobotocore-pytest.txt |
Tested 2.5.1. + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.5.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.5.1
configfile: pytest.ini
plugins: asyncio-0.21.0
asyncio: mode=auto
collected 203 items
tests/test_adaptive.py ........... [ 5%]
tests/test_basic_s3.py ...E.............EEEE.s.....EEEEEEFE.x [ 21%]
tests/test_batch.py . [ 21%]
tests/test_config.py ..... [ 24%]
tests/test_dynamodb.py ...... [ 27%]
tests/test_ec2.py . [ 27%]
tests/test_eventstreams.py .. [ 28%]
tests/test_lambda.py F [ 29%]
tests/test_monitor.py . [ 29%]
tests/test_mturk.py . [ 30%]
tests/test_patches.py .F [ 31%]
tests/test_response.py ............... [ 38%]
tests/test_session.py .. [ 39%]
tests/test_sns.py ..... [ 41%]
tests/test_sqs.py .... [ 43%]
tests/test_version.py . [ 44%]
tests/test_waiter.py F [ 44%]
tests/boto_tests/test_credentials.py ...............................E... [ 62%]
tests/boto_tests/test_signers.py . [ 62%]
tests/boto_tests/test_utils.py ........ [ 66%]
tests/python3.8/test_eventstreams.py F [ 66%]
tests/python3.8/boto_tests/test_credentials.py ............... [ 74%]
tests/python3.8/boto_tests/test_signers.py ........ [ 78%]
tests/python3.8/boto_tests/test_tokens.py .................... [ 88%]
tests/python3.8/boto_tests/test_utils.py ........................ [100%]
========================================================================================== ERRORS ===========================================================================================
____________________________________________________________________ ERROR at setup of test_succeed_proxy_request[False] ____________________________________________________________________
self = <aiohttp.connector.TCPConnector object at 0x7fc82934c550>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7fc82936a670>
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1), client_error = <class 'aiohttp.client_exceptions.ClientProxyConnectionError'>
args = (functools.partial(<class 'aiohttp.client_proto.ResponseHandler'>, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 54321)
kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...}
/usr/lib/python3.8/site-packages/pygments/lexer.py:353: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
def group(self, arg=None):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/python3.8/site-packages/pygments/lexer.py:46: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
return type.__new__(mcs, name, bases, d)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
async def _wrap_create_connection(
self,
*args: Any,
req: "ClientRequest",
timeout: "ClientTimeout",
client_error: Type[Exception] = ClientConnectorError,
**kwargs: Any,
) -> Tuple[asyncio.Transport, ResponseHandler]:
try:
async with ceil_timeout(timeout.sock_connect):
> return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:980:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:1025: in create_connection
raise exceptions[0]
/usr/lib64/python3.8/asyncio/base_events.py:1010: in create_connection
sock = await self._connect_sock(
/usr/lib64/python3.8/asyncio/base_events.py:924: in _connect_sock
await self.sock_connect(sock, address)
/usr/lib64/python3.8/asyncio/selector_events.py:496: in sock_connect
return await fut
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_UnixSelectorEventLoop running=False closed=False debug=False>, fut = <Future finished exception=ConnectionRefusedError(111, "Connect call failed ('127.0.0.1', 54321)")>
sock = <socket.socket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>, address = ('127.0.0.1', 54321)
def _sock_connect_cb(self, fut, sock, address):
if fut.done():
return
try:
err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
if err != 0:
# Jump to any except clause below.
> raise OSError(err, f'Connect call failed {address}')
E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 54321)
/usr/lib64/python3.8/asyncio/selector_events.py:528: ConnectionRefusedError
The above exception was the direct cause of the following exception:
self = <aiobotocore.utils._RefCountedSession object at 0x7fc82933d1f0>
request = <AWSPreparedRequest stream_output=False, method=PUT, url=http://169.254.169.254/latest/api/token, headers={'x-aws-ec2-...t': 'Botocore/1.29.160 Python/3.8.17 Linux/6.3.0-0.rc5.20230407gitf2afccfefe7b.46.fc39.x86_64', 'Content-Length': '0'}>
async def send(self, request):
try:
proxy_url = self._proxy_config.proxy_url_for(request.url)
proxy_headers = self._proxy_config.proxy_headers_for(request.url)
url = request.url
headers = request.headers
data = request.body
if ensure_boolean(
os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '')
):
# This is currently an "experimental" feature which provides
# no guarantees of backwards compatibility. It may be subject
# to change or removal in any patch version. Anyone opting in
# to this feature should strictly pin botocore.
host = urlparse(request.url).hostname
proxy_headers['host'] = host
headers_ = CIMultiDict(
(z[0], _text(z[1], encoding='utf-8')) for z in headers.items()
)
# https://github.com/boto/botocore/issues/1255
headers_['Accept-Encoding'] = 'identity'
chunked = None
if headers_.get('Transfer-Encoding', '').lower() == 'chunked':
# aiohttp wants chunking as a param, and not a header
headers_.pop('Transfer-Encoding', '')
chunked = True
if isinstance(data, io.IOBase):
data = _IOBaseWrapper(data)
url = URL(url, encoded=True)
> response = await self._session.request(
request.method,
url=url,
chunked=chunked,
headers=headers_,
data=data,
proxy=proxy_url,
proxy_headers=proxy_headers,
)
aiobotocore/httpsession.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/site-packages/aiohttp/client.py:536: in _request
conn = await self._connector.connect(
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:540: in connect
proto = await self._create_connection(req, traces, timeout)
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:899: in _create_connection
_, proto = await self._create_proxy_connection(req, traces, timeout)
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:1231: in _create_proxy_connection
transport, proto = await self._create_direct_connection(
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:1206: in _create_direct_connection
raise last_exc
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:1175: in _create_direct_connection
transp, proto = await self._wrap_create_connection(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.connector.TCPConnector object at 0x7fc82934c550>, req = <aiohttp.client_reqrep.ClientRequest object at 0x7fc82936a670>
timeout = ClientTimeout(total=None, connect=None, sock_read=1, sock_connect=1), client_error = <class 'aiohttp.client_exceptions.ClientProxyConnectionError'>
args = (functools.partial(<class 'aiohttp.client_proto.ResponseHandler'>, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 54321)
kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...}
async def _wrap_create_connection(
self,
*args: Any,
req: "ClientRequest",
timeout: "ClientTimeout",
client_error: Type[Exception] = ClientConnectorError,
**kwargs: Any,
) -> Tuple[asyncio.Transport, ResponseHandler]:
try:
async with ceil_timeout(timeout.sock_connect):
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
except cert_errors as exc:
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
except ssl_errors as exc:
raise ClientConnectorSSLError(req.connection_key, exc) from exc
except OSError as exc:
if exc.errno is None and isinstance(exc, asyncio.TimeoutError):
raise
> raise client_error(req.connection_key, exc) from exc
E aiohttp.client_exceptions.ClientProxyConnectionError: Cannot connect to host 127.0.0.1:54321 ssl:default [Connect call failed ('127.0.0.1', 54321)]
/usr/lib64/python3.8/site-packages/aiohttp/connector.py:988: ClientProxyConnectionError
During handling of the above exception, another exception occurred:
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, request = <SubRequest 's3_client' for <Function test_succeed_proxy_request[False]>>
kwargs = {'config': <aiobotocore.config.AioConfig object at 0x7fc829392070>, 'mocking_test': False, 'patch_attributes': None, 'region': 'us-east-1', ...}
func = <function s3_client at 0x7fc82de8f3a0>, setup = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.setup at 0x7fc82935bdc0>
finalizer = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer at 0x7fc82935be50>
@functools.wraps(fixture)
def _asyncgen_fixture_wrapper(
event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
):
func = _perhaps_rebind_fixture_func(
fixture, request.instance, fixturedef.unittest
)
gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request))
async def setup():
res = await gen_obj.__anext__()
return res
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
event_loop.run_until_complete(async_finalizer())
> result = event_loop.run_until_complete(setup())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:298:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:280: in setup
res = await gen_obj.__anext__()
tests/conftest.py:241: in s3_client
async with session.create_client(
aiobotocore/session.py:27: in __aenter__
self._client = await self._coro
aiobotocore/session.py:173: in _create_client
credentials = await self.get_credentials()
aiobotocore/session.py:83: in get_credentials
self._credentials = await (
aiobotocore/credentials.py:957: in load_credentials
creds = await provider.load()
aiobotocore/credentials.py:543: in load
metadata = await fetcher.retrieve_iam_role_credentials()
aiobotocore/utils.py:212: in retrieve_iam_role_credentials
token = await self._fetch_metadata_token()
aiobotocore/utils.py:114: in _fetch_metadata_token
response = await session.send(request.prepare())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiobotocore.utils._RefCountedSession object at 0x7fc82933d1f0>
request = <AWSPreparedRequest stream_output=False, method=PUT, url=http://169.254.169.254/latest/api/token, headers={'x-aws-ec2-...t': 'Botocore/1.29.160 Python/3.8.17 Linux/6.3.0-0.rc5.20230407gitf2afccfefe7b.46.fc39.x86_64', 'Content-Length': '0'}>
async def send(self, request):
try:
proxy_url = self._proxy_config.proxy_url_for(request.url)
proxy_headers = self._proxy_config.proxy_headers_for(request.url)
url = request.url
headers = request.headers
data = request.body
if ensure_boolean(
os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '')
):
# This is currently an "experimental" feature which provides
# no guarantees of backwards compatibility. It may be subject
# to change or removal in any patch version. Anyone opting in
# to this feature should strictly pin botocore.
host = urlparse(request.url).hostname
proxy_headers['host'] = host
headers_ = CIMultiDict(
(z[0], _text(z[1], encoding='utf-8')) for z in headers.items()
)
# https://github.com/boto/botocore/issues/1255
headers_['Accept-Encoding'] = 'identity'
chunked = None
if headers_.get('Transfer-Encoding', '').lower() == 'chunked':
# aiohttp wants chunking as a param, and not a header
headers_.pop('Transfer-Encoding', '')
chunked = True
if isinstance(data, io.IOBase):
data = _IOBaseWrapper(data)
url = URL(url, encoded=True)
response = await self._session.request(
request.method,
url=url,
chunked=chunked,
headers=headers_,
data=data,
proxy=proxy_url,
proxy_headers=proxy_headers,
)
http_response = aiobotocore.awsrequest.AioAWSResponse(
str(response.url), response.status, response.headers, response
)
if not request.stream_output:
# Cause the raw stream to be exhausted immediately. We do it
# this way instead of using preload_content because
# preload_content will never buffer chunked responses
await http_response.content
return http_response
except ClientSSLError as e:
raise SSLError(endpoint_url=request.url, error=e)
except (ClientProxyConnectionError, ClientHttpProxyError) as e:
> raise ProxyConnectionError(
proxy_url=mask_proxy_url(proxy_url), error=e
)
E botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://127.0.0.1:54321"
aiobotocore/httpsession.py:232: ProxyConnectionError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:17] "GET /static HTTP/1.1" 404 -
____________________________________________________________________ ERROR at setup of test_unicode_key_put_list[False] _____________________________________________________________________
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, request = <SubRequest 'bucket_name' for <Function test_unicode_key_put_list[False]>>
kwargs = {'create_bucket': <function create_bucket.<locals>._f at 0x7fc829c5cb80>, 'region': 'us-east-1'}, func = <function bucket_name at 0x7fc82de8d1f0>
setup = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.setup at 0x7fc829c5ce50>
finalizer = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer at 0x7fc829c5ca60>
@functools.wraps(fixture)
def _asyncgen_fixture_wrapper(
event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
):
func = _perhaps_rebind_fixture_func(
fixture, request.instance, fixturedef.unittest
)
gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request))
async def setup():
res = await gen_obj.__anext__()
return res
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
event_loop.run_until_complete(async_finalizer())
> result = event_loop.run_until_complete(setup())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:298:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:280: in setup
res = await gen_obj.__anext__()
tests/conftest.py:384: in bucket_name
name = await create_bucket(region)
tests/conftest.py:408: in _f
response = await s3_client.create_bucket(**bucket_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.HmacV1Auth object at 0x7fc829c629a0>, request = <botocore.awsrequest.AWSRequest object at 0x7fc829c62130>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:828: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:35] "GET /static HTTP/1.1" 404 -
___________________________________________________________________ ERROR at teardown of test_unicode_key_put_list[False] ___________________________________________________________________
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
> event_loop.run_until_complete(async_finalizer())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:296:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:288: in async_finalizer
await gen_obj.__anext__()
tests/conftest.py:418: in create_bucket
await recursive_delete(s3_client, _bucket_name)
tests/conftest.py:365: in recursive_delete
async for n in paginator.paginate(Bucket=bucket_name, Prefix=''):
aiobotocore/paginate.py:30: in __anext__
response = await self._make_request(current_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.HmacV1Auth object at 0x7fc829a09a00>, request = <botocore.awsrequest.AWSRequest object at 0x7fc829a09730>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:828: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:35] "GET /static HTTP/1.1" 404 -
__________________________________________________________________ ERROR at setup of test_unicode_system_character[False] ___________________________________________________________________
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, request = <SubRequest 'bucket_name' for <Function test_unicode_system_character[False]>>
kwargs = {'create_bucket': <function create_bucket.<locals>._f at 0x7fc82b34daf0>, 'region': 'us-east-1'}, func = <function bucket_name at 0x7fc82de8d1f0>
setup = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.setup at 0x7fc82b34d310>
finalizer = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer at 0x7fc82b34d3a0>
@functools.wraps(fixture)
def _asyncgen_fixture_wrapper(
event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
):
func = _perhaps_rebind_fixture_func(
fixture, request.instance, fixturedef.unittest
)
gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request))
async def setup():
res = await gen_obj.__anext__()
return res
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
event_loop.run_until_complete(async_finalizer())
> result = event_loop.run_until_complete(setup())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:298:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:280: in setup
res = await gen_obj.__anext__()
tests/conftest.py:384: in bucket_name
name = await create_bucket(region)
tests/conftest.py:408: in _f
response = await s3_client.create_bucket(**bucket_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.HmacV1Auth object at 0x7fc82c773370>, request = <botocore.awsrequest.AWSRequest object at 0x7fc82c773f40>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:828: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:39] "GET /static HTTP/1.1" 404 -
_________________________________________________________________ ERROR at teardown of test_unicode_system_character[False] _________________________________________________________________
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
> event_loop.run_until_complete(async_finalizer())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:296:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:288: in async_finalizer
await gen_obj.__anext__()
tests/conftest.py:418: in create_bucket
await recursive_delete(s3_client, _bucket_name)
tests/conftest.py:365: in recursive_delete
async for n in paginator.paginate(Bucket=bucket_name, Prefix=''):
aiobotocore/paginate.py:30: in __anext__
response = await self._make_request(current_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.HmacV1Auth object at 0x7fc82a6ade80>, request = <botocore.awsrequest.AWSRequest object at 0x7fc82b75de50>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:828: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:39] "GET /static HTTP/1.1" 404 -
___________________________________________________ ERROR at setup of test_presign_with_existing_query_string_values[False-s3-us-east-1] ____________________________________________________
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
request = <SubRequest 'bucket_name' for <Function test_presign_with_existing_query_string_values[False-s3-us-east-1]>>
kwargs = {'create_bucket': <function create_bucket.<locals>._f at 0x7fc82b76df70>, 'region': 'us-east-1'}, func = <function bucket_name at 0x7fc82de8d1f0>
setup = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.setup at 0x7fc82b76d550>
finalizer = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer at 0x7fc82b5f7040>
@functools.wraps(fixture)
def _asyncgen_fixture_wrapper(
event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
):
func = _perhaps_rebind_fixture_func(
fixture, request.instance, fixturedef.unittest
)
gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request))
async def setup():
res = await gen_obj.__anext__()
return res
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
event_loop.run_until_complete(async_finalizer())
> result = event_loop.run_until_complete(setup())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:298:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:280: in setup
res = await gen_obj.__anext__()
tests/conftest.py:384: in bucket_name
name = await create_bucket(region)
tests/conftest.py:408: in _f
response = await s3_client.create_bucket(**bucket_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.HmacV1Auth object at 0x7fc829c1e4c0>, request = <botocore.awsrequest.AWSRequest object at 0x7fc829c1e790>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:828: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:49] "GET /static HTTP/1.1" 404 -
__________________________________________________ ERROR at teardown of test_presign_with_existing_query_string_values[False-s3-us-east-1] __________________________________________________
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
> event_loop.run_until_complete(async_finalizer())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:296:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:288: in async_finalizer
await gen_obj.__anext__()
tests/conftest.py:418: in create_bucket
await recursive_delete(s3_client, _bucket_name)
tests/conftest.py:365: in recursive_delete
async for n in paginator.paginate(Bucket=bucket_name, Prefix=''):
aiobotocore/paginate.py:30: in __anext__
response = await self._make_request(current_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.HmacV1Auth object at 0x7fc82a343070>, request = <botocore.awsrequest.AWSRequest object at 0x7fc82a343d00>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:828: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:49] "GET /static HTTP/1.1" 404 -
________________________________________________________________ ERROR at setup of test_presign_sigv4[False-s3v4-us-east-1] _________________________________________________________________
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, request = <SubRequest 'bucket_name' for <Function test_presign_sigv4[False-s3v4-us-east-1]>>
kwargs = {'create_bucket': <function create_bucket.<locals>._f at 0x7fc82b790790>, 'region': 'us-east-1'}, func = <function bucket_name at 0x7fc82de8d1f0>
setup = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.setup at 0x7fc82b7900d0>
finalizer = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer at 0x7fc82b790940>
@functools.wraps(fixture)
def _asyncgen_fixture_wrapper(
event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
):
func = _perhaps_rebind_fixture_func(
fixture, request.instance, fixturedef.unittest
)
gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request))
async def setup():
res = await gen_obj.__anext__()
return res
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
event_loop.run_until_complete(async_finalizer())
> result = event_loop.run_until_complete(setup())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:298:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:280: in setup
res = await gen_obj.__anext__()
tests/conftest.py:384: in bucket_name
name = await create_bucket(region)
tests/conftest.py:408: in _f
response = await s3_client.create_bucket(**bucket_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.S3SigV4Auth object at 0x7fc82aa68cd0>, request = <botocore.awsrequest.AWSRequest object at 0x7fc82aa68c40>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError()
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:418: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:53] "GET /static HTTP/1.1" 404 -
_______________________________________________________________ ERROR at teardown of test_presign_sigv4[False-s3v4-us-east-1] _______________________________________________________________
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
> event_loop.run_until_complete(async_finalizer())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:296:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:288: in async_finalizer
await gen_obj.__anext__()
tests/conftest.py:418: in create_bucket
await recursive_delete(s3_client, _bucket_name)
tests/conftest.py:365: in recursive_delete
async for n in paginator.paginate(Bucket=bucket_name, Prefix=''):
aiobotocore/paginate.py:30: in __anext__
response = await self._make_request(current_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.S3SigV4Auth object at 0x7fc82b42dbb0>, request = <botocore.awsrequest.AWSRequest object at 0x7fc82b42dd90>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError()
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:418: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:53] "GET /static HTTP/1.1" 404 -
_____________________________________________________________ ERROR at setup of test_can_follow_signed_url_redirect[False-s3v4] _____________________________________________________________
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, request = <SubRequest 'bucket_name' for <Function test_can_follow_signed_url_redirect[False-s3v4]>>
kwargs = {'create_bucket': <function create_bucket.<locals>._f at 0x7fc8294f89d0>, 'region': 'us-east-1'}, func = <function bucket_name at 0x7fc82de8d1f0>
setup = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.setup at 0x7fc8294f8af0>
finalizer = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer at 0x7fc8294f8b80>
@functools.wraps(fixture)
def _asyncgen_fixture_wrapper(
event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
):
func = _perhaps_rebind_fixture_func(
fixture, request.instance, fixturedef.unittest
)
gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request))
async def setup():
res = await gen_obj.__anext__()
return res
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
event_loop.run_until_complete(async_finalizer())
> result = event_loop.run_until_complete(setup())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:298:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:280: in setup
res = await gen_obj.__anext__()
tests/conftest.py:384: in bucket_name
name = await create_bucket(region)
tests/conftest.py:408: in _f
response = await s3_client.create_bucket(**bucket_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.S3SigV4Auth object at 0x7fc829c37a90>, request = <botocore.awsrequest.AWSRequest object at 0x7fc829c37310>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError()
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:418: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:56] "GET /static HTTP/1.1" 404 -
___________________________________________________________ ERROR at teardown of test_can_follow_signed_url_redirect[False-s3v4] ____________________________________________________________
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
> event_loop.run_until_complete(async_finalizer())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:296:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:288: in async_finalizer
await gen_obj.__anext__()
tests/conftest.py:418: in create_bucket
await recursive_delete(s3_client, _bucket_name)
tests/conftest.py:365: in recursive_delete
async for n in paginator.paginate(Bucket=bucket_name, Prefix=''):
aiobotocore/paginate.py:30: in __anext__
response = await self._make_request(current_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.S3SigV4Auth object at 0x7fc82c749eb0>, request = <botocore.awsrequest.AWSRequest object at 0x7fc82c749850>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError()
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:418: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:54:56] "GET /static HTTP/1.1" 404 -
___________________________________________________________ ERROR at teardown of test_bucket_redirect[False-us-west-2-eu-west-1] ____________________________________________________________
def finalizer() -> None:
"""Yield again, to finalize."""
async def async_finalizer() -> None:
try:
await gen_obj.__anext__()
except StopAsyncIteration:
pass
else:
msg = "Async generator fixture didn't stop."
msg += "Yield only once."
raise ValueError(msg)
> event_loop.run_until_complete(async_finalizer())
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:296:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:288: in async_finalizer
await gen_obj.__anext__()
tests/conftest.py:418: in create_bucket
await recursive_delete(s3_client, _bucket_name)
tests/conftest.py:365: in recursive_delete
async for n in paginator.paginate(Bucket=bucket_name, Prefix=''):
aiobotocore/paginate.py:30: in __anext__
response = await self._make_request(current_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.HmacV1Auth object at 0x7fc82b9ab520>, request = <botocore.awsrequest.AWSRequest object at 0x7fc82b9ab940>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:828: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:01] "GET /static HTTP/1.1" 404 -
_________________________________________________________________ ERROR at setup of test_load_sso_credentials_without_cache _________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.5.1/tests/boto_tests/test_credentials.py, line 1256
def test_load_sso_credentials_without_cache(self):
E fixture 'self' not found
> available fixtures: aa_fail_proxy_config, aa_succeed_proxy_config, aio_session, alternative_region, alternative_s3_client, assume_role_setup, assumerolecredprovider_config_loader, base_assume_role_test_setup, base_env_var_setup, batch_client, batch_server, bucket_name, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, cloudformation_client, cloudformation_server, config, create_bucket, create_multipart_upload, create_object, create_table, create_topic, credential_provider, debug, doctest_namespace, dynamodb2_server, dynamodb_client, dynamodb_put_item, ec2_client, ec2_server, event_loop, exit_stack, iam_client, iam_server, kinesis_client, kinesis_server, lambda_client, lambda_server, mock_session, mocking_test, monkeypatch, patch_attributes, profile_config, pytestconfig, rds_client, rds_server, record_property, record_testsuite_property, record_xml_attribute, recwarn, region, s3_client, s3_server, s3_verify, server_scheme, session, signature_version, sns_client, sns_server, sqs_client, sqs_queue_url, sqs_server, ssl_credential_fetcher_setup, sso_provider_setup, table_name, tempdir, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, topic_arn, unused_tcp_port, unused_tcp_port_factory, unused_udp_port, unused_udp_port_factory
> use 'pytest --fixtures [testpath]' for help on them.
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.5.1/tests/boto_tests/test_credentials.py:1256
========================================================================================= FAILURES ==========================================================================================
______________________________________________________________________ test_bucket_redirect[False-us-west-2-eu-west-1] ______________________________________________________________________
s3_client = <aiobotocore.client.S3 object at 0x7fc829318970>, alternative_s3_client = <aiobotocore.client.S3 object at 0x7fc82a4daeb0>, region = 'eu-west-1'
create_bucket = <function create_bucket.<locals>._f at 0x7fc82c320310>
@pytest.mark.parametrize('region', ['eu-west-1'])
@pytest.mark.parametrize('alternative_region', ['us-west-2'])
@pytest.mark.parametrize('mocking_test', [False])
@pytest.mark.asyncio
async def test_bucket_redirect(
s3_client, alternative_s3_client, region, create_bucket
):
key = 'foobarbaz'
# create bucket in alternative region
> bucket_name = await create_bucket(region)
tests/test_basic_s3.py:607:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:408: in _f
response = await s3_client.create_bucket(**bucket_kwargs)
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:96: in _send_request
request = await self.create_request(request_dict, operation_model)
aiobotocore/endpoint.py:84: in create_request
await self._event_emitter.emit(
aiobotocore/hooks.py:66: in _emit
response = await resolve_awaitable(handler(**kwargs))
aiobotocore/_helpers.py:15: in resolve_awaitable
return await obj
aiobotocore/signers.py:24: in handler
return await self.sign(operation_name, request)
aiobotocore/signers.py:82: in sign
auth.add_auth(request)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.auth.HmacV1Auth object at 0x7fc82a072d00>, request = <botocore.awsrequest.AWSRequest object at 0x7fc82a072a30>
def add_auth(self, request):
if self.credentials is None:
> raise NoCredentialsError
E botocore.exceptions.NoCredentialsError: Unable to locate credentials
/usr/lib/python3.8/site-packages/botocore/auth.py:828: NoCredentialsError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:01] "GET /static HTTP/1.1" 404 -
______________________________________________________________________________________ test_run_lambda ______________________________________________________________________________________
iam_client = <aiobotocore.client.IAM object at 0x7fc82a5f1ac0>, lambda_client = <aiobotocore.client.Lambda object at 0x7fc8292cab80>
aws_lambda_zip = b'PK\x03\x04\x14\x00\x00\x00\x08\x00\xee6\xdcV*\x12\x1c6c\x00\x00\x00p\x00\x00\x00\x12\x00\x00\x00lambda_function.py%\...0\x01\x00\x00\x00\x00lambda_function.pyPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00@\x00\x00\x00\x93\x00\x00\x00\x00\x00'
@pytest.mark.moto
@pytest.mark.asyncio
async def test_run_lambda(iam_client, lambda_client, aws_lambda_zip):
role_arn = await _get_role_arn(iam_client, 'test-iam-role')
> lambda_response = await lambda_client.create_function(
FunctionName='test-function',
Runtime='python3.8',
Role=role_arn,
Handler='lambda_function.lambda_handler',
Timeout=10,
MemorySize=128,
Publish=True,
Code={'ZipFile': aws_lambda_zip},
)
tests/test_lambda.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiobotocore.client.Lambda object at 0x7fc8292cab80>, operation_name = 'CreateFunction'
api_params = {'Code': {'ZipFile': b'PK\x03\x04\x14\x00\x00\x00\x08\x00\xee6\xdcV*\x12\x1c6c\x00\x00\x00p\x00\x00\x00\x12\x00\x00\x0...00\x00\x00\x00'}, 'FunctionName': 'test-function', 'Handler': 'lambda_function.lambda_handler', 'MemorySize': 128, ...}
async def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record(
'API_CALL',
{
'service': service_name,
'operation': operation_name,
'params': api_params,
},
)
if operation_model.deprecated:
logger.debug(
'Warning: %s.%s() is deprecated', service_name, operation_name
)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
api_params = await self._emit_api_params(
api_params=api_params,
operation_model=operation_model,
context=request_context,
)
# fmt: off
endpoint_url, additional_headers = await self._resolve_endpoint_ruleset(
operation_model, api_params, request_context
)
# fmt: on
request_dict = await self._convert_to_request_dict(
api_params=api_params,
operation_model=operation_model,
endpoint_url=endpoint_url,
context=request_context,
headers=additional_headers,
)
resolve_checksum_context(request_dict, operation_model, api_params)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = await self.meta.events.emit_until_response(
'before-call.{service_id}.{operation_name}'.format(
service_id=service_id, operation_name=operation_name
),
model=operation_model,
params=request_dict,
request_signer=self._request_signer,
context=request_context,
)
if event_response is not None:
http, parsed_response = event_response
else:
apply_request_checksum(request_dict)
http, parsed_response = await self._make_request(
operation_model, request_dict, request_context
)
await self.meta.events.emit(
'after-call.{service_id}.{operation_name}'.format(
service_id=service_id, operation_name=operation_name
),
http_response=http,
parsed=parsed_response,
model=operation_model,
context=request_context,
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (500) when calling the CreateFunction operation (reached max retries: 4): <!doctype html>
E <html lang=en>
E <title>500 Internal Server Error</title>
E <h1>Internal Server Error</h1>
E <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
aiobotocore/client.py:378: ClientError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:27] "GET /static HTTP/1.1" 404 -
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:28] "GET /static HTTP/1.1" 500 -
ERROR werkzeug:_internal.py:187 Error on request:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 364, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 325, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 238, in __call__
backend_app = self.get_application(environ)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 180, in get_application
app = self.create_app(backend)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 260, in create_backend_app
backend_dict = backends.get_backend(service)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 48, in get_backend
return _import_backend(module_name, backends_name)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 18, in _import_backend
module = importlib.import_module("moto." + module_name)
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3.8/site-packages/moto/awslambda/__init__.py", line 1, in <module>
from .models import lambda_backends
File "/usr/lib/python3.8/site-packages/moto/awslambda/models.py", line 10, in <module>
import docker
ModuleNotFoundError: No module named 'docker'
------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:28] "POST / HTTP/1.1" 404 -
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:28] "POST / HTTP/1.1" 200 -
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:28] "POST /2015-03-31/functions HTTP/1.1" 500 -
ERROR werkzeug:_internal.py:187 Error on request:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 364, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 325, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 238, in __call__
backend_app = self.get_application(environ)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 180, in get_application
app = self.create_app(backend)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 260, in create_backend_app
backend_dict = backends.get_backend(service)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 48, in get_backend
return _import_backend(module_name, backends_name)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 18, in _import_backend
module = importlib.import_module("moto." + module_name)
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3.8/site-packages/moto/awslambda/__init__.py", line 1, in <module>
from .models import lambda_backends
File "/usr/lib/python3.8/site-packages/moto/awslambda/models.py", line 10, in <module>
import docker
ModuleNotFoundError: No module named 'docker'
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:28] "POST /2015-03-31/functions HTTP/1.1" 500 -
ERROR werkzeug:_internal.py:187 Error on request:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 364, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 325, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 238, in __call__
backend_app = self.get_application(environ)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 180, in get_application
app = self.create_app(backend)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 260, in create_backend_app
backend_dict = backends.get_backend(service)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 48, in get_backend
return _import_backend(module_name, backends_name)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 18, in _import_backend
module = importlib.import_module("moto." + module_name)
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3.8/site-packages/moto/awslambda/__init__.py", line 1, in <module>
from .models import lambda_backends
File "/usr/lib/python3.8/site-packages/moto/awslambda/models.py", line 10, in <module>
import docker
ModuleNotFoundError: No module named 'docker'
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:29] "POST /2015-03-31/functions HTTP/1.1" 500 -
ERROR werkzeug:_internal.py:187 Error on request:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 364, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 325, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 238, in __call__
backend_app = self.get_application(environ)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 180, in get_application
app = self.create_app(backend)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 260, in create_backend_app
backend_dict = backends.get_backend(service)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 48, in get_backend
return _import_backend(module_name, backends_name)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 18, in _import_backend
module = importlib.import_module("moto." + module_name)
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3.8/site-packages/moto/awslambda/__init__.py", line 1, in <module>
from .models import lambda_backends
File "/usr/lib/python3.8/site-packages/moto/awslambda/models.py", line 10, in <module>
import docker
ModuleNotFoundError: No module named 'docker'
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:33] "POST /2015-03-31/functions HTTP/1.1" 500 -
ERROR werkzeug:_internal.py:187 Error on request:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 364, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 325, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 238, in __call__
backend_app = self.get_application(environ)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 180, in get_application
app = self.create_app(backend)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 260, in create_backend_app
backend_dict = backends.get_backend(service)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 48, in get_backend
return _import_backend(module_name, backends_name)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 18, in _import_backend
module = importlib.import_module("moto." + module_name)
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3.8/site-packages/moto/awslambda/__init__.py", line 1, in <module>
from .models import lambda_backends
File "/usr/lib/python3.8/site-packages/moto/awslambda/models.py", line 10, in <module>
import docker
ModuleNotFoundError: No module named 'docker'
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:35] "POST /2015-03-31/functions HTTP/1.1" 500 -
ERROR werkzeug:_internal.py:187 Error on request:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 364, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 325, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 238, in __call__
backend_app = self.get_application(environ)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 180, in get_application
app = self.create_app(backend)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 260, in create_backend_app
backend_dict = backends.get_backend(service)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 48, in get_backend
return _import_backend(module_name, backends_name)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 18, in _import_backend
module = importlib.import_module("moto." + module_name)
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3.8/site-packages/moto/awslambda/__init__.py", line 1, in <module>
from .models import lambda_backends
File "/usr/lib/python3.8/site-packages/moto/awslambda/models.py", line 10, in <module>
import docker
ModuleNotFoundError: No module named 'docker'
_______________________________________________________________________________________ test_patches ________________________________________________________________________________________
@pytest.mark.moto
def test_patches():
print(
"Botocore version: {} aiohttp version: {}".format(
botocore.__version__, aiohttp.__version__
)
)
success = True
for obj, digests in chain(_AIOHTTP_DIGESTS.items(), _API_DIGESTS.items()):
try:
source = getsource(obj)
except TypeError:
obj = obj.fget
source = getsource(obj)
digest = hashlib.sha1(source.encode('utf-8')).hexdigest()
if digest not in digests:
print(
"Digest of {}:{} not found in: {}".format(
obj.__qualname__, digest, digests
)
)
success = False
> assert success
E assert False
tests/test_patches.py:700: AssertionError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Botocore version: 1.29.160 aiohttp version: 3.8.4
Digest of ClientResponse:c90cebb80bc00996340845bec4aa3ffa9b179389 not found in: {'e178726065b609c69a1c02e8bb78f22efce90792', '225e8033bfcff8cccbc2e975d7bd0c7993f14366'}
_________________________________________________________________________________________ test_sqs __________________________________________________________________________________________
self = <aiobotocore.parsers.AioQueryParser object at 0x7fc8282205e0>
xml_string = b'<!doctype html>\n<html lang=en>\n<title>500 Internal Server Error</title>\n<h1>Internal Server Error</h1>\n<p>The se...nd was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\n'
def _parse_xml_string_to_dom(self, xml_string):
try:
parser = ETree.XMLParser(
target=ETree.TreeBuilder(), encoding=self.DEFAULT_ENCODING
)
> parser.feed(xml_string)
E xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
/usr/lib/python3.8/site-packages/botocore/parsers.py:503: ParseError
During handling of the above exception, another exception occurred:
cloudformation_client = <aiobotocore.client.CloudFormation object at 0x7fc82c4fad00>
@pytest.mark.moto
@pytest.mark.asyncio
async def test_sqs(cloudformation_client):
cloudformation_template = """{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"queue1": {
"Type": "AWS::SQS::Queue",
"Properties": {
"QueueName": "my-queue"
}
}
}
}"""
# Create stack
> resp = await cloudformation_client.create_stack(
StackName='my-stack', TemplateBody=cloudformation_template
)
tests/test_waiter.py:20:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiobotocore/client.py:361: in _make_api_call
http, parsed_response = await self._make_request(
aiobotocore/client.py:386: in _make_request
return await self._endpoint.make_request(
aiobotocore/endpoint.py:97: in _send_request
success_response, exception = await self._get_response(
aiobotocore/endpoint.py:139: in _get_response
success_response, exception = await self._do_get_response(
aiobotocore/endpoint.py:215: in _do_get_response
parsed_response = parser.parse(
/usr/lib/python3.8/site-packages/botocore/parsers.py:250: in parse
parsed = self._do_error_parse(response, shape)
/usr/lib/python3.8/site-packages/botocore/parsers.py:557: in _do_error_parse
root = self._parse_xml_string_to_dom(xml_contents)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiobotocore.parsers.AioQueryParser object at 0x7fc8282205e0>
xml_string = b'<!doctype html>\n<html lang=en>\n<title>500 Internal Server Error</title>\n<h1>Internal Server Error</h1>\n<p>The se...nd was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\n'
def _parse_xml_string_to_dom(self, xml_string):
try:
parser = ETree.XMLParser(
target=ETree.TreeBuilder(), encoding=self.DEFAULT_ENCODING
)
parser.feed(xml_string)
root = parser.close()
except XMLParseError as e:
> raise ResponseParserError(
"Unable to parse response (%s), "
"invalid XML received. Further retries may succeed:\n%s"
% (e, xml_string)
)
E botocore.parsers.ResponseParserError: Unable to parse response (syntax error: line 1, column 0), invalid XML received. Further retries may succeed:
E b'<!doctype html>\n<html lang=en>\n<title>500 Internal Server Error</title>\n<h1>Internal Server Error</h1>\n<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\n'
/usr/lib/python3.8/site-packages/botocore/parsers.py:506: ResponseParserError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:55] "GET /static HTTP/1.1" 500 -
ERROR werkzeug:_internal.py:187 Error on request:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 364, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3.8/site-packages/werkzeug/serving.py", line 325, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 238, in __call__
backend_app = self.get_application(environ)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 180, in get_application
app = self.create_app(backend)
File "/usr/lib/python3.8/site-packages/moto/moto_server/werkzeug_app.py", line 260, in create_backend_app
backend_dict = backends.get_backend(service)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 48, in get_backend
return _import_backend(module_name, backends_name)
File "/usr/lib/python3.8/site-packages/moto/backends.py", line 18, in _import_backend
module = importlib.import_module("moto." + module_name)
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3.8/site-packages/moto/cloudformation/__init__.py", line 1, in <module>
from .models import cloudformation_backends
File "/usr/lib/python3.8/site-packages/moto/cloudformation/models.py", line 19, in <module>
from .custom_model import CustomModel
File "/usr/lib/python3.8/site-packages/moto/cloudformation/custom_model.py", line 7, in <module>
from moto.awslambda import lambda_backends
File "/usr/lib/python3.8/site-packages/moto/awslambda/__init__.py", line 1, in <module>
from .models import lambda_backends
File "/usr/lib/python3.8/site-packages/moto/awslambda/models.py", line 10, in <module>
import docker
ModuleNotFoundError: No module named 'docker'
------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:187 127.0.0.1 - - [28/Jun/2023 06:55:55] "POST / HTTP/1.1" 500 -
______________________________________________________________________________ test_kinesis_stream_json_parser ______________________________________________________________________________
exit_stack = <contextlib.AsyncExitStack object at 0x7fc82afce5b0>
@pytest.mark.asyncio
async def test_kinesis_stream_json_parser(exit_stack: AsyncExitStack):
# unfortunately moto doesn't support kinesis register_stream_consumer +
# subscribe_to_shard yet
stream_name = "my_stream"
stream_arn = consumer_arn = None
consumer_name = 'consumer'
session = aiobotocore.session.AioSession()
> kinesis_client = await exit_stack.enter_async_context(
session.create_client('kinesis')
)
tests/python3.8/test_eventstreams.py:19:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/contextlib.py:568: in enter_async_context
result = await _cm_type.__aenter__(cm)
aiobotocore/session.py:27: in __aenter__
self._client = await self._coro
aiobotocore/session.py:198: in _create_client
client = await client_creator.create_client(
aiobotocore/client.py:75: in create_client
client_args = self._get_client_args(
aiobotocore/client.py:265: in _get_client_args
return args_creator.get_client_args(
aiobotocore/args.py:31: in get_client_args
final_args = self.compute_client_args(
/usr/lib/python3.8/site-packages/botocore/args.py:205: in compute_client_args
endpoint_config = self._compute_endpoint_config(
/usr/lib/python3.8/site-packages/botocore/args.py:313: in _compute_endpoint_config
return self._resolve_endpoint(**resolve_endpoint_kwargs)
/usr/lib/python3.8/site-packages/botocore/args.py:418: in _resolve_endpoint
return endpoint_bridge.resolve(
/usr/lib/python3.8/site-packages/botocore/client.py:590: in resolve
resolved = self.endpoint_resolver.construct_endpoint(
/usr/lib/python3.8/site-packages/botocore/regions.py:229: in construct_endpoint
result = self._endpoint_for_partition(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.regions.EndpointResolver object at 0x7fc8293289d0>
partition = OrderedDict([('defaults', OrderedDict([('hostname', '{service}.{region}.{dnsSuffix}'), ('protocols', ['https']), ('sig...ict([('variants', [OrderedDict([('hostname', 'xray-fips.us-west-2.amazonaws.com'), ('tags', ['fips'])])])]))]))]))]))])
service_name = 'kinesis', region_name = None, use_dualstack_endpoint = None, use_fips_endpoint = None, force_partition = False
def _endpoint_for_partition(
self,
partition,
service_name,
region_name,
use_dualstack_endpoint,
use_fips_endpoint,
force_partition=False,
):
partition_name = partition["partition"]
if (
use_dualstack_endpoint
and partition_name in self._UNSUPPORTED_DUALSTACK_PARTITIONS
):
error_msg = (
"Dualstack endpoints are currently not supported"
" for %s partition" % partition_name
)
raise EndpointVariantError(tags=['dualstack'], error_msg=error_msg)
# Get the service from the partition, or an empty template.
service_data = partition['services'].get(
service_name, DEFAULT_SERVICE_DATA
)
# Use the partition endpoint if no region is supplied.
if region_name is None:
if 'partitionEndpoint' in service_data:
region_name = service_data['partitionEndpoint']
else:
> raise NoRegionError()
E botocore.exceptions.NoRegionError: You must specify a region.
/usr/lib/python3.8/site-packages/botocore/regions.py:277: NoRegionError
===================================================================================== warnings summary ======================================================================================
tests/conftest.py:25
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.5.1/tests/conftest.py:25: PytestRemovedIn8Warning: The pytest_cmdline_preparse hook is deprecated and will be removed in a future release.
Please use pytest_load_initial_conftests hook instead.
def pytest_cmdline_preparse(args):
tests/test_basic_s3.py: 59 warnings
tests/test_batch.py: 2 warnings
tests/test_dynamodb.py: 12 warnings
tests/test_ec2.py: 1 warning
tests/test_eventstreams.py: 4 warnings
tests/test_lambda.py: 4 warnings
tests/test_monitor.py: 1 warning
tests/test_sns.py: 9 warnings
tests/test_sqs.py: 7 warnings
tests/test_waiter.py: 2 warnings
tests/boto_tests/test_signers.py: 2 warnings
/usr/lib64/python3.8/site-packages/aiohttp/client.py:1141: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._resp = await self._coro
tests/test_basic_s3.py::test_can_make_request_no_verify[False]
tests/test_basic_s3.py::test_put_object_sha256[False-https]
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.5.1/aiobotocore/httpsession.py:111: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._create_connector = lambda: aiohttp.TCPConnector(
tests/test_basic_s3.py::test_put_object_sha256[False-https]
/usr/lib/python3.8/site-packages/werkzeug/datastructures/headers.py:297: DeprecationWarning: Passing bytes as a header value is deprecated and will not be supported in Werkzeug 3.0.
_value = _str_header_value(_value)
tests/test_config.py::test_connector_args
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.5.1/tests/test_config.py:52: DeprecationWarning: The object should be created within an async function
AioConfig({"resolver": aiohttp.resolver.DefaultResolver()})
tests/test_version.py::test_release_versions
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.5.1/tests/test_version.py:35: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
settings = docutils.frontend.OptionParser(
tests/test_version.py: 68 warnings
/usr/lib64/python3.8/optparse.py:1000: DeprecationWarning: The frontend.Option class will be removed in Docutils 0.21 or later.
option = self.option_class(*args, **kwargs)
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.5.1/tests/boto_tests/test_utils.py:27: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
class FakeAioHttpSession:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.5.1/tests/boto_tests/test_utils.py:27: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
class FakeAioHttpSession:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser
/usr/lib64/python3.8/enum.py:339: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
return cls.__new__(cls, value)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_bad_status
/usr/lib64/python3.8/enum.py:339: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
return cls.__new__(cls, value)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_not_json
/usr/lib64/python3.8/unittest/mock.py:2076: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
self.name = name
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_basic_s3.py:417: Not supported
XFAIL tests/test_basic_s3.py::test_put_object_sha256[False-https] - moto does not yet support Checksum: https://github.com/spulec/moto/issues/5719
ERROR tests/test_basic_s3.py::test_succeed_proxy_request[False] - botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://127.0.0.1:54321"
ERROR tests/test_basic_s3.py::test_unicode_key_put_list[False] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_unicode_key_put_list[False] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_unicode_system_character[False] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_unicode_system_character[False] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_presign_with_existing_query_string_values[False-s3-us-east-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_presign_with_existing_query_string_values[False-s3-us-east-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_presign_sigv4[False-s3v4-us-east-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_presign_sigv4[False-s3v4-us-east-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_can_follow_signed_url_redirect[False-s3v4] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_can_follow_signed_url_redirect[False-s3v4] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/test_basic_s3.py::test_bucket_redirect[False-us-west-2-eu-west-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
ERROR tests/boto_tests/test_credentials.py::test_load_sso_credentials_without_cache
FAILED tests/test_basic_s3.py::test_bucket_redirect[False-us-west-2-eu-west-1] - botocore.exceptions.NoCredentialsError: Unable to locate credentials
FAILED tests/test_lambda.py::test_run_lambda - botocore.exceptions.ClientError: An error occurred (500) when calling the CreateFunction operation (reached max retries: 4): <!doctype html>
FAILED tests/test_patches.py::test_patches - assert False
FAILED tests/test_waiter.py::test_sqs - botocore.parsers.ResponseParserError: Unable to parse response (syntax error: line 1, column 0), invalid XML received. Further retries may succeed:
FAILED tests/python3.8/test_eventstreams.py::test_kinesis_stream_json_parser - botocore.exceptions.NoRegionError: You must specify a region.
================================================= 5 failed, 189 passed, 1 skipped, 1 xfailed, 183 warnings, 13 errors in 126.62s (0:02:06) ================================================== |
only the moto marked tests are supported, so you need to run with |
For what this marker is? 🤔 |
it tells you which tests need moto to run |
Just FTR 2.6.0 pytest is failing in seleniumbase (4.17.0) module: + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.6.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.6.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -m moto
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1611, in getoption
INTERNALERROR> val = getattr(self.option, name)
INTERNALERROR> AttributeError: 'Namespace' object has no attribute 'htmlpath'
INTERNALERROR>
INTERNALERROR> The above exception was the direct cause of the following exception:
INTERNALERROR>
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 267, in wrap_session
INTERNALERROR> config._do_configure()
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1053, in _do_configure
INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 514, in call_historic
INTERNALERROR> res = self._hookexec(self.name, self._hookimpls, kwargs, False)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
INTERNALERROR> raise exception.with_traceback(exception.__traceback__)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/seleniumbase/plugins/pytest_plugin.py", line 1559, in pytest_configure
INTERNALERROR> sb_config.pytest_html_report = config.getoption("htmlpath") # --html=FILE
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1622, in getoption
INTERNALERROR> raise ValueError(f"no option named {name!r}") from e
INTERNALERROR> ValueError: no option named 'htmlpath' Any hints? 🤔 |
Update: 2.7.0 is failing in 3 units and pytest shows some warnings + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.7.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.7.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -m moto
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
cachedir: /tmp/pytest_aiobotocore_cache
rootdir: /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.7.0
configfile: pytest.ini
plugins: asyncio-0.21.1
asyncio: mode=auto
collected 203 items / 22 deselected / 181 selected
tests/test_basic_s3.py ......................Fx [ 13%]
tests/test_batch.py . [ 13%]
tests/test_config.py ..... [ 16%]
tests/test_dynamodb.py ...... [ 19%]
tests/test_ec2.py . [ 20%]
tests/test_eventstreams.py .. [ 21%]
tests/test_lambda.py F [ 22%]
tests/test_monitor.py . [ 22%]
tests/test_patches.py .F [ 23%]
tests/test_response.py ............... [ 32%]
tests/test_session.py .. [ 33%]
tests/test_sns.py ..... [ 35%]
tests/test_sqs.py .... [ 38%]
tests/test_version.py . [ 38%]
tests/test_waiter.py . [ 39%]
tests/boto_tests/test_credentials.py .................................. [ 58%]
tests/boto_tests/test_signers.py . [ 58%]
tests/boto_tests/test_utils.py ........ [ 62%]
tests/python3.8/boto_tests/test_credentials.py ............... [ 71%]
tests/python3.8/boto_tests/test_signers.py ........ [ 75%]
tests/python3.8/boto_tests/test_tokens.py .................... [ 86%]
tests/python3.8/boto_tests/test_utils.py ........................ [100%]
=================================== FAILURES ===================================
_________________________ test_head_object_keys[s3v4] __________________________
s3_client = <aiobotocore.client.S3 object at 0x7f83623e2c40>
create_object = <function create_object.<locals>._f at 0x7f83627c9550>
bucket_name = 'fytgluskxemrwdcaqpvbnozhij'
@pytest.mark.parametrize('signature_version', ['s3v4'])
@pytest.mark.asyncio
@pytest.mark.moto
async def test_head_object_keys(s3_client, create_object, bucket_name):
await create_object('foobarbaz')
resp = await s3_client.head_object(Bucket=bucket_name, Key='foobarbaz')
# this is to ensure things like:
# https://github.com/aio-libs/aiobotocore/issues/131 don't happen again
> assert set(resp.keys()) == {
'ETag',
'ContentType',
'Metadata',
'LastModified',
'ResponseMetadata',
'ContentLength',
'VersionId',
}
E AssertionError: assert {'AcceptRange...etadata', ...} == {'ContentLeng...etadata', ...}
E Extra items in the left set:
E 'AcceptRanges'
E Use -v to get more diff
tests/test_basic_s3.py:629: AssertionError
------------------------------ Captured log setup ------------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:18] "GET /static HTTP/1.1" 404 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:18] "PUT /fytgluskxemrwdcaqpvbnozhij HTTP/1.1" 200 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:18] "PUT /fytgluskxemrwdcaqpvbnozhij?versioning HTTP/1.1" 200 -
------------------------------ Captured log call -------------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:18] "PUT /fytgluskxemrwdcaqpvbnozhij/foobarbaz HTTP/1.1" 200 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:18] "HEAD /fytgluskxemrwdcaqpvbnozhij/foobarbaz HTTP/1.1" 200 -
---------------------------- Captured log teardown -----------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:18] "GET /fytgluskxemrwdcaqpvbnozhij?versions&prefix=&encoding-type=url HTTP/1.1" 200 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:18] "DELETE /fytgluskxemrwdcaqpvbnozhij/foobarbaz?versionId=4525a00b-620d-431c-a4b6-04d26959ff3a HTTP/1.1" 204 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:18] "DELETE /fytgluskxemrwdcaqpvbnozhij HTTP/1.1" 204 -
_______________________________ test_run_lambda ________________________________
iam_client = <aiobotocore.client.IAM object at 0x7f834740a8b0>
lambda_client = <aiobotocore.client.Lambda object at 0x7f8347f20f40>
aws_lambda_zip = b'PK\x03\x04\x14\x00\x00\x00\x08\x00U\xb6_W*\x12\x1c6c\x00\x00\x00p\x00\x00\x00\x12\x00\x00\x00lambda_function.py%\xca...0\x01\x00\x00\x00\x00lambda_function.pyPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00@\x00\x00\x00\x93\x00\x00\x00\x00\x00'
@pytest.mark.moto
@pytest.mark.asyncio
async def test_run_lambda(iam_client, lambda_client, aws_lambda_zip):
role_arn = await _get_role_arn(iam_client, 'test-iam-role')
lambda_response = await lambda_client.create_function(
FunctionName='test-function',
Runtime='python3.8',
Role=role_arn,
Handler='lambda_function.lambda_handler',
Timeout=10,
MemorySize=128,
Publish=True,
Code={'ZipFile': aws_lambda_zip},
)
assert lambda_response['FunctionName'] == 'test-function'
invoke_response = await lambda_client.invoke(
FunctionName="test-function",
InvocationType="RequestResponse",
LogType='Tail',
Payload=json.dumps({"hello": "world"}),
)
async with invoke_response['Payload'] as stream:
data = await stream.read()
log_result = base64.b64decode(invoke_response["LogResult"])
> assert json.loads(data) == {'statusCode': 200, "body": {"hello": "world"}}
tests/test_lambda.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/json/__init__.py:357: in loads
return _default_decoder.decode(s)
/usr/lib64/python3.8/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f8365d68c10>
s = "error running docker: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))"
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib64/python3.8/json/decoder.py:355: JSONDecodeError
------------------------------ Captured log setup ------------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:41] "GET /static HTTP/1.1" 404 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:42] "GET /static HTTP/1.1" 404 -
------------------------------ Captured log call -------------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:42] "POST / HTTP/1.1" 404 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:43] "POST / HTTP/1.1" 200 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:43] "POST /2015-03-31/functions HTTP/1.1" 201 -
ERROR moto.awslambda.models:models.py:878 error running docker: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
INFO werkzeug:_internal.py:96 127.0.0.1 - - [31/Oct/2023 22:50:43] "POST /2015-03-31/functions/test-function/invocations HTTP/1.1" 200 -
_________________________________ test_patches _________________________________
@pytest.mark.moto
def test_patches():
print(f"Botocore version: {botocore.__version__}")
success = True
for obj, digests in _API_DIGESTS.items():
try:
source = getsource(obj)
except TypeError:
obj = obj.fget
source = getsource(obj)
digest = hashlib.sha1(source.encode('utf-8')).hexdigest()
if digest not in digests:
print(
"Digest of {}:{} not found in: {}".format(
obj.__qualname__, digest, digests
)
)
success = False
> assert success
E assert False
tests/test_patches.py:690: AssertionError
----------------------------- Captured stdout call -----------------------------
Botocore version: 1.31.73
Digest of ClientArgsCreator._build_endpoint_resolver:0f80192233321ae4a55d95b68f5b8a68f3ad18e6 not found in: {'9aa226b8d6f09f7270633b8cc35bc82a15386ee4'}
Digest of Config:cc6a9e768c78ad1c2f5217d86f9335dd904e461e not found in: {'4153fcb2ddf68b86f3774da1016b9cbfa1659b0b', 'ef03037bbe22945d5aa83bf39854e758f1b0c768', 'c6b76ca9e061c4fee99be96fb716a49043eb1806'}
=============================== warnings summary ===============================
tests/test_basic_s3.py: 47 warnings
tests/test_batch.py: 2 warnings
tests/test_dynamodb.py: 12 warnings
tests/test_ec2.py: 2 warnings
tests/test_eventstreams.py: 4 warnings
tests/test_lambda.py: 4 warnings
tests/test_monitor.py: 2 warnings
tests/test_sns.py: 10 warnings
tests/test_sqs.py: 8 warnings
tests/test_waiter.py: 2 warnings
tests/boto_tests/test_signers.py: 2 warnings
/usr/lib64/python3.8/site-packages/aiohttp/client.py:1167: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._resp = await self._coro
tests/test_basic_s3.py::test_can_make_request_no_verify[False]
tests/test_basic_s3.py::test_put_object_sha256[False-https]
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.7.0/aiobotocore/httpsession.py:111: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._create_connector = lambda: aiohttp.TCPConnector(
tests/test_version.py::test_release_versions
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.7.0/tests/test_version.py:35: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
settings = docutils.frontend.OptionParser(
tests/test_version.py: 69 warnings
/usr/lib64/python3.8/optparse.py:1000: DeprecationWarning: The frontend.Option class will be removed in Docutils 0.21 or later.
option = self.option_class(*args, **kwargs)
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.7.0/tests/boto_tests/test_utils.py:27: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
class FakeAioHttpSession:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.7.0/tests/boto_tests/test_utils.py:27: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
class FakeAioHttpSession:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_credentials.py::test_instancemetadata_load
/usr/lib64/python3.8/inspect.py:2821: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
params = OrderedDict(((param.name, param)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_credentials.py::test_instancemetadata_load
/usr/lib64/python3.8/inspect.py:2821: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
params = OrderedDict(((param.name, param)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_bad_status
/usr/lib64/python3.8/enum.py:339: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
return cls.__new__(cls, value)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_not_json
/usr/lib64/python3.8/unittest/mock.py:2030: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
setattr(_type, entry, MagicProxy(entry, self))
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
XFAIL tests/test_basic_s3.py::test_put_object_sha256[False-https] - moto does not yet support Checksum: https://github.com/spulec/moto/issues/5719
FAILED tests/test_basic_s3.py::test_head_object_keys[s3v4] - AssertionError: ...
FAILED tests/test_lambda.py::test_run_lambda - json.decoder.JSONDecodeError: ...
FAILED tests/test_patches.py::test_patches - assert False
= 3 failed, 177 passed, 22 deselected, 1 xfailed, 173 warnings in 99.16s (0:01:39) =
sys:1: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited |
this isn't an issue with aiobotocore, this is an issue with your packaging (unless I'm missing something). Can you move this to discussions? You need to make sure you're running unittests the same way we are: https://github.com/aio-libs/aiobotocore/blob/master/.github/workflows/python-package.yml#L55 which calls: https://github.com/aio-libs/aiobotocore/blob/master/Makefile#L25 |
and here's how we install the requirements: https://github.com/aio-libs/aiobotocore/blob/master/.github/workflows/python-package.yml#L46 |
Just tested 2.8.0 and I have one unit failing. + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.8.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -m moto
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
cachedir: /tmp/pytest_aiobotocore_cache
rootdir: /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.8.0
configfile: pyproject.toml
plugins: asyncio-0.21.1
asyncio: mode=auto
collected 205 items / 22 deselected / 183 selected
tests/test_basic_s3.py .......................x [ 13%]
tests/test_batch.py . [ 13%]
tests/test_config.py ..... [ 16%]
tests/test_dynamodb.py ...... [ 19%]
tests/test_ec2.py . [ 20%]
tests/test_eventstreams.py .. [ 21%]
tests/test_lambda.py F [ 21%]
tests/test_monitor.py . [ 22%]
tests/test_patches.py .. [ 23%]
tests/test_response.py ............... [ 31%]
tests/test_session.py .. [ 32%]
tests/test_sns.py ..... [ 35%]
tests/test_sqs.py .... [ 37%]
tests/test_stubber.py .. [ 38%]
tests/test_version.py . [ 39%]
tests/test_waiter.py . [ 39%]
tests/boto_tests/test_credentials.py .................................. [ 58%]
tests/boto_tests/test_signers.py . [ 59%]
tests/boto_tests/test_utils.py ........ [ 63%]
tests/python3.8/boto_tests/test_credentials.py ............... [ 71%]
tests/python3.8/boto_tests/test_signers.py ........ [ 75%]
tests/python3.8/boto_tests/test_tokens.py .................... [ 86%]
tests/python3.8/boto_tests/test_utils.py ........................ [100%]
=================================== FAILURES ===================================
_______________________________ test_run_lambda ________________________________
iam_client = <aiobotocore.client.IAM object at 0x7f9c4803c8b0>
lambda_client = <aiobotocore.client.Lambda object at 0x7f9c43de2c40>
aws_lambda_zip = b'PK\x03\x04\x14\x00\x00\x00\x08\x00\x0c\x10}W*\x12\x1c6c\x00\x00\x00p\x00\x00\x00\x12\x00\x00\x00lambda_function.py%\...0\x01\x00\x00\x00\x00lambda_function.pyPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00@\x00\x00\x00\x93\x00\x00\x00\x00\x00'
@pytest.mark.moto
@pytest.mark.asyncio
async def test_run_lambda(iam_client, lambda_client, aws_lambda_zip):
role_arn = await _get_role_arn(iam_client, 'test-iam-role')
lambda_response = await lambda_client.create_function(
FunctionName='test-function',
Runtime='python3.8',
Role=role_arn,
Handler='lambda_function.lambda_handler',
Timeout=10,
MemorySize=128,
Publish=True,
Code={'ZipFile': aws_lambda_zip},
)
assert lambda_response['FunctionName'] == 'test-function'
invoke_response = await lambda_client.invoke(
FunctionName="test-function",
InvocationType="RequestResponse",
LogType='Tail',
Payload=json.dumps({"hello": "world"}),
)
async with invoke_response['Payload'] as stream:
data = await stream.read()
log_result = base64.b64decode(invoke_response["LogResult"])
> assert json.loads(data) == {'statusCode': 200, "body": {"hello": "world"}}
tests/test_lambda.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/json/__init__.py:357: in loads
return _default_decoder.decode(s)
/usr/lib64/python3.8/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f9c4efffc10>
s = "error running docker: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))"
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib64/python3.8/json/decoder.py:355: JSONDecodeError
------------------------------ Captured log setup ------------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [29/Nov/2023 02:00:23] "GET /static HTTP/1.1" 404 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [29/Nov/2023 02:00:24] "GET /static HTTP/1.1" 404 -
------------------------------ Captured log call -------------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [29/Nov/2023 02:00:24] "POST / HTTP/1.1" 404 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [29/Nov/2023 02:00:24] "POST / HTTP/1.1" 200 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [29/Nov/2023 02:00:24] "POST /2015-03-31/functions HTTP/1.1" 201 -
ERROR moto.awslambda.models:models.py:989 error running docker: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
INFO werkzeug:_internal.py:96 127.0.0.1 - - [29/Nov/2023 02:00:24] "POST /2015-03-31/functions/test-function/invocations HTTP/1.1" 200 -
=============================== warnings summary ===============================
tests/test_basic_s3.py: 47 warnings
tests/test_batch.py: 2 warnings
tests/test_dynamodb.py: 12 warnings
tests/test_ec2.py: 2 warnings
tests/test_eventstreams.py: 4 warnings
tests/test_lambda.py: 4 warnings
tests/test_monitor.py: 2 warnings
tests/test_sns.py: 10 warnings
tests/test_sqs.py: 8 warnings
tests/test_waiter.py: 2 warnings
tests/boto_tests/test_signers.py: 2 warnings
/usr/lib64/python3.8/site-packages/aiohttp/client.py:1187: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._resp = await self._coro
tests/test_basic_s3.py::test_can_make_request_no_verify[False]
tests/test_basic_s3.py::test_put_object_sha256[False-https]
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.8.0/aiobotocore/httpsession.py:111: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._create_connector = lambda: aiohttp.TCPConnector(
tests/test_version.py::test_release_versions
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.8.0/tests/test_version.py:35: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
settings = docutils.frontend.OptionParser(
tests/test_version.py: 69 warnings
/usr/lib64/python3.8/optparse.py:1000: DeprecationWarning: The frontend.Option class will be removed in Docutils 0.21 or later.
option = self.option_class(*args, **kwargs)
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.8.0/tests/boto_tests/test_utils.py:27: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
class FakeAioHttpSession:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/boto_tests/test_utils.py::test_idmsfetcher_timeout
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.8.0/tests/boto_tests/test_utils.py:27: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
class FakeAioHttpSession:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_credentials.py::test_refreshablecredentials_refresh_returns_empty_dict
/usr/lib64/python3.8/unittest/mock.py:2030: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
setattr(_type, entry, MagicProxy(entry, self))
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_credentials.py::test_refreshablecredentials_refresh_returns_empty_dict
/usr/lib64/python3.8/unittest/mock.py:2030: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
setattr(_type, entry, MagicProxy(entry, self))
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_bad_status
/usr/lib64/python3.8/enum.py:339: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
return cls.__new__(cls, value)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_not_json
/usr/lib64/python3.8/unittest/mock.py:2076: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
self.name = name
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
XFAIL tests/test_basic_s3.py::test_put_object_sha256[False-https] - moto does not yet support Checksum: https://github.com/spulec/moto/issues/5719
FAILED tests/test_lambda.py::test_run_lambda - json.decoder.JSONDecodeError: ...
= 1 failed, 181 passed, 22 deselected, 1 xfailed, 173 warnings in 102.39s (0:01:42) =
sys:1: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback |
so the lambda tests require moto, and further require docker. Do you have docker installed and running? |
In this case |
because moto uses the lambda base image to run the lambda function similar
to how it runs in AWS. I actually wrote that part originally :)
…On Wed, Nov 29, 2023, 12:47 AM Tomasz Kłoczko ***@***.***> wrote:
In this case moto was installed.
Why docker? venv/virtualenv is not enough? 🤔
—
Reply to this email directly, view it on GitHub
<#965 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6Q77N5J3ZKBAXVWNS6MYTYG3ZALAVCNFSM57TCB5G2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBTGE2DMMBRGIZQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
After control rebuild in updated env I found that now two units are failing Here is pytest output+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.8.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -m moto
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
cachedir: /tmp/pytest_aiobotocore_cache
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.8.0
configfile: pyproject.toml
plugins: datadir-1.5.0, regressions-2.5.0, timeout-2.2.0, hypothesis-6.84.3, benchmark-4.0.0, pylama-8.4.1, mock-3.12.0, asyncio-0.23.2
asyncio: mode=auto
collected 205 items / 22 deselected / 183 selected
tests/test_basic_s3.py .......................x [ 13%]
tests/test_batch.py . [ 13%]
tests/test_config.py ..... [ 16%]
tests/test_dynamodb.py ...... [ 19%]
tests/test_ec2.py . [ 20%]
tests/test_eventstreams.py .. [ 21%]
tests/test_lambda.py F [ 21%]
tests/test_monitor.py . [ 22%]
tests/test_patches.py .F [ 23%]
tests/test_response.py ............... [ 31%]
tests/test_session.py .. [ 32%]
tests/test_sns.py ..... [ 35%]
tests/test_sqs.py .... [ 37%]
tests/test_stubber.py .. [ 38%]
tests/test_version.py . [ 39%]
tests/test_waiter.py . [ 39%]
tests/boto_tests/test_credentials.py .................................. [ 58%]
tests/boto_tests/test_signers.py . [ 59%]
tests/boto_tests/test_utils.py ........ [ 63%]
tests/python3.8/boto_tests/test_credentials.py ............... [ 71%]
tests/python3.8/boto_tests/test_signers.py ........ [ 75%]
tests/python3.8/boto_tests/test_tokens.py .................... [ 86%]
tests/python3.8/boto_tests/test_utils.py ........................ [100%]
========================================================================================= FAILURES ==========================================================================================
______________________________________________________________________________________ test_run_lambda ______________________________________________________________________________________
iam_client = <aiobotocore.client.IAM object at 0x7fa9e7d88d00>, lambda_client = <aiobotocore.client.Lambda object at 0x7faa01aba070>
aws_lambda_zip = b'PK\x03\x04\x14\x00\x00\x00\x08\x00y$\x8dW*\x12\x1c6c\x00\x00\x00p\x00\x00\x00\x12\x00\x00\x00lambda_function.py%\xca...0\x01\x00\x00\x00\x00lambda_function.pyPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00@\x00\x00\x00\x93\x00\x00\x00\x00\x00'
/usr/lib/python3.8/site-packages/pygments/lexers/python.py:463: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
(r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'classname'),
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
@pytest.mark.moto
@pytest.mark.asyncio
async def test_run_lambda(iam_client, lambda_client, aws_lambda_zip):
role_arn = await _get_role_arn(iam_client, 'test-iam-role')
lambda_response = await lambda_client.create_function(
FunctionName='test-function',
Runtime='python3.8',
Role=role_arn,
Handler='lambda_function.lambda_handler',
Timeout=10,
MemorySize=128,
Publish=True,
Code={'ZipFile': aws_lambda_zip},
)
assert lambda_response['FunctionName'] == 'test-function'
invoke_response = await lambda_client.invoke(
FunctionName="test-function",
InvocationType="RequestResponse",
LogType='Tail',
Payload=json.dumps({"hello": "world"}),
)
async with invoke_response['Payload'] as stream:
data = await stream.read()
log_result = base64.b64decode(invoke_response["LogResult"])
> assert json.loads(data) == {'statusCode': 200, "body": {"hello": "world"}}
tests/test_lambda.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/json/__init__.py:357: in loads
return _default_decoder.decode(s)
/usr/lib64/python3.8/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7faa06ceba90>
s = "error running docker: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))", idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib64/python3.8/json/decoder.py:355: JSONDecodeError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 04:35:48] "GET /static HTTP/1.1" 404 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 04:35:50] "GET /static HTTP/1.1" 404 -
------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 04:35:50] "POST / HTTP/1.1" 404 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 04:35:50] "POST / HTTP/1.1" 200 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 04:35:50] "POST /2015-03-31/functions HTTP/1.1" 201 -
ERROR moto.awslambda.models:models.py:989 error running docker: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 04:35:50] "POST /2015-03-31/functions/test-function/invocations HTTP/1.1" 200 -
_______________________________________________________________________________________ test_patches ________________________________________________________________________________________
@pytest.mark.moto
def test_patches():
print(f"Botocore version: {botocore.__version__}")
success = True
for obj, digests in _API_DIGESTS.items():
try:
source = getsource(obj)
except TypeError:
obj = obj.fget
source = getsource(obj)
digest = hashlib.sha1(source.encode('utf-8')).hexdigest()
if digest not in digests:
print(
"Digest of {}:{} not found in: {}".format(
obj.__qualname__, digest, digests
)
)
success = False
> assert success
E assert False
tests/test_patches.py:697: AssertionError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Botocore version: 1.33.11
Digest of ClientCreator.create_client:eeb7c4730ac86aec37de53b2be0779490b05f50b not found in: {'ef5bef8f4b2887143165e72554fd85c36af7e822'}
Digest of BaseClient._make_api_call:2cb11088d36a89cf9f5c41508bce908acbde24c4 not found in: {'1ac2e166cc8e5020224a808d2ccdfda18e6bdbf2'}
Digest of BaseClient._resolve_endpoint_ruleset:f09731451ff6ba0645dc82e5c7948dfbf781e025 not found in: {'3206a73ae79601c42f8a5ae1d7e0e903a2495acb'}
Digest of RefreshableCredentials.__init__:25ee814f47e5ce617f57e893ae158e5fd6d358ea not found in: {'1a6b83fc845f05feab117ce4fab73b13baed6e3b'}
Digest of RequestSigner.sign:8b6ca96055e5546a6572ad790d5af74a23bc0b52 not found in: {'d90346d5e066e89cd902c5c936f59b644ecde275'}
Digest of RequestSigner.get_auth_instance:dcd41ea686506dcf056d8252ccf73acd501efd2b not found in: {'4f9be5feafd6c08ffd7bb8de3c9bc36bc02cbfc8'}
Digest of generate_presigned_url:d03631d6810e2453b8874bc76619927b694a4207 not found in: {'48f6745f8a37cfba04b3b2f6fb3910210b4a7201'}
Digest of generate_presigned_post:a3a834a08be2cf76c20ea137ba6b28e7a12f58ed not found in: {'eedf40b48c63f6772ed05e3f335c8193d187f503'}
===================================================================================== warnings summary ======================================================================================
tests/test_dynamodb.py:123
tests/test_dynamodb.py:123: PytestDeprecationWarning: test_waiter_table_exists[v4] is asynchronous and explicitly requests the "event_loop" fixture. Asynchronous fixtures and test functions should use "asyncio.get_running_loop()" instead.
@pytest.mark.moto
tests/test_basic_s3.py: 46 warnings
tests/test_batch.py: 2 warnings
tests/test_dynamodb.py: 12 warnings
tests/test_ec2.py: 1 warning
tests/test_eventstreams.py: 4 warnings
tests/test_lambda.py: 4 warnings
tests/test_monitor.py: 2 warnings
tests/test_sns.py: 10 warnings
tests/test_sqs.py: 8 warnings
tests/test_waiter.py: 2 warnings
tests/boto_tests/test_signers.py: 2 warnings
/usr/lib64/python3.8/site-packages/aiohttp/client.py:1187: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._resp = await self._coro
tests/test_basic_s3.py::test_can_make_request_no_verify[False]
tests/test_basic_s3.py::test_put_object_sha256[False-https]
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.8.0/aiobotocore/httpsession.py:111: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
self._create_connector = lambda: aiohttp.TCPConnector(
tests/test_version.py::test_release_versions
/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.8.0/tests/test_version.py:35: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
settings = docutils.frontend.OptionParser(
tests/test_version.py: 69 warnings
/usr/lib64/python3.8/optparse.py:1000: DeprecationWarning: The frontend.Option class will be removed in Docutils 0.21 or later.
option = self.option_class(*args, **kwargs)
tests/python3.8/boto_tests/test_credentials.py::test_refreshablecredentials_get_credentials_set
/usr/lib64/python3.8/selectors.py:352: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._content' was never awaited
key = super().register(fileobj, events, data)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_credentials.py::test_refreshablecredentials_get_credentials_set
/usr/lib64/python3.8/selectors.py:352: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
key = super().register(fileobj, events, data)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_bad_status
/usr/lib64/python3.8/unittest/mock.py:2076: RuntimeWarning: coroutine 'fake_aiohttp_session.<locals>.FakeAioHttpSession.FakeResponse._text' was never awaited
self.name = name
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
XFAIL tests/test_basic_s3.py::test_put_object_sha256[False-https] - moto does not yet support Checksum: https://github.com/spulec/moto/issues/5719
FAILED tests/test_lambda.py::test_run_lambda - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_patches.py::test_patches - assert False
===================================================== 2 failed, 180 passed, 22 deselected, 1 xfailed, 169 warnings in 95.64s (0:01:35) ====================================================== List of installed modules in build envPackage Version
----------------------------- ----------
aiohttp 3.9.0
aioitertools 0.11.0
aiosignal 1.3.1
alabaster 0.7.13
async-timeout 4.0.3
attrs 23.1.0
Babel 2.13.1
blinker 1.6.2
boto3 1.33.11
botocore 1.33.11
build 1.0.3
cffi 1.16.0
charset-normalizer 3.3.2
click 8.1.7
cppclean 0.13
cryptography 41.0.5
dill 0.3.7
distro 1.8.0
dnf 4.18.1
docker 7.0.0
docutils 0.20.1
exceptiongroup 1.1.3
Flask 3.0.0
Flask-Cors 4.0.0
frozenlist 1.4.0
gpg 1.23.2
idna 3.6
imagesize 1.4.1
importlib-metadata 7.0.0
importlib-resources 6.1.1
iniconfig 2.0.0
installer 0.7.0
itsdangerous 2.1.2
Jinja2 3.1.2
jmespath 1.0.1
jsonschema 4.19.1
jsonschema-path 0.3.2
jsonschema-specifications 2023.7.1
lazy-object-proxy 1.9.0
libdnf 0.72.0
MarkupSafe 2.1.3
moto 4.1.0.dev0
multidict 6.0.4
openapi-schema-validator 0.6.2
openapi-spec-validator 0.7.1
packaging 23.2
pathable 0.4.3
pkgutil_resolve_name 1.3.10
pluggy 1.3.0
ply 3.11
pycparser 2.21
Pygments 2.17.2
pyproject_hooks 1.0.0
pytest 7.4.3
pytest-asyncio 0.23.2
python-dateutil 2.8.2
pytz 2023.3
PyYAML 6.0.1
referencing 0.30.2
requests 2.31.0
responses 0.24.1
rfc3339-validator 0.1.4
rpds-py 0.13.2
s3transfer 0.8.2
setuptools 69.0.2
six 1.16.0
snowballstemmer 2.2.0
Sphinx 7.1.2
sphinxcontrib-applehelp 1.0.4
sphinxcontrib-devhelp 1.0.5
sphinxcontrib-htmlhelp 2.0.4
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.9
tomli 2.0.1
typing_extensions 4.9.0
urllib3 1.26.18
Werkzeug 3.0.0
wheel 0.42.0
wrapt 1.16.0
xmltodict 0.13.0
yarl 1.9.2
zipp 3.17.0 |
BTW + /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
running egg_info
creating aiobotocore.egg-info
writing aiobotocore.egg-info/PKG-INFO
writing dependency_links to aiobotocore.egg-info/dependency_links.txt
writing requirements to aiobotocore.egg-info/requires.txt
writing top-level names to aiobotocore.egg-info/top_level.txt
writing manifest file 'aiobotocore.egg-info/SOURCES.txt'
reading manifest file 'aiobotocore.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.swp' found anywhere in distribution
adding license file 'LICENSE'
writing manifest file 'aiobotocore.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/aiobotocore
copying aiobotocore/__init__.py -> build/lib/aiobotocore
copying aiobotocore/_endpoint_helpers.py -> build/lib/aiobotocore
copying aiobotocore/_helpers.py -> build/lib/aiobotocore
copying aiobotocore/args.py -> build/lib/aiobotocore
copying aiobotocore/awsrequest.py -> build/lib/aiobotocore
copying aiobotocore/client.py -> build/lib/aiobotocore
copying aiobotocore/config.py -> build/lib/aiobotocore
copying aiobotocore/configprovider.py -> build/lib/aiobotocore
copying aiobotocore/credentials.py -> build/lib/aiobotocore
copying aiobotocore/discovery.py -> build/lib/aiobotocore
copying aiobotocore/endpoint.py -> build/lib/aiobotocore
copying aiobotocore/eventstream.py -> build/lib/aiobotocore
copying aiobotocore/handlers.py -> build/lib/aiobotocore
copying aiobotocore/hooks.py -> build/lib/aiobotocore
copying aiobotocore/httpchecksum.py -> build/lib/aiobotocore
copying aiobotocore/httpsession.py -> build/lib/aiobotocore
copying aiobotocore/paginate.py -> build/lib/aiobotocore
copying aiobotocore/parsers.py -> build/lib/aiobotocore
copying aiobotocore/regions.py -> build/lib/aiobotocore
copying aiobotocore/response.py -> build/lib/aiobotocore
copying aiobotocore/retryhandler.py -> build/lib/aiobotocore
copying aiobotocore/session.py -> build/lib/aiobotocore
copying aiobotocore/signers.py -> build/lib/aiobotocore
copying aiobotocore/stub.py -> build/lib/aiobotocore
copying aiobotocore/tokens.py -> build/lib/aiobotocore
copying aiobotocore/utils.py -> build/lib/aiobotocore
copying aiobotocore/waiter.py -> build/lib/aiobotocore
running egg_info
writing aiobotocore.egg-info/PKG-INFO
writing dependency_links to aiobotocore.egg-info/dependency_links.txt
writing requirements to aiobotocore.egg-info/requires.txt
writing top-level names to aiobotocore.egg-info/top_level.txt
reading manifest file 'aiobotocore.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.swp' found anywhere in distribution
adding license file 'LICENSE'
writing manifest file 'aiobotocore.egg-info/SOURCES.txt'
/usr/lib/python3.8/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'aiobotocore.retries' is absent from the `packages` configuration.
!!
********************************************************************************
############################
# Package would be ignored #
############################
Python recognizes 'aiobotocore.retries' as an importable package[^1],
but it is absent from setuptools' `packages` configuration.
This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'aiobotocore.retries' is explicitly added
to the `packages` configuration field.
Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
If you don't want 'aiobotocore.retries' to be distributed and are
already explicitly excluding 'aiobotocore.retries' via
`find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
you can try to use `exclude_package_data`, or `include-package-data=False` in
combination with a more fine grained `package-data` configuration.
You can read more about "package data files" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/datafiles.html
[^1]: For Python, any directory (with suitable naming) can be imported,
even if it does not contain any `.py` files.
On the other hand, currently there is no concept of package data
directory, all directories are treated like packages.
********************************************************************************
!!
check.warn(importable)
creating build/lib/aiobotocore/retries
copying aiobotocore/retries/adaptive.py -> build/lib/aiobotocore/retries
copying aiobotocore/retries/bucket.py -> build/lib/aiobotocore/retries
copying aiobotocore/retries/special.py -> build/lib/aiobotocore/retries
copying aiobotocore/retries/standard.py -> build/lib/aiobotocore/retries
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/__init__.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/_endpoint_helpers.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/_helpers.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/args.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/awsrequest.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/client.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/config.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/configprovider.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/credentials.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/discovery.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/endpoint.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/eventstream.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/handlers.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/hooks.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/httpchecksum.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/httpsession.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/paginate.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/parsers.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/regions.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/response.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/retryhandler.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/session.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/signers.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/stub.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/tokens.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/utils.py -> build/bdist.linux-x86_64/wheel/aiobotocore
copying build/lib/aiobotocore/waiter.py -> build/bdist.linux-x86_64/wheel/aiobotocore
creating build/bdist.linux-x86_64/wheel/aiobotocore/retries
copying build/lib/aiobotocore/retries/adaptive.py -> build/bdist.linux-x86_64/wheel/aiobotocore/retries
copying build/lib/aiobotocore/retries/bucket.py -> build/bdist.linux-x86_64/wheel/aiobotocore/retries
copying build/lib/aiobotocore/retries/special.py -> build/bdist.linux-x86_64/wheel/aiobotocore/retries
copying build/lib/aiobotocore/retries/standard.py -> build/bdist.linux-x86_64/wheel/aiobotocore/retries
running install_egg_info
Copying aiobotocore.egg-info to build/bdist.linux-x86_64/wheel/aiobotocore-2.8.0-py3.8.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/aiobotocore-2.8.0.dist-info/WHEEL
creating '/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.8.0/dist/.tmp-li7i6aq4/aiobotocore-2.8.0-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'aiobotocore/__init__.py'
adding 'aiobotocore/_endpoint_helpers.py'
adding 'aiobotocore/_helpers.py'
adding 'aiobotocore/args.py'
adding 'aiobotocore/awsrequest.py'
adding 'aiobotocore/client.py'
adding 'aiobotocore/config.py'
adding 'aiobotocore/configprovider.py'
adding 'aiobotocore/credentials.py'
adding 'aiobotocore/discovery.py'
adding 'aiobotocore/endpoint.py'
adding 'aiobotocore/eventstream.py'
adding 'aiobotocore/handlers.py'
adding 'aiobotocore/hooks.py'
adding 'aiobotocore/httpchecksum.py'
adding 'aiobotocore/httpsession.py'
adding 'aiobotocore/paginate.py'
adding 'aiobotocore/parsers.py'
adding 'aiobotocore/regions.py'
adding 'aiobotocore/response.py'
adding 'aiobotocore/retryhandler.py'
adding 'aiobotocore/session.py'
adding 'aiobotocore/signers.py'
adding 'aiobotocore/stub.py'
adding 'aiobotocore/tokens.py'
adding 'aiobotocore/utils.py'
adding 'aiobotocore/waiter.py'
adding 'aiobotocore/retries/adaptive.py'
adding 'aiobotocore/retries/bucket.py'
adding 'aiobotocore/retries/special.py'
adding 'aiobotocore/retries/standard.py'
adding 'aiobotocore-2.8.0.dist-info/LICENSE'
adding 'aiobotocore-2.8.0.dist-info/METADATA'
adding 'aiobotocore-2.8.0.dist-info/WHEEL'
adding 'aiobotocore-2.8.0.dist-info/top_level.txt'
adding 'aiobotocore-2.8.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built aiobotocore-2.8.0-py3-none-any.whl |
Here is pytest output for 2.9.0+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.9.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.9.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -m moto
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
cachedir: /tmp/pytest_aiobotocore_cache
rootdir: /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.9.0
configfile: pyproject.toml
plugins: asyncio-0.23.2, datadir-1.5.0, regressions-2.5.0, timeout-2.2.0, Faker-20.1.0
asyncio: mode=auto
collected 205 items / 22 deselected / 183 selected
tests/test_basic_s3.py .......................x [ 13%]
tests/test_batch.py . [ 13%]
tests/test_config.py ..... [ 16%]
tests/test_dynamodb.py ...... [ 19%]
tests/test_ec2.py . [ 20%]
tests/test_eventstreams.py .. [ 21%]
tests/test_lambda.py F [ 21%]
tests/test_monitor.py . [ 22%]
tests/test_patches.py .. [ 23%]
tests/test_response.py ............... [ 31%]
tests/test_session.py .. [ 32%]
tests/test_sns.py ..... [ 35%]
tests/test_sqs.py .... [ 37%]
tests/test_stubber.py .. [ 38%]
tests/test_version.py . [ 39%]
tests/test_waiter.py . [ 39%]
tests/boto_tests/test_credentials.py .................................. [ 58%]
tests/boto_tests/test_signers.py . [ 59%]
tests/boto_tests/test_utils.py ........ [ 63%]
tests/python3.8/boto_tests/test_credentials.py ............... [ 71%]
tests/python3.8/boto_tests/test_signers.py ........ [ 75%]
tests/python3.8/boto_tests/test_tokens.py .................... [ 86%]
tests/python3.8/boto_tests/test_utils.py ........................ [100%]
========================================================================================= FAILURES ==========================================================================================
______________________________________________________________________________________ test_run_lambda ______________________________________________________________________________________
iam_client = <aiobotocore.client.IAM object at 0x7fe1c967f220>, lambda_client = <aiobotocore.client.Lambda object at 0x7fe1cb9ef520>
aws_lambda_zip = b'PK\x03\x04\x14\x00\x00\x00\x08\x00O|\x8dW*\x12\x1c6c\x00\x00\x00p\x00\x00\x00\x12\x00\x00\x00lambda_function.py%\xca...0\x01\x00\x00\x00\x00lambda_function.pyPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00@\x00\x00\x00\x93\x00\x00\x00\x00\x00'
@pytest.mark.moto
@pytest.mark.asyncio
async def test_run_lambda(iam_client, lambda_client, aws_lambda_zip):
role_arn = await _get_role_arn(iam_client, 'test-iam-role')
lambda_response = await lambda_client.create_function(
FunctionName='test-function',
Runtime='python3.8',
Role=role_arn,
Handler='lambda_function.lambda_handler',
Timeout=10,
MemorySize=128,
Publish=True,
Code={'ZipFile': aws_lambda_zip},
)
assert lambda_response['FunctionName'] == 'test-function'
invoke_response = await lambda_client.invoke(
FunctionName="test-function",
InvocationType="RequestResponse",
LogType='Tail',
Payload=json.dumps({"hello": "world"}),
)
async with invoke_response['Payload'] as stream:
data = await stream.read()
log_result = base64.b64decode(invoke_response["LogResult"])
> assert json.loads(data) == {'statusCode': 200, "body": {"hello": "world"}}
tests/test_lambda.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/json/__init__.py:357: in loads
return _default_decoder.decode(s)
/usr/lib64/python3.8/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7fe1cfb42a90>
s = "error running docker: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))", idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib64/python3.8/json/decoder.py:355: JSONDecodeError
------------------------------------------------------------------------------------ Captured log setup -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 15:34:30] "GET /static HTTP/1.1" 404 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 15:34:31] "GET /static HTTP/1.1" 404 -
------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 15:34:31] "POST / HTTP/1.1" 404 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 15:34:31] "POST / HTTP/1.1" 200 -
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 15:34:31] "POST /2015-03-31/functions HTTP/1.1" 201 -
ERROR moto.awslambda.models:models.py:989 error running docker: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
INFO werkzeug:_internal.py:96 127.0.0.1 - - [13/Dec/2023 15:34:31] "POST /2015-03-31/functions/test-function/invocations HTTP/1.1" 200 -
===================================================================================== warnings summary ====================================================================================== |
|
I'm going to close this issue, this is unrelated to an issue with aiobotocore. Feel free to continue in a discussion or stackoverflow or similar area. This area is for resolving issues with aiobotocore |
discussion area for reference: https://github.com/aio-libs/aiobotocore/discussions |
OK. Can you provide your expertise what it cud be? 🤔 |
Describe the bug
A clear and concise description of what the bug is.
Checklist
pip check
passes without errorspip freeze
resultspip freeze results
Environment:
Additional context
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesBecaus eone unit is failing on missing fixture I'm assuming that at least one module is missing in my build env.
May I ask fo rdome hints what may be missing?
The text was updated successfully, but these errors were encountered: