diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-01-05 21:11:07 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-01-05 21:18:15 -0500 |
commit | 2dae7d2c3da73653e6de329dc15c55056a0b9ab6 (patch) | |
tree | bd333dce394b0b14e74326571e66ce0537eca7a8 /test/templates/unicode_syntax_error.html | |
parent | b06ce6ea566247b306f0531c5716e57b9c7b4876 (diff) | |
download | external_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/templates/unicode_syntax_error.html')
-rw-r--r-- | test/templates/unicode_syntax_error.html | 2 |
1 files changed, 1 insertions, 1 deletions
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 |