diff options
-rw-r--r-- | doc/build/changelog.rst | 7 | ||||
-rw-r--r-- | mako/_ast_util.py | 4 | ||||
-rw-r--r-- | tox.ini | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/doc/build/changelog.rst b/doc/build/changelog.rst index 1e9e698..f330d8f 100644 --- a/doc/build/changelog.rst +++ b/doc/build/changelog.rst @@ -9,6 +9,13 @@ Changelog :version: 1.0.8 .. change:: + :tags: bug + :tickets: 281 + + Fixed an element in the AST Python generator which changed + for Python 3.8, causing expression generation to fail. + + .. change:: :tags: feature :tickets: 271 diff --git a/mako/_ast_util.py b/mako/_ast_util.py index c410287..caf157d 100644 --- a/mako/_ast_util.py +++ b/mako/_ast_util.py @@ -680,6 +680,10 @@ class SourceGenerator(NodeVisitor): def visit_Num(self, node): self.write(repr(node.n)) + # newly needed in Python 3.8 + def visit_Constant(self, node): + self.write(repr(node.n)) + def visit_Tuple(self, node): self.write('(') idx = -1 @@ -1,7 +1,7 @@ # content of: tox.ini , put in same dir as setup.py [tox] minversion=1.8.dev1 -envlist = py{26,27,34,35,36,37} +envlist = py{26,27,34,35,36,37,38} [testenv] cov_args=--cov=mako --cov-report term --cov-report xml |