simples3 icon indicating copy to clipboard operation
simples3 copied to clipboard

Don't bail when python lacks ssl support

Open jbergstroem opened this issue 14 years ago • 2 comments

If your python is compiled without ssl support, simples3 will start to cry:

python2.5 setup.py build -b build-2.5
Traceback (most recent call last):
  File "setup.py", line 8, in <module>
    import simples3
  File "simples3/__init__.py", line 124, in <module>
    from .bucket import S3File, S3Bucket, S3Error, KeyNotFound
  File "simples3/bucket.py", line 66, in <module>
    class StreamHTTPSHandler(urllib2.HTTPSHandler):
AttributeError: 'module' object has no attribute 'HTTPSHandler'

IMO ssl should be optional and not required

jbergstroem avatar Nov 22 '11 20:11 jbergstroem

It is optional, though it seems like a disservice to the end-user not to force the library user to think about it. I forget how exactly one sets plain HTTP up, but basically you change the service_url.

HTH -L

lericson avatar Nov 22 '11 21:11 lericson

As discussed on IRC it actually is required, mostly because the module-level names in simples3/bucket.py would need to be wrapped in ifs and things get ugly pretty quick. In fact I don't even know what StreamHTTPS?Handler is for.

lericson avatar Nov 23 '11 08:11 lericson