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

Felipe Sateler fsateler at debian.org
Wed Aug 23 14:03:44 UTC 2017


On Mon, Aug 7, 2017 at 11:26 AM, Felipe Sateler <fsateler at debian.org> wrote:
> 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.

I posted a patch upstream at
https://github.com/boto/botocore/pull/1259 , but it has not been
merged yet.

Could you please pick this up in the meantime? Currently awscli is unusable:

%aws ec2 describe-images
'AWSHTTPSConnection' object has no attribute 'ssl_context'

% aws s3 ls
'AWSHTTPSConnection' object has no attribute 'ssl_context'


Felipe Sateler

More information about the Python-modules-team mailing list