From a87dc3111c5928d50414b38330a04d2dec0e7f43 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 17 Apr 2018 10:19:04 +0200 Subject: [PATCH] [IMP] doc: specify the API examples are in python2 Odoo 11 is python 3 but the xmlrpc interface works with python 2 too. The example should probably be migrated to use python 3. In the meantime specify exactly these examples are python 2 to avoid the confusion. Fixes #24232 --- doc/_extensions/odoo_ext/switcher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/_extensions/odoo_ext/switcher.py b/doc/_extensions/odoo_ext/switcher.py index 51fb604929c..8571d124259 100644 --- a/doc/_extensions/odoo_ext/switcher.py +++ b/doc/_extensions/odoo_ext/switcher.py @@ -1,7 +1,8 @@ from docutils import nodes, utils from docutils.parsers.rst import Directive -from pygments.lexers import get_lexer_by_name +from pygments.lexers import get_lexer_by_name, PythonLexer +PythonLexer.name = 'Python 2' def setup(app): app.add_directive('switcher', SwitcherDirective)