Trying to use the latest version of aioboto3, in the latest version resource is no longer used instead we switched over to using below as described
session = aioboto3.Session()
async with session.resource("s3") as s3
we have some async tests, using something similar to mock server and contest described in the test examples in aioboto3. we are seeing an issue in those async tests, which I think is related to a change added in previous release to do with "Fix missing close() method on http session". the error we are seeing is below:
AttributeError: 'NoneType' object has no attribute '__aexit__'
the tests work fine, the aioboto3.Session() it seems cleans up and closes the session, however in the mock server it also tries to clean up the session and we get the error below. we are handling the error now for the meantime. wondering If its a good idea for that async def close(self): that a check is added to see if the session is already None.
Async AWS SDK for Python version: aioboto3: 9.3.1 Python version: 3.9
Description
Trying to use the latest version of aioboto3, in the latest version resource is no longer used instead we switched over to using below as described
we have some async tests, using something similar to mock server and contest described in the test examples in aioboto3. we are seeing an issue in those async tests, which I think is related to a change added in previous release to do with "Fix missing close() method on http session". the error we are seeing is below:
AttributeError: 'NoneType' object has no attribute '__aexit__'
the tests work fine, the aioboto3.Session() it seems cleans up and closes the session, however in the mock server it also tries to clean up the session and we get the error below. we are handling the error now for the meantime. wondering If its a good idea for that
async def close(self):
that a check is added to see if the session is already None.