Esri / ArcREST

python package for REST API (AGS, AGOL, webmap JSON, etc..)
Apache License 2.0
192 stars 155 forks source link

ssl.create_default_context() not available on Python 2.7.8 #208

Closed AlexArcPy closed 8 years ago

AlexArcPy commented 8 years ago

create_default_context() method is not available in ssl module on Python 2.7.8; this was added in the later version (I know that it's in 2.7.11+), so ArcREST users on Python 2.7.8 won't be able to run this (this is the version that is shipped with ArcGIS 10.4). Basically this makes it the package unusable.

The row added in commit https://github.com/Esri/ArcREST/commit/5b56d35e36de2010070ab056619342bb33b2d685. The file impacted: src/arcrest/web/_base.py

achapkowski commented 8 years ago

@AlexArcPy I'll take a look. I'll probably have to do a version check to ensure it's there.

MikeMillerGIS commented 8 years ago

Maybe we can use a function like this in lieu of the default context http://www.programcreek.com/python/example/71559/ssl.create_default_context

achapkowski commented 8 years ago

@AlexArcPy - can you pull the latest, I put a fix in.

AlexArcPy commented 8 years ago

@achapkowski, thanks. it works great now on Python 2.7.8. please close the issue.