lint_po: don't use pre-existing rply cache file
Originally created by @CyrilBrulebois on #17359 (Redmine)
Spotted by the test suite for the 4.1.1 release, this failing check:
14:32:44 cucumber features/po.feature:7 # Scenario: check all PO files
(Unless I took a wrong turn) I didn’t follow any part of the release process that updated PO files except for the release announcement (which happens after the image build anyway, in 6139fe3c) so I’m not sure I’m responsible for this; I also don’t think build check should prevent us from releasing 4.1.1, that’s why I’m opening this placeholder ticket, until a developer or a translator figures out where the problem lies.
The trace is overly long so I won’t be pasting it here, but here’s an example for a random file. This seems to happen on various pages, various languages, nothing absolutely obvious (to me, at this hour, at least):
ERROR: wiki/src/home.fr.po:
i18nspector exited with 1 - stderr:
Traceback (most recent call last):
File "/usr/bin/i18nspector", line 85, in <module>
cli.main()
File "/usr/share/i18nspector/lib/cli.py", line 225, in main
check_all(files, options=options)
File "/usr/share/i18nspector/lib/cli.py", line 137, in check_all
check_file(path, options=options)
File "/usr/share/i18nspector/lib/cli.py", line 120, in check_file
return check_regular_file(path, options=options)
File "/usr/share/i18nspector/lib/cli.py", line 71, in check_regular_file
checker_instance.check()
File "/usr/share/i18nspector/lib/check/__init__.py", line 190, in check
self.check_plurals(ctx)
File "/usr/share/i18nspector/lib/check/__init__.py", line 407, in check_plurals
(n, expr, ljunk, rjunk) = gettext.parse_plural_forms(plural_forms, strict=False)
File "/usr/share/i18nspector/lib/gettext.py", line 104, in parse_plural_forms
expr = parse_plural_expression(match.group(2))
File "/usr/share/i18nspector/lib/gettext.py", line 89, in parse_plural_expression
parser = intexpr.Parser()
File "/usr/share/i18nspector/lib/intexpr.py", line 148, in __init__
self._parser = create_parser(self._lexer)
File "/usr/share/i18nspector/lib/intexpr.py", line 142, in create_parser
return pg.build()
File "/usr/lib/python3/dist-packages/rply/parsergenerator.py", line 189, in build
data = json.load(f)
File "/usr/lib/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 342, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 3387 (char 3386)
Feature Branch: bugfix/17359-rply-cache