jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/562298 )
Change subject: Localisation updates from https://translatewiki.net.
......................................................................
Localisation updates from https://translatewiki.net.
Change-Id: Iccd83a5403ff3fc74e91ac190b532a7b44fea0dc
---
M weblinkchecker/mk.json
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
L10n-bot: Looks good to me, approved
jenkins-bot: Verified
diff --git a/weblinkchecker/mk.json b/weblinkchecker/mk.json
index 7bce4ec..aea19db 100644
--- a/weblinkchecker/mk.json
+++ b/weblinkchecker/mk.json
@@ -7,6 +7,6 @@
"weblinkchecker-archive_msg": "Оваа семрежна страница е зачувана во Семрежниот архив. Препорачуваме да ставите врска до соодветната архивирана верзија: [%(URL)s].",
"weblinkchecker-badurl": "Укажаната врска не претставува важечка URL.",
"weblinkchecker-caption": "Мртва врска",
- "weblinkchecker-report": "По неколку обиди на ботот, востановено е дека следнава надворешна врска е недостапна. Проверете дали врската е навистина мртва и, во тој случај, исправете ја или отстранете ја!",
+ "weblinkchecker-report": "По неколку обиди на ботот, утврдено е дека следнава надворешна врска е недостапна. Проверете дали врската е навистина мртва и, во тој случај, исправете ја или отстранете ја!",
"weblinkchecker-summary": "Робот: Пријавува недостапна надворешна врска"
}
--
To view, visit https://gerrit.wikimedia.org/r/562298
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iccd83a5403ff3fc74e91ac190b532a7b44fea0dc
Gerrit-Change-Number: 562298
Gerrit-PatchSet: 1
Gerrit-Owner: L10n-bot <l10n-bot(a)translatewiki.net>
Gerrit-Reviewer: L10n-bot <l10n-bot(a)translatewiki.net>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/553861 )
Change subject: [Python] Deprecation warning for Python 3.4
......................................................................
[Python] Deprecation warning for Python 3.4
Bug: T239542
Change-Id: Ie656f71cb109ec1db951562ebc2a13e3c37281da
---
M pywikibot/__init__.py
M tests/utils.py
2 files changed, 9 insertions(+), 6 deletions(-)
Approvals:
Zhuyifei1999: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 903d147..7214aa2 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -15,6 +15,7 @@
from decimal import Decimal
import math
import re
+import sys
import threading
import time
@@ -65,7 +66,7 @@
MediaWikiVersion as _MediaWikiVersion,
redirect_func,
ModuleDeprecationWrapper as _ModuleDeprecationWrapper,
- PY2,
+ PY2, PYTHON_VERSION,
UnicodeMixin,
UnicodeType
)
@@ -115,12 +116,14 @@
# T111615: Python 2 requires __all__ is bytes
globals()['__all__'] = tuple(bytes(item) for item in __all__)
- import sys
+if PY2 or PYTHON_VERSION < (3, 5, 0):
warn("""
+
Python {version} will be dropped soon.
It is recommended to use Python 3.5 or above.
-See T213287 for further information.
-""".format(version=sys.version.split(None, 1)[0]),
+See {what} for further information.
+""".format(version=sys.version.split(None, 1)[0],
+ what='T213287' if PY2 else 'T239542'),
FutureWarning) # probably adjust the line no in utils.execute()
for _name in textlib_methods:
diff --git a/tests/utils.py b/tests/utils.py
index 3f73c08..1d917cb 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -654,8 +654,8 @@
@param command: executable to run and arguments to use
@type command: list of unicode
"""
- if PY2:
- command.insert(1, '-W ignore::FutureWarning:pywikibot:124')
+ if PY2 or PYTHON_VERSION < (3, 5, 0):
+ command.insert(1, '-W ignore::FutureWarning:pywikibot:127')
if cryptography_version and cryptography_version < [1, 3, 4]:
command.insert(1, '-W ignore:Old version of cryptography:Warning')
# Any environment variables added on Windows must be of type
--
To view, visit https://gerrit.wikimedia.org/r/553861
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: Ie656f71cb109ec1db951562ebc2a13e3c37281da
Gerrit-Change-Number: 553861
Gerrit-PatchSet: 7
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/562032 )
Change subject: [cleanup] Adjust deprecation warning
......................................................................
[cleanup] Adjust deprecation warning
It is 2020 already
Change-Id: I7064d31f3f59dbf7458121bd89316080a12d2f35
---
M pywikibot/__init__.py
M tests/utils.py
2 files changed, 7 insertions(+), 8 deletions(-)
Approvals:
Zhuyifei1999: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 41911bb..903d147 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""The initialization file for the Pywikibot framework."""
#
-# (C) Pywikibot team, 2008-2019
+# (C) Pywikibot team, 2008-2020
#
# Distributed under the terms of the MIT license.
#
@@ -65,7 +65,7 @@
MediaWikiVersion as _MediaWikiVersion,
redirect_func,
ModuleDeprecationWrapper as _ModuleDeprecationWrapper,
- PY2, PYTHON_VERSION,
+ PY2,
UnicodeMixin,
UnicodeType
)
@@ -117,12 +117,11 @@
import sys
warn("""
-Python {version} will be dropped {when}.
+Python {version} will be dropped soon.
It is recommended to use Python 3.5 or above.
See T213287 for further information.
-""".format(version=sys.version.split(None, 1)[0],
- when='soon' if PYTHON_VERSION < (2, 7, 9) else 'in 2020'),
- FutureWarning)
+""".format(version=sys.version.split(None, 1)[0]),
+ FutureWarning) # probably adjust the line no in utils.execute()
for _name in textlib_methods:
target = getattr(textlib, _name)
diff --git a/tests/utils.py b/tests/utils.py
index 702130f..3f73c08 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Test utilities."""
#
-# (C) Pywikibot team, 2013-2019
+# (C) Pywikibot team, 2013-2020
#
# Distributed under the terms of the MIT license.
#
@@ -655,7 +655,7 @@
@type command: list of unicode
"""
if PY2:
- command.insert(1, '-W ignore::FutureWarning:pywikibot:125')
+ command.insert(1, '-W ignore::FutureWarning:pywikibot:124')
if cryptography_version and cryptography_version < [1, 3, 4]:
command.insert(1, '-W ignore:Old version of cryptography:Warning')
# Any environment variables added on Windows must be of type
--
To view, visit https://gerrit.wikimedia.org/r/562032
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: I7064d31f3f59dbf7458121bd89316080a12d2f35
Gerrit-Change-Number: 562032
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/513580 )
Change subject: [cleanup] Call input_choice from deprecated inputChoice function
......................................................................
[cleanup] Call input_choice from deprecated inputChoice function
Also move deprecated function closer to the renamed function
Change-Id: I39cc291777f7ab5d030d614f72cb2af69cbca640
---
M pywikibot/bot.py
1 file changed, 25 insertions(+), 30 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index e161e27..28e17e7 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -48,7 +48,7 @@
used.
"""
#
-# (C) Pywikibot team, 2008-2019
+# (C) Pywikibot team, 2008-2020
#
# Distributed under the terms of the MIT license.
#
@@ -502,6 +502,30 @@
automatic_quit=automatic_quit, force=force)
+@deprecated('input_choice', since='20140825')
+def inputChoice(question, answers, hotkeys, default=None):
+ """Ask the user a question with several options, return the user's choice.
+
+ DEPRECATED: Use L{input_choice} instead!
+
+ The user's input will be case-insensitive, so the hotkeys should be
+ distinctive case-insensitively.
+
+ @param question: a string that will be shown to the user. Don't add a
+ space after the question mark/colon, this method will do this for you.
+ @type question: basestring
+ @param answers: a list of strings that represent the options.
+ @type answers: list of basestring
+ @param hotkeys: a list of one-letter strings, one for each answer.
+ @param default: an element of hotkeys, or None. The default choice that
+ will be returned when the user just presses Enter.
+ @return: a one-letter string in lowercase.
+ @rtype: str
+ """
+ return input_choice(question, zip(answers, hotkeys), default=default,
+ automatic_quit=False)
+
+
def input_yn(question, default=None, automatic_quit=True, force=False):
"""
Ask the user a yes/no question and return the answer as a bool.
@@ -533,35 +557,6 @@
automatic_quit=automatic_quit, force=force) == 'y'
-@deprecated('input_choice', since='20140825')
-def inputChoice(question, answers, hotkeys, default=None):
- """Ask the user a question with several options, return the user's choice.
-
- DEPRECATED: Use L{input_choice} instead!
-
- The user's input will be case-insensitive, so the hotkeys should be
- distinctive case-insensitively.
-
- @param question: a string that will be shown to the user. Don't add a
- space after the question mark/colon, this method will do this for you.
- @type question: basestring
- @param answers: a list of strings that represent the options.
- @type answers: list of basestring
- @param hotkeys: a list of one-letter strings, one for each answer.
- @param default: an element of hotkeys, or None. The default choice that
- will be returned when the user just presses Enter.
- @return: a one-letter string in lowercase.
- @rtype: str
- """
- # make sure logging system has been initialized
- if not _handlers_initialized:
- init_handlers()
-
- return ui.input_choice(question=question, options=zip(answers, hotkeys),
- default=default, return_shortcut=True,
- automatic_quit=False)
-
-
def input_list_choice(question, answers, default=None, force=False):
"""
Ask the user the question and return one of the valid answers.
--
To view, visit https://gerrit.wikimedia.org/r/513580
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: I39cc291777f7ab5d030d614f72cb2af69cbca640
Gerrit-Change-Number: 513580
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/562005 )
Change subject: [IMPR] Simlify boolean assignments in Site._post_process
......................................................................
[IMPR] Simlify boolean assignments in Site._post_process
Change-Id: Ie5f34951eeb420cd7f276c1b93e5d7d9be0bf05b
---
M pywikibot/site.py
1 file changed, 4 insertions(+), 10 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index fac1d66..eb5c1ac 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -6,7 +6,7 @@
groups of wikis on the same topic in different languages.
"""
#
-# (C) Pywikibot team, 2008-2019
+# (C) Pywikibot team, 2008-2020
#
# Distributed under the terms of the MIT license.
#
@@ -1489,21 +1489,15 @@
if prop in Siteinfo.BOOLEAN_PROPS.keys():
# siprop=namespaces and
# magicwords has properties per item in result
- if prop == 'namespaces' or prop == 'magicwords':
+ if prop in ('namespaces', 'magicwords'):
for index, value in enumerate(data):
# namespaces uses a dict, while magicwords uses a list
key = index if type(data) is list else value
for p in Siteinfo.BOOLEAN_PROPS[prop]:
- if p in data[key]:
- data[key][p] = True
- else:
- data[key][p] = False
+ data[key][p] = p in data[key]
else:
for p in Siteinfo.BOOLEAN_PROPS[prop]:
- if p in data:
- data[p] = True
- else:
- data[p] = False
+ data[p] = p in data
def _get_siteinfo(self, prop, expiry):
"""
--
To view, visit https://gerrit.wikimedia.org/r/562005
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: Ie5f34951eeb420cd7f276c1b93e5d7d9be0bf05b
Gerrit-Change-Number: 562005
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/557548 )
Change subject: [IMPR] Skip transferbot script if unknown arguments are given
......................................................................
[IMPR] Skip transferbot script if unknown arguments are given
Change-Id: I0cc53bdf21459a388b27056c969e13add1ccb619
---
M scripts/transferbot.py
1 file changed, 2 insertions(+), 6 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/transferbot.py b/scripts/transferbot.py
index eff9df1..209717c 100755
--- a/scripts/transferbot.py
+++ b/scripts/transferbot.py
@@ -47,7 +47,7 @@
"""
#
# (C) Merlijn van Deen, 2014
-# (C) Pywikibot team, 2014-2019
+# (C) Pywikibot team, 2014-2020
#
# Distributed under the terms of the MIT license.
#
@@ -101,16 +101,12 @@
else fromsite)
unknown_args = [arg for arg in gen_args if not gen_factory.handleArg(arg)]
- if unknown_args:
- for item in unknown_args:
- gen_args.remove(item)
-
gen = gen_factory.getCombinedGenerator()
suggest_help(missing_generator=not gen,
additional_text=additional_text,
unknown_parameters=unknown_args)
- if additional_text or not gen:
+ if additional_text or not gen or unknown_args:
return
gen_args = ' '.join(gen_args)
--
To view, visit https://gerrit.wikimedia.org/r/557548
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: I0cc53bdf21459a388b27056c969e13add1ccb619
Gerrit-Change-Number: 557548
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)