Commit c19aca771c6aeedb67cb0896a6debb5b75624d6a

Authored by Antoine Goutenoir
1 parent 3b3b818e
Exists in master

fix: continue battling with TLS

Showing 2 changed files with 4 additions and 4 deletions   Show diff stats
flaskr/geocoder.py
... ... @@ -8,14 +8,14 @@ import geopy.geocoders
8 8  
9 9 from flaskr.core import get_path
10 10  
11   -ctx = ssl.create_default_context(cafile=certifi.where())
12   -geopy.geocoders.options.default_ssl_context = ctx
  11 +ssl_ctx = ssl.create_default_context(cafile=certifi.where())
  12 +geopy.geocoders.options.default_ssl_context = ssl_ctx
13 13  
14 14  
15 15 class CachedGeocoder:
16 16  
17 17 def __init__(self, source="Nominatim", geocache="geocache.db"):
18   - self.geocoder = getattr(geopy.geocoders, source)(scheme='http')
  18 + self.geocoder = getattr(geopy.geocoders, source)(scheme='https')
19 19 self.cache = shelve.open(get_path(geocache), writeback=True)
20 20 # self.timestamp = time.time() + 1.5
21 21  
... ...
requirements.txt
... ... @@ -23,7 +23,7 @@ pyyaml==5.1.2
23 23 Markdown==3.1.1
24 24 numpy==1.18.5
25 25 enum34==1.1.6
26   -geopy==1.20.0
  26 +geopy==1.23.0
27 27 certifi==2019.11.28
28 28 python-dotenv==0.10.3
29 29  
... ...