From 8c53fa4a47a68a7dbebbe5d94f9fc26bf2c3f34d Mon Sep 17 00:00:00 2001 From: morenol Date: Wed, 24 Jun 2020 11:55:03 -0400 Subject: [PATCH] async is a keyword in python>=3.7 (#24265) the new keyword async is causing errors when we run this with python 3.8. https://docs.python.org/3/whatsnew/3.7.html I tried in the first place, to change the definition of that value in the place where the context is defined, but it seems that it is taken from https://github.com/jazzband/django-pipeline, This solves many problems for lms and cms tests that were making the jenkins workers get timeout. That template have not seen changed since 2012, so I had to do additional changes in the templates in order to pass the xsslint checks: mako-missing-default mako-invalid-html-filter I am not sure about the remove of the safe filter. But I didn't found information about the 'safe' filter. It is probably that the now default 'h' filter is enough. --- .../pipeline_mako/templates/mako/inline_js.html | 10 +++++++--- common/djangoapps/pipeline_mako/templates/mako/js.html | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/common/djangoapps/pipeline_mako/templates/mako/inline_js.html b/common/djangoapps/pipeline_mako/templates/mako/inline_js.html index 1a231e220b..a9fbafc07c 100644 --- a/common/djangoapps/pipeline_mako/templates/mako/inline_js.html +++ b/common/djangoapps/pipeline_mako/templates/mako/inline_js.html @@ -1,9 +1,13 @@ +<%page expression_filter="h"/> +<%! from openedx.core.djangolib.js_utils import dump_js_escaped_json %> diff --git a/common/djangoapps/pipeline_mako/templates/mako/js.html b/common/djangoapps/pipeline_mako/templates/mako/js.html index ffc9355675..86c706f9ce 100644 --- a/common/djangoapps/pipeline_mako/templates/mako/js.html +++ b/common/djangoapps/pipeline_mako/templates/mako/js.html @@ -1,5 +1,6 @@ +<%page expression_filter="h"/>