jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/439383 )
Change subject: win32_unicode.py: Do not work around issue2128 for PY3
......................................................................
win32_unicode.py: Do not work around issue2128 for PY3
I'm having trouble working with pydev debugger on Windows because its
cmd arguments (--multiproc, --qt-support=auto, --client, --port, and
--file) are included in GetCommandLineW results. That leads to
superfluous arguments being passed to pywikibot which is sometimes
forbidden.[1] The default sys.argv does not have this issue.
issue2128 does not exist in Python 3. So at least for Python 3 we
don't need the workaround.
[1]: For example see:
https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/generate_use…
Change-Id: If7e736e09fafe78e24ca34aceed8df0d96a35d1f
---
M pywikibot/userinterfaces/win32_unicode.py
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/userinterfaces/win32_unicode.py
b/pywikibot/userinterfaces/win32_unicode.py
index 45588fe..3287e0a 100755
--- a/pywikibot/userinterfaces/win32_unicode.py
+++ b/pywikibot/userinterfaces/win32_unicode.py
@@ -337,6 +337,10 @@
_complain('exception {!r} while fixing up sys.stdout and sys.stderr'
.format(e))
+ if PY3:
+ # no need to work around issue2128 since it's a Python 2 only issue
+ return stdin, stdout, stderr, argv
+
# While we're at it, let's unmangle the command-line arguments:
# This works around <http://bugs.python.org/issue2128>.
--
To view, visit
https://gerrit.wikimedia.org/r/439383
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If7e736e09fafe78e24ca34aceed8df0d96a35d1f
Gerrit-Change-Number: 439383
Gerrit-PatchSet: 2
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot