aboutsummaryrefslogtreecommitdiffstats
path: root/mako/template.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-07-27 12:01:10 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-07-27 12:34:21 -0400
commit338cad687a1f49b021e81d33fd16847a4c5c7731 (patch)
treeceb6b8a2574a950705b8421913fe380a797d05a6 /mako/template.py
parenta79fbaad5fe507e6fce76c891d0793444be6d6e1 (diff)
downloadexternal_python_mako-338cad687a1f49b021e81d33fd16847a4c5c7731.tar.gz
external_python_mako-338cad687a1f49b021e81d33fd16847a4c5c7731.tar.bz2
external_python_mako-338cad687a1f49b021e81d33fd16847a4c5c7731.zip
Bump Python versions, remove conditional imports
Mako 1.1 now supports Python versions: * 2.7 * 3.4 and higher This includes that setup.py no longer includes any conditionals, allowing for a pure Python wheel build, however this is not necessarily part of the Pypi release process as of yet. The test suite also raises for Python deprecation warnings. Fixes: #249 Replaced usage of ``inspect.getfullargspec()`` with the vendored version used by SQLAlchemy, Alembic to avoid future deprecation warnings. Also cleans up an additional version of the same function that's apparently been floating around for some time. Fixes: #295 Change-Id: I98274c16b6022289d1890f4daf532bab323ab112
Diffstat (limited to 'mako/template.py')
-rw-r--r--mako/template.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mako/template.py b/mako/template.py
index 8e87d50..937d15b 100644
--- a/mako/template.py
+++ b/mako/template.py
@@ -7,6 +7,7 @@
"""Provides the Template class, a facade for parsing, generating and executing
template strings, as well as template runtime operations."""
+import json
import os
import re
import shutil
@@ -659,7 +660,7 @@ class ModuleInfo(object):
source_map = re.search(
r"__M_BEGIN_METADATA(.+?)__M_END_METADATA", module_source, re.S
).group(1)
- source_map = compat.json.loads(source_map)
+ source_map = json.loads(source_map)
source_map["line_map"] = dict(
(int(k), int(v)) for k, v in source_map["line_map"].items()
)