jenkins-bot has submitted this change and it was merged.
Change subject: Disable blockpageschecker for English Wikipedia
......................................................................
Disable blockpageschecker for English Wikipedia
- some configurations are missing, therefor exclude en-wiki
- test for given L10N and halt script when missing requirements
Bug: T70153
Change-Id: Ia6d2e534f75f874ce7f5541dd078c91b1d419925
---
M scripts/blockpageschecker.py
1 file changed, 20 insertions(+), 8 deletions(-)
Approvals:
Ladsgroup: Looks good to me, approved
Xqt: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py
index 8c4f51a..66824e5 100755
--- a/scripts/blockpageschecker.py
+++ b/scripts/blockpageschecker.py
@@ -50,7 +50,7 @@
# (C) Monobi a.k.a. Wikihermit, 2007
# (C) Filnik, 2007-2011
# (C) Nicolas Dumazet (NicDumZ), 2008-2009
-# (C) Pywikibot team, 2007-2015
+# (C) Pywikibot team, 2007-2016
#
# Distributed under the terms of the MIT license.
#
@@ -79,7 +79,6 @@
# PREFERENCES
templateSemiProtection = {
- 'en': None,
'it': [r'\{\{(?:[Tt]emplate:|)[Aa]vvisobloccoparziale(?:|[ _]scad\|.*?|\|.*?)\}\}',
r'\{\{(?:[Tt]emplate:|)[Aa]bp(?:|[ _]scad\|(?:.*?))\}\}'],
'fr': [r'\{\{(?:[Tt]emplate:|' + u'[Mm]odèle:' +
@@ -89,7 +88,6 @@
}
# Regex to get the total-protection template
templateTotalProtection = {
- 'en': None,
'it': [r'\{\{(?:[Tt]emplate:|)[Aa]vvisoblocco(?:|[ _]scad\|(?:.*?)|minaccia|cancellata)\}\}',
r'\{\{(?:[Tt]emplate:|)(?:[Cc][Tt]|[Cc]anc fatte|[Cc][Ee])\}\}',
r'<div class="toccolours[ _]itwiki[ _]template[ _]avviso">(?:\s|\n)*?[Qq]uesta pagina'],
@@ -103,7 +101,6 @@
# Regex to get the semi-protection move template
templateSemiMoveProtection = {
- 'en': None,
'it': [r'\{\{(?:[Tt]emplate:|)[Aa]vvisobloccospostamento(?:|[ _]scad\|.*?|\|.*?)\}\}'],
'ja': [r'(?<!\<nowiki\>)\{\{(?:[Tt]emplate:|)' + u'移動半保護' +
r'(?:[Ss]|)(?:\|.+|)\}\}(?!\<\/nowiki\>)\s*(?:\r\n|)*'],
@@ -111,7 +108,6 @@
# Regex to get the total-protection move template
templateTotalMoveProtection = {
- 'en': None,
'it': [r'\{\{(?:[Tt]emplate:|)[Aa]vvisobloccospostamento(?:|[ _]scad\|.*?|\|.*?)\}\}'],
'ja': [r'(?<!\<nowiki\>)\{\{(?:[Tt]emplate:|)' + u'移動保護' +
r'(?:[Ss]|)(?:\|.+|)\}\}(?!\<\/nowiki\>)\s*(?:\r\n|)*'],
@@ -121,7 +117,6 @@
# You may use only one template or an unique template and some other "old"
# template that the script should still check (as on it.wikipedia)
templateUnique = {
- 'en': None,
'it': [r'\{\{(?:[Tt]emplate:|)[Pp]rotetta\}\}'],
}
@@ -136,7 +131,7 @@
# Category where the bot will check
categoryToCheck = {
- 'en': [u'Category:Protected'],
+ 'en': [u'Category:Wikipedia protected pages'],
'ar': [u'تصنيف:محتويات محمية'],
'fr': [u'Category:Page semi-protégée', u'Category:Page protégée',
u'Catégorie:Article protégé'],
@@ -153,7 +148,7 @@
}
# Check list to block the users that haven't set their preferences
-project_inserted = ['en', 'fr', 'it', 'ja', 'pt', 'zh']
+project_inserted = ['fr', 'it', 'ja', 'pt', 'zh']
# END PREFERENCES
@@ -327,6 +322,12 @@
if not editRestr:
# page is not edit-protected
# Deleting the template because the page doesn't need it.
+ if not (TTP or TSP):
+ raise pywikibot.Error(
+ 'This script is not localized to use it on \n{0}. '
+ 'Missing "templateSemiProtection" or'
+ '"templateTotalProtection"'.format(site.sitename))
+
if TU:
replaceToPerform = u'|'.join(TTP + TSP + TU)
else:
@@ -349,6 +350,12 @@
msg += ', skipping...'
pywikibot.output(msg)
else:
+ if not TNR or TU and not TNR[4] or not (TU or TNR[1]):
+ raise pywikibot.Error(
+ 'This script is not localized to use it on \n{0}. '
+ 'Missing "templateNoRegex"'.format(
+ site.sitename))
+
pywikibot.output(u'The page is protected to the sysop, but the '
u'template seems not correct. Fixing...')
if TU:
@@ -365,6 +372,11 @@
msg += ', skipping...'
pywikibot.output(msg)
else:
+ if not TNR or TU and not TNR[4] or not (TU or TNR[1]):
+ raise pywikibot.Error(
+ 'This script is not localized to use it on \n{0}. '
+ 'Missing "templateNoRegex"'.format(
+ site.sitename))
pywikibot.output(u'The page is editable only for the '
u'autoconfirmed users, but the template '
u'seems not correct. Fixing...')
--
To view, visit https://gerrit.wikimedia.org/r/211650
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6d2e534f75f874ce7f5541dd078c91b1d419925
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <ladsgroup(a)gmail.com>
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: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: socketIO_client 0.5.6 is needed for socket-io 0.9 protokoll
......................................................................
socketIO_client 0.5.6 is needed for socket-io 0.9 protokoll
See T91393, T68232, T125059
Change-Id: Ic3ed52ccdae65dc44f4f5f495f4fc2f6e2d413c2
---
M pywikibot/comms/rcstream.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/comms/rcstream.py b/pywikibot/comms/rcstream.py
index 95056fd..02cbd6b 100644
--- a/pywikibot/comms/rcstream.py
+++ b/pywikibot/comms/rcstream.py
@@ -171,8 +171,8 @@
"""
if isinstance(socketIO_client, Exception):
- raise ImportError('socketIO_client is required for the rc stream; '
- 'install it with pip install socketIO_client')
+ raise ImportError('socketIO_client is required for the rc stream;\n'
+ 'install it with pip install "socketIO_client==0.5.6"')
rc_thread = RcListenerThread(
wikihost=wikihost,
--
To view, visit https://gerrit.wikimedia.org/r/267220
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3ed52ccdae65dc44f4f5f495f4fc2f6e2d413c2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [BREAK] Solve -user argument conflict
......................................................................
[BREAK] Solve -user argument conflict
-user is a global option; rename the local implementation
Bug: T87635
Change-Id: Ifb07f1e0d2ddc0e7cb780e21565cdaa04860c5d2
---
M scripts/template.py
1 file changed, 8 insertions(+), 8 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
Mpaa: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/template.py b/scripts/template.py
index fba031c..783da18 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -29,13 +29,13 @@
info will be loaded from the maintenance page of the live wiki.
argument can also be given as "-xml:filename.xml".
--user: Only process pages edited by a given user
+-onlyuser: Only process pages edited by a given user
-skipuser: Only process pages not edited by a given user
--timestamp: (With -user or -skipuser). Only check for a user where his edit is
- not older than the given timestamp. Timestamp must be writen in
- MediaWiki timestamp format which is "%Y%m%d%H%M%S"
+-timestamp: (With -onlyuser or -skipuser). Only check for a user where his
+ edit is not older than the given timestamp. Timestamp must be
+ writen in MediaWiki timestamp format which is "%Y%m%d%H%M%S".
If this parameter is missed, all edits are checked but this is
restricted to the last 100 edits.
@@ -102,8 +102,8 @@
#
# (C) Daniel Herding, 2004
# (C) Rob W.W. Hooft, 2003-2005
-# (C) xqt, 2009-2015
-# (C) Pywikibot team, 2004-2015
+# (C) xqt, 2009-2016
+# (C) Pywikibot team, 2004-2016
#
# Distributed under the terms of the MIT license.
#
@@ -301,8 +301,8 @@
options['addedCat'] = arg[len('-addcat:'):]
elif arg.startswith('-summary:'):
options['summary'] = arg[len('-summary:'):]
- elif arg.startswith('-user:'):
- user = arg[len('-user:'):]
+ elif arg.startswith('-onlyuser:'):
+ user = arg[len('-onlyuser:'):]
elif arg.startswith('-skipuser:'):
user = arg[len('-skipuser:'):]
skip = True
--
To view, visit https://gerrit.wikimedia.org/r/266212
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb07f1e0d2ddc0e7cb780e21565cdaa04860c5d2
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: remove UI.askForCaptcha
......................................................................
remove UI.askForCaptcha
Terminal's UI.askForCaptcha is used in compat, but unused in core.
it is removed as unused.
Bug: T122194
Change-Id: If11306342286ce04ec916455fa6dcb71572c229b
---
M pywikibot/bot.py
M pywikibot/userinterfaces/terminal_interface_base.py
2 files changed, 1 insertion(+), 22 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 80905bf..18436db 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -162,7 +162,7 @@
# level name.
#
# UserInterface objects must also define methods input(), input_choice(),
-# editText(), and askForCaptcha(), all of which are documented in
+# and editText(), all of which are documented in
# userinterfaces/terminal_interface.py
_handlers_initialized = False
diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py
index 81fd1dd..2fbe1a8 100755
--- a/pywikibot/userinterfaces/terminal_interface_base.py
+++ b/pywikibot/userinterfaces/terminal_interface_base.py
@@ -433,27 +433,6 @@
editor = gui.EditBoxWindow()
return editor.edit(text, jumpIndex=jumpIndex, highlight=highlight)
- def askForCaptcha(self, url):
- """Show the user a CAPTCHA image and return the answer."""
- try:
- import webbrowser
- pywikibot.output(u'Opening CAPTCHA in your web browser...')
- if webbrowser.open(url):
- return pywikibot.input(
- u'What is the solution of the CAPTCHA that is shown in '
- u'your web browser?')
- else:
- raise webbrowser.Error(
- 'webbrowser.open failed to open a web browser')
- except Exception:
- pywikibot.output(u'Error in opening web browser: %s'
- % sys.exc_info()[0])
- pywikibot.output(
- u'Please copy this url to your web browser and open it:\n %s'
- % url)
- return pywikibot.input(
- u'What is the solution of the CAPTCHA at this url ?')
-
def argvu(self):
"""Return the decoded arguments from argv."""
try:
--
To view, visit https://gerrit.wikimedia.org/r/266083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If11306342286ce04ec916455fa6dcb71572c229b
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>