fastly / fastly-py

A Fastly API client for Python
https://pypi.org/project/fastly/
MIT License
77 stars 59 forks source link

AttributeError: 'module' object has no attribute 'PROTOCOL_TLS' #34

Closed pedropregueiro closed 6 years ago

pedropregueiro commented 6 years ago

Running the example from the docs gives me this error:

Traceback (most recent call last):
    api.purge_key(service, key)
  File "fastly/fastly.py", line 79, in purge_key
    resp, data = self.conn.request('POST', '/service/%s/purge/%s' % (service, key), headers=headers)
  File "fastly/connection.py", line 35, in request
    ctx = ssl.SSLContext(ssl.PROTOCOL_TLS)
AttributeError: 'module' object has no attribute 'PROTOCOL_TLS'

I'm using python 3.4.2 and fastly 0.1.4.

I ended up using the API directly instead, but curious to find out if this is an issue with my environment or with the way the package is handling SSL connections.