From 4302167939767e713388c49d8af3cefe27695629 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Wed, 23 Aug 2017 20:47:47 +0500 Subject: [PATCH] Used frozenset instead of dict for GeoIP2.cache_options for simplicity. --- django/contrib/gis/geoip2/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/gis/geoip2/base.py b/django/contrib/gis/geoip2/base.py index 40b45fd72b..b1035ac6ff 100644 --- a/django/contrib/gis/geoip2/base.py +++ b/django/contrib/gis/geoip2/base.py @@ -33,7 +33,7 @@ class GeoIP2: MODE_FILE = 4 # Load database into memory. Pure Python. MODE_MEMORY = 8 - cache_options = {opt: None for opt in (0, 1, 2, 4, 8)} + cache_options = frozenset((MODE_AUTO, MODE_MMAP_EXT, MODE_MMAP, MODE_FILE, MODE_MEMORY)) # Paths to the city & country binary databases. _city_file = ''