aiobotocore
aiobotocore copied to clipboard
potential aiohttp>=4.0.0 breaking changes
Describe the bug I have a suspicion we'll hit some issues when aiohttp 4.0.0 comes out judging by what I've seen in this issue https://github.com/terrycain/aioboto3/issues/237 where the user had installed 4.0.0a1.
The issue was using aiobotocore 1.3.3, where verify_ssl was an unexpected argument passed to aiohttp.TCPConnector, aiohttp.TCPConnector has since moved here but I reckon it would still have the same issue.
I shall look into this in more depth later today. Might be worth updating the dep to aiohttp>=3.3.1,<4.0.0
.
Running into this issue today pulling in aiobotocore 2.2.0 as a dependency to s3fs. Your pipfile specified
aiohttp = "==3.7.4.post0"
Will still work, but the setup.py aiohttp>=3.3.1
allows 4.0.0 to be installed which does indeed have your referenced verify_ssl issue.
cool will work on this asap, probably we need to test with both versions
Some news about this issue?
It looks like this just broke with aiohttp 3.9.2, which includes this change: https://github.com/aio-libs/aiohttp/pull/8043
That shouldn't be too bad a fix, I reckon https://github.com/aio-libs/aiobotocore/blob/master/aiobotocore/httpsession.py#L114 removing verify_ssl argument and changing ssl to ssl=ssl_context if ssl_context is not None else bool(verify)
should suffice and satisfy the arg checking logic here https://github.com/aio-libs/aiohttp/blob/v3.9.2/aiohttp/client_reqrep.py#L156
I'll look into it. There's #1077 fixing HTTPS proxy support that looks related to this issue.
That shouldn't be too bad a fix, I reckon https://github.com/aio-libs/aiobotocore/blob/master/aiobotocore/httpsession.py#L114 removing verify_ssl argument and changing ssl to
ssl=ssl_context if ssl_context is not None else bool(verify)
should suffice and satisfy the arg checking logic here https://github.com/aio-libs/aiohttp/blob/v3.9.2/aiohttp/client_reqrep.py#L156
Just set the start value of ssl_context
to bool(verify)
instead of None
. That should then be compatible with 3.9.2+ including 4+. We'll fix this this backwards-compatible breakage in 3.9.3 though, that certainly wasn't intended. We convert None
in ClientSession, but missed the case where you're sending it to the connector directly.