diff --git a/flaskr/geocoder.py b/flaskr/geocoder.py index db41448..64f1fe4 100644 --- a/flaskr/geocoder.py +++ b/flaskr/geocoder.py @@ -8,14 +8,14 @@ import geopy.geocoders from flaskr.core import get_path -ctx = ssl.create_default_context(cafile=certifi.where()) -geopy.geocoders.options.default_ssl_context = ctx +ssl_ctx = ssl.create_default_context(cafile=certifi.where()) +geopy.geocoders.options.default_ssl_context = ssl_ctx class CachedGeocoder: def __init__(self, source="Nominatim", geocache="geocache.db"): - self.geocoder = getattr(geopy.geocoders, source)(scheme='http') + self.geocoder = getattr(geopy.geocoders, source)(scheme='https') self.cache = shelve.open(get_path(geocache), writeback=True) # self.timestamp = time.time() + 1.5 diff --git a/requirements.txt b/requirements.txt index ca2fbcf..fd0a7ae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,7 +23,7 @@ pyyaml==5.1.2 Markdown==3.1.1 numpy==1.18.5 enum34==1.1.6 -geopy==1.20.0 +geopy==1.23.0 certifi==2019.11.28 python-dotenv==0.10.3 -- libgit2 0.21.2