aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-01-05 21:11:07 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2020-01-05 21:18:15 -0500
commit2dae7d2c3da73653e6de329dc15c55056a0b9ab6 (patch)
treebd333dce394b0b14e74326571e66ce0537eca7a8 /test
parentb06ce6ea566247b306f0531c5716e57b9c7b4876 (diff)
downloadexternal_python_mako-2dae7d2c3da73653e6de329dc15c55056a0b9ab6.tar.gz
external_python_mako-2dae7d2c3da73653e6de329dc15c55056a0b9ab6.tar.bz2
external_python_mako-2dae7d2c3da73653e6de329dc15c55056a0b9ab6.zip
Replace usage of parser.suite with ast.parse
Replaced usage of the long-superseded "parser.suite" module in the mako.util package for parsing the python magic encoding comment with the "ast.parse" function introduced many years ago in Python 2.5, as "parser.suite" is emitting deprecation warnings in Python 3.9. Additionally repair two error-detection unit tests that were using a "print" statement despite the tests running under Python 3; while the tests were passing they were no longer testing the right thing. Fixes: #310 Change-Id: Id436e2c6620438ef16b3f188b989233c82972b29
Diffstat (limited to 'test')
-rw-r--r--test/templates/unicode_runtime_error.html2
-rw-r--r--test/templates/unicode_syntax_error.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/templates/unicode_runtime_error.html b/test/templates/unicode_runtime_error.html
index 862dce5..dda7f62 100644
--- a/test/templates/unicode_runtime_error.html
+++ b/test/templates/unicode_runtime_error.html
@@ -1,2 +1,2 @@
## -*- coding: utf-8 -*-
-<% print 'Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »' + int(5/0) %> \ No newline at end of file
+<% x = 'Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »' + int(5/0) %> \ No newline at end of file
diff --git a/test/templates/unicode_syntax_error.html b/test/templates/unicode_syntax_error.html
index 982af33..aa53025 100644
--- a/test/templates/unicode_syntax_error.html
+++ b/test/templates/unicode_syntax_error.html
@@ -1,2 +1,2 @@
## -*- coding: utf-8 -*-
-<% print 'Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! » %> \ No newline at end of file
+<% x = 'Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! » %> \ No newline at end of file