From 350bced73da2f64b963a7014c612690bd2770200 Mon Sep 17 00:00:00 2001 From: Bertrand Bordage Date: Sun, 5 Oct 2014 01:41:24 +0200 Subject: [PATCH] Removes map for Python 3. --- cachalot/monkey_patch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cachalot/monkey_patch.py b/cachalot/monkey_patch.py index 0ba8da1..dd3d51a 100644 --- a/cachalot/monkey_patch.py +++ b/cachalot/monkey_patch.py @@ -43,7 +43,7 @@ def _get_table_cache_key(table): def _get_tables_cache_keys(query): - return map(_get_table_cache_key, _get_tables(query)) + return [_get_table_cache_key(t) for t in _get_tables(query)] def _update_tables_queries(cache, query, cache_key): @@ -71,7 +71,7 @@ def clear_cache(cache=None): if cache is None: cache = get_cache() tables = connection.introspection.table_names() - tables_cache_keys = map(_get_table_cache_key, tables) + tables_cache_keys = [_get_table_cache_key(t) for t in tables] _invalidate_tables_cache_keys(cache, tables_cache_keys)