[Python-modules-team] Bug#854382: awscli: [patch] fix 'AWSHTTPSConnection' object has no attribute 'ssl_context'

Felipe Sateler fsateler at debian.org
Mon Aug 7 15:26:06 UTC 2017

Control: reopen -1
Control: reassign -1 python3-botocore 1.5.84-1
Control: retitle -1 AWSHTTPSConnection does not invoke VerifiedHTTPSConnection constructor
Control: affects -1 awscli
Control: forwarded -1 https://github.com/boto/botocore/issues/1258

On Mon, 10 Jul 2017 17:10:44 +0900 TANIGUCHI Takaki <takaki at asis.media-as.org> wrote:
> I think this is not a suitable patch file.

Indeed, as the problem is that awsrequest.py has:

for name, function in AWSHTTPConnection.__dict__.items():
    if inspect.isfunction(function):
        setattr(AWSHTTPSConnection, name, function)


A strategic `print` in there shows that this ends up overriding `__init__`
with the version from AWSHTTPConnection, which doesn't invoke the
VerifiedHTTPSConnection constructor, and thus ssl_context is never
set. I don't know why this ever worked.

I have posted additional details and a potential fix in the upstream report.


More information about the Python-modules-team mailing list