jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Use Python 2.6 compatible unicodecsv version
......................................................................
[FIX] Use Python 2.6 compatible unicodecsv version
The oldest version of unicodecsv which supports Python 2.6 is 0.13.0. This is
now forcing that not a newer version is installed when Python 2.6 is used.
Bug: T113222
Change-Id: I6dc6608e23770e833cfe439f94912eecf26a0e17
---
M requirements.txt
M setup.py
2 files changed, 4 insertions(+), 2 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/requirements.txt b/requirements.txt
index e6cc25a..c7db758 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -45,7 +45,8 @@
git+https://github.com/nlhepler/pydot#egg=pydot-1.0.29
# wikistats.py and scripts
-unicodecsv ; python_version < '3'
+unicodecsv<=0.13 ; python_version < '2.7'
+unicodecsv ; python_version < '3' and python_version >= '2.7'
# cosmetic_changes and scripts/isbn
python-stdnum
diff --git a/setup.py b/setup.py
index 8fe7a0e..2a2d63f 100644
--- a/setup.py
+++ b/setup.py
@@ -40,6 +40,7 @@
# the irc module has no Python 2.6 support since 10.0
irc_dep = 'irc==8.9' if sys.version_info < (2, 7) else 'irc'
+csv_dep = 'unicodecsv<=0.13' if PYTHON_VERSION < (2, 7) else 'unicodecsv'
extra_deps = {
# Core library dependencies
@@ -59,7 +60,7 @@
if PY2:
# Additional core library dependencies which are only available on Python 2
extra_deps.update({
- 'csv': ['unicodecsv'],
+ 'csv': [csv_dep],
'MySQL': ['oursql'],
'unicode7': ['unicodedata2>=7.0.0-2'],
})
--
To view, visit https://gerrit.wikimedia.org/r/239812
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6dc6608e23770e833cfe439f94912eecf26a0e17
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Skip auto translations for -wiktionary mode
......................................................................
[FIX] Skip auto translations for -wiktionary mode
In -wiktionary mode, pages are only linked if they have the exact same title.
Currently, auto translation occurs even with -wiktionary.
This is wrong as it hints a link to a likely different title in another wiki.
In this patch, auto translation is disabled if -wiktionary is specified.
Bug: T108904
Change-Id: I62b1dc7981b257cf4e7162db9bc32bc01d1f44c0
---
M scripts/interwiki.py
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
XZise: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 5e51723..4fb3120 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -537,6 +537,9 @@
self.same = True
elif arg == '-wiktionary':
self.same = 'wiktionary'
+ # Don't use auto-translation in -wiktionary mode
+ # where page titles must be the same
+ self.auto = False
elif arg == '-repository':
self.repository = True
elif arg == '-untranslated':
--
To view, visit https://gerrit.wikimedia.org/r/238435
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I62b1dc7981b257cf4e7162db9bc32bc01d1f44c0
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Malafaya <malafaya(a)clix.pt>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: ui_tests: limit retries in testOutputUnicodeText_no_transliterate
......................................................................
ui_tests: limit retries in testOutputUnicodeText_no_transliterate
The old code could loop infinitly. The maximum number of retries
is now limited to 3 (= at least 3 seconds) which should be enough
for all practical purposes.
The test was adapted from requiring 'Alpha' on the first line to
requiring 'Alpha' somewhere in the return value, as output before
the first expected line is a regular issue.
In addition, changed incorrect ctrl-L to alt-L to select the font
selector. This still probably only works for a Dutch Windows
version, so we might want to consider doing this either manually
or with a direct Win32 API function (assuming we won't test on
WinXP)
Change-Id: I87e40f0c200a5cbd181df5e4112055e38650414a
---
M tests/ui_tests.py
1 file changed, 10 insertions(+), 2 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/ui_tests.py b/tests/ui_tests.py
index e47fdbe..138afb2 100644
--- a/tests/ui_tests.py
+++ b/tests/ui_tests.py
@@ -544,7 +544,7 @@
% e)
try:
- window.TypeKeys('% {UP}{ENTER}^L{HOME}L{ENTER}', with_spaces=True)
+ window.TypeKeys('% {UP}{ENTER}%L{HOME}L{ENTER}', with_spaces=True)
except Exception as e:
cls.tearDownProcess()
raise unittest.SkipTest('Windows package pywinauto could not use window TypeKeys: %r'
@@ -666,8 +666,16 @@
u"pywikibot.output(u'\\n'.join(pywikibot.handleArgs()))\" "
u"Alpha Bετα Гамма دلتا\n")
lines = []
- while len(lines) < 4 or lines[0] != 'Alpha':
+
+ for i in range(3):
lines = self.getstdouterr().split('\n')
+ if len(lines) >= 4 and 'Alpha' not in lines:
+ # if len(lines) < 4, we assume not all lines had been output
+ # yet, and retry. We check at least one of the lines contains
+ # "Alpha" to prevent using older clipboard content. We limit
+ # the number of retries to 3 so that the test will finish even
+ # if neither of these requirements are met.
+ break
time.sleep(1)
# empty line is the new command line
--
To view, visit https://gerrit.wikimedia.org/r/239755
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I87e40f0c200a5cbd181df5e4112055e38650414a
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>