jenkins-bot has submitted this change and it was merged.
Change subject: [BUGFIX] Do not inherit future statements from pwb.py ......................................................................
[BUGFIX] Do not inherit future statements from pwb.py
08ac2d7 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(-)
Approvals: John Vandenberg: Looks good to me, approved XZise: Looks good to me, but someone else must approve jenkins-bot: Verified
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
pywikibot-commits@lists.wikimedia.org