Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/181247
Change subject: [BUGFIX] Do not inherit future statements from pwb.y ...................................................................... [BUGFIX] Do not inherit future statements from pwb.y https://gerrit.wikimedia.org/r/#/c/173713/ imports print_statement from future. This causes customized scripts to fail with syntax error. compiling with dont_inherit flag set prevents this. Bug: T85053 Change-Id: I6f0b3e8c598986a2828ab545758c251d3d592bf6 --- M pwb.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/47/181247/1 diff --git a/pwb.py b/pwb.py index ec6840a..1b2cb3e 100644 --- a/pwb.py +++ b/pwb.py @@ -77,7 +77,8 @@ try: source = open(filename).read() - exec(compile(source, filename, "exec"), main_mod.__dict__) + exec(compile(source, filename, "exec", dont_inherit=True), + main_mod.__dict__) finally: # Restore the old __main__ sys.modules['__main__'] = old_main_mod -- To view, visit https://gerrit.wikimedia.org/r/181247 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6f0b3e8c598986a2828ab545758c251d3d592bf6 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
