Skip to content

'AWSHTTPSConnection' object has no attribute 'ssl_context' #1258

@fsateler

Description

@fsateler

Hi,

I'm getting the above error when trying to use Route53 service. I have investigated and concluded that the fault is the copying of functions from AWSHTTPConnection to AWSHTTPSConnection:

# Now we need to set the methods we overrode from AWSHTTPConnection
# onto AWSHTTPSConnection.  This is just a shortcut to avoid
# copy/pasting the same code into AWSHTTPSConnection.
for name, function in AWSHTTPConnection.__dict__.items():
    if inspect.isfunction(function):
        setattr(AWSHTTPSConnection, name, function)

The problem is that this ends up overriding the __init__ function too, so the VerifiedHTTPSConnection constructor is never invoked. I don't know why this worked in the past, or why it has become a problem recently. I have locally patched that file to add and function.__name__ != '__init__' to the if above, and copied manually the constructor to AWSHTTPSConnection (to invoke VerifiedHTTPSConnection constructor). Things seem to work fine now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesThis issue is a problem in a dependency.enhancementThis issue requests an improvement to a current feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions