jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/415248 )
Change subject: logging.py: Add a last resort logging handler for python 2
......................................................................
logging.py: Add a last resort logging handler for python 2
Python 3 loggers already have a lastResort handler.[1] This patch adds a
similar one for them in Python 2.
The config uses the warning logger, but its handler is not initialized at
that point. Loggers get initialized inside bot.py, but we cannot use those
initializer inside config2.py because of circular dependency issue.
[1]: https://docs.python.org/3.2/library/logging.html#logging.lastResort
Bug: T188417
Change-Id: I24ce4de6c4bec5ece6401aa14227add713c60659
---
M pywikibot/logging.py
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/logging.py b/pywikibot/logging.py
index e576d3b..fe66905 100644
--- a/pywikibot/logging.py
+++ b/pywikibot/logging.py
@@ -12,7 +12,8 @@
import sys
# logging levels
-from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
+from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL, StreamHandler
+
STDOUT = 16
VERBOSE = 18
INPUT = 25
@@ -73,6 +74,9 @@
else:
logger = logging.getLogger("pywiki")
+ if not logger.handlers: # lastResort for Python 2 (T188417)
+ logger.handlers.append(StreamHandler())
+
# invoke any init routines
if _init_routines:
_init()
--
To view, visit https://gerrit.wikimedia.org/r/415248
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I24ce4de6c4bec5ece6401aa14227add713c60659
Gerrit-Change-Number: 415248
Gerrit-PatchSet: 5
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: 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 <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/414696 )
Change subject: patrol.py: Document options which are not documented
......................................................................
patrol.py: Document options which are not documented
Bug: T188234
Change-Id: I185b51b8aa15b3c354d49c0749f4cdd4d9e04867
---
M scripts/patrol.py
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/patrol.py b/scripts/patrol.py
index f21be42..ca988bc 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -38,10 +38,16 @@
-whitelist page title for whitelist (optional)
-autopatroluserns Takes user consent to automatically patrol
-versionchecktime Check versionchecktime lapse in sec
+-repeat Repeat run after 60 seconds
+-newpages Run on unpatrolled new pages
+ (default for Wikipedia Projects)
+-recentchanges Run on complete unpatrolled recentchanges
+ (default for any project except Wikipedia Projects)
+-usercontribs Filter generators above to the given user
"""
#
-# (C) Pywikibot team, 2011-2017
+# (C) Pywikibot team, 2011-2018
#
# Distributed under the terms of the MIT license.
#
--
To view, visit https://gerrit.wikimedia.org/r/414696
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I185b51b8aa15b3c354d49c0749f4cdd4d9e04867
Gerrit-Change-Number: 414696
Gerrit-PatchSet: 5
Gerrit-Owner: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Framawiki <framawiki(a)tools.wmflabs.org>
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 <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/414832 )
Change subject: [IMPR] Modify 'unusedfiles' bot summary
......................................................................
[IMPR] Modify 'unusedfiles' bot summary
The current summary for the unusedfiles.py is misleading. An orphan file
does not necesarily mean that the file will be deleted. Yet the summary
that this script uses ("images for elimination") implies that. Modern
wiki installations also do allow nowadays the uploading of several types
of multimedia files. Therefore proposing a more accurate "tagging file
as orphaned" summary for this script. This patch also mades a syntax
change, changing spaces to use tabs.
Change-Id: I23c4d3717c7507b6c007748bda156806bb854f4f
---
M unusedfiles/en.json
1 file changed, 7 insertions(+), 6 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/unusedfiles/en.json b/unusedfiles/en.json
index 9a71ae9..055d0f6 100644
--- a/unusedfiles/en.json
+++ b/unusedfiles/en.json
@@ -1,8 +1,9 @@
{
- "@metadata": {
- "authors": [
- "Leonardo Gregianin"
- ]
- },
- "unusedfiles-comment": "Bot: images for elimination"
+ "@metadata": {
+ "authors": [
+ "Leonardo Gregianin",
+ "MarcoAurelio"
+ ]
+ },
+ "unusedfiles-comment": "Bot: tagging file as orphaned"
}
--
To view, visit https://gerrit.wikimedia.org/r/414832
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I23c4d3717c7507b6c007748bda156806bb854f4f
Gerrit-Change-Number: 414832
Gerrit-PatchSet: 2
Gerrit-Owner: MarcoAurelio <maurelio(a)tools.wmflabs.org>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Siebrand <siebrand(a)kitano.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/413763 )
Change subject: [doc] update intro
......................................................................
[doc] update intro
To remove this "more intro" at the bottom of the doc.
Sentence inspired by https://www.mediawiki.org/wiki/Manual:Pywikibot page
Change-Id: I849ce5ee2f6e67d384af6d7e12cfd24de5ab35c5
---
M docs/index.rst
1 file changed, 8 insertions(+), 7 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/index.rst b/docs/index.rst
index 67a28c5..4e60261 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,16 +1,17 @@
-Welcome to pywikibot!
+Welcome to Pywikibot!
=====================
.. warning::
**This documentation is incomplete**, and needs quite some work.
-
- If you are not familiar with pywikibot, please start at the
- documentation:
- `Manual:Pywikibot on mediawiki.org <https://www.mediawiki.org/wiki/Manual:Pywikibot>`_
-
-Pywikibot is a full-stack framework for editing `MediaWiki <https://mediawiki.org>`_ wiki's. (more intro)
+ If you are not familiar with Pywikibot, please start at the
+ documentation:
+
+ `Manual:Pywikibot on mediawiki.org <https://www.mediawiki.org/wiki/Manual:Pywikibot>`_
+
+
+Pywikibot is a Python library and collection of scripts that automate work on `MediaWiki <https://mediawiki.org>`_ sites.
Pywikibot supports Python 2.6.5+, 2.7.2+ and 3.3+.
--
To view, visit https://gerrit.wikimedia.org/r/413763
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I849ce5ee2f6e67d384af6d7e12cfd24de5ab35c5
Gerrit-Change-Number: 413763
Gerrit-PatchSet: 4
Gerrit-Owner: Framawiki <framawiki(a)tools.wmflabs.org>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Framawiki <framawiki(a)tools.wmflabs.org>
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 <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406766 )
Change subject: [IMPR] transferbot: link to history subpage from summary
......................................................................
[IMPR] transferbot: link to history subpage from summary
Two cases for the /edithistory subpage link:
-if target page namespace allows subpages, we can create an implicit link [[/subpage]]
-else we need to copy the full page prefix title like [[page/subpage]]
Bug: T166516
Change-Id: I6aae0279b09aa0627685add0b1b3fd1ce92807f9
---
M scripts/transferbot.py
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Zoranzoki21: Looks good to me, but someone else must approve
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/transferbot.py b/scripts/transferbot.py
index e727e64..0a165cb 100755
--- a/scripts/transferbot.py
+++ b/scripts/transferbot.py
@@ -36,7 +36,7 @@
"""
#
# (C) Merlijn van Deen, 2014
-# (C) Pywikibot team, 2015-2017
+# (C) Pywikibot team, 2015-2018
#
# Distributed under the terms of the MIT license.
#
@@ -134,10 +134,13 @@
'gen_args': gen_args, 'prefix': prefix})
for page in gen:
- summary = 'Moved page from %s' % page.title(asLink=True, insite=tosite)
targetpage = pywikibot.Page(tosite, prefix + page.title())
edithistpage = pywikibot.Page(tosite, prefix + page.title() +
'/edithistory')
+ summary = 'Moved page from {old} ([[{new}/edithistory|history]])'\
+ .format(old=page.title(asLink=True, insite=tosite),
+ new=targetpage.title() if not
+ targetpage.namespace().subpages else '')
if targetpage.exists() and not overwrite:
pywikibot.output(
--
To view, visit https://gerrit.wikimedia.org/r/406766
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6aae0279b09aa0627685add0b1b3fd1ce92807f9
Gerrit-Change-Number: 406766
Gerrit-PatchSet: 6
Gerrit-Owner: Framawiki <framawiki(a)tools.wmflabs.org>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Framawiki <framawiki(a)tools.wmflabs.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>