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
--
To view, visit https://gerrit.wikimedia.org/r/181247
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6f0b3e8c598986a2828ab545758c251d3d592bf6
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: XZise <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits