summaryrefslogtreecommitdiff
path: root/mako/cache.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-09-13 23:09:06 +0200
committerFederico Caselli <cfederico87@gmail.com>2021-10-23 11:11:48 +0200
commita1d70afb5974125a1a65f590418c7c371bbdb3e6 (patch)
tree0f4d4ef4170e963aa6784a222e192d16ba753e21 /mako/cache.py
parent09cf4f68a7f7f63c2f249d61d7cc6600afe12c1a (diff)
downloadmako-workflow_test_initial_1_2.tar.gz
- remove python 2 support - add github workflows - remove disable unicode - cleanup compat file - modernize setup - use pep517 Change-Id: Ic38dbf478046cec5d0815b468f0c235b4ea5e20c
Diffstat (limited to 'mako/cache.py')
-rw-r--r--mako/cache.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/mako/cache.py b/mako/cache.py
index 26aa93e..c382aea 100644
--- a/mako/cache.py
+++ b/mako/cache.py
@@ -4,7 +4,6 @@
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
-from mako import compat
from mako import util
_cache_plugins = util.PluginLoader("mako.cache")
@@ -13,7 +12,7 @@ register_plugin = _cache_plugins.register
register_plugin("beaker", "mako.ext.beaker_cache", "BeakerCacheImpl")
-class Cache(object):
+class Cache:
"""Represents a data content cache made available to the module
space of a specific :class:`.Template` object.
@@ -66,7 +65,7 @@ class Cache(object):
def __init__(self, template, *args):
# check for a stale template calling the
# constructor
- if isinstance(template, compat.string_types) and args:
+ if isinstance(template, str) and args:
return
self.template = template
self.id = template.module.__name__
@@ -181,7 +180,7 @@ class Cache(object):
return tmpl_kw
-class CacheImpl(object):
+class CacheImpl:
"""Provide a cache implementation for use by :class:`.Cache`."""