Skip to content
Snippets Groups Projects
Commit 35bb8304 authored by Xavier Morel's avatar Xavier Morel
Browse files

[FIX] doc: building on Python 3.6.7, 3.7.1, possibly 2.7.???

https://bugs.python.org/issue33899

tokenize.generate_tokens was altered to match the C tokenizer,
previously it would end the tokenization with just an ENDMARKER, in the
titled releases it adds a NEWLINE before the ENDMARKER if none is
present, this broke the parsing of jsdoc type specifications as Python's
tokenizer is used under the cover.

closes odoo/odoo#28056
parent eef4c3b4
Branches
Tags
No related merge requests found
......@@ -44,6 +44,8 @@ def tokenize(typespec):
yield (LITERAL, ast.literal_eval(string))
elif toktype == token.ENDMARKER:
return
elif toktype == token.NEWLINE:
pass
else:
raise ValueError("Unknown typespec token %s" % token.tok_name[toktype])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment