jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363329 )
Change subject: Update archivebot.py documentation
......................................................................
Update archivebot.py documentation
Noting that %(monthname)s does support local language and not only
English as stated before.
Bug: T169719
Change-Id: I7a0dd192c7b632c36a673cb7050d095d0dc8ca54
---
M scripts/archivebot.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index e6c0ca4..6fd88c6 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -61,7 +61,7 @@
%(isoweek)d ISO week number of the thread being archived
%(quarter)d quarter of the year of the thread being archived
%(month)d month (as a number 1-12) of the thread being archived
-%(monthname)s English name of the month above
+%(monthname)s localized name of the month above
%(monthnameshort)s first three letters of the name above
%(week)d week number of the thread being archived
--
To view, visit https://gerrit.wikimedia.org/r/363329
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7a0dd192c7b632c36a673cb7050d095d0dc8ca54
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio <maurelio(a)tools.wmflabs.org>
Gerrit-Reviewer: MarcoAurelio <maurelio(a)tools.wmflabs.org>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/361419 )
Change subject: [DOC] Add some documetations to page() methods
......................................................................
[DOC] Add some documetations to page() methods
Change-Id: Id61d6632ac1512c429ec3f3d7be7d221fddbfdf2
---
M pywikibot/logentries.py
1 file changed, 10 insertions(+), 4 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py
index 80cf38c..26dd3cf 100644
--- a/pywikibot/logentries.py
+++ b/pywikibot/logentries.py
@@ -97,8 +97,11 @@
"""
Page on which action was performed.
- Note: title may be missing in data dict e.g. by oversight action to
- hide the title. In that case a KeyError exception will raise
+ @note: title may be missing in data dict e.g. by oversight action to
+ hide the title. In that case a KeyError exception will raise
+
+ @rtype: pywikibot.Page
+ @raise: KeyError: title was missing from log entry
"""
if not hasattr(self, '_page'):
self._page = pywikibot.Page(self.site, self.data['title'])
@@ -138,6 +141,9 @@
This returns a User object instead of the Page object returned by the
superclass method.
+
+ @return: target user
+ @rtype: pywikibot.User
"""
if not hasattr(self, '_page'):
self._page = pywikibot.User(super(UserTargetLogEntry, self).page())
@@ -172,7 +178,7 @@
@return: the Page object of username or IP if this block action
targets a username or IP, or the blockid if this log reflects
the removal of an autoblock
- @rtype: Page or int
+ @rtype: pywikibot.Page or int
"""
# TODO what for IP ranges ?
if self.isAutoblockRemoval:
@@ -277,7 +283,7 @@
Note: title may be missing in data dict e.g. by oversight action to
hide the title. In that case a KeyError exception will raise
- @rtype: FilePage
+ @rtype: pywikibot.FilePage
@raise: KeyError: title was missing from log entry
"""
if not hasattr(self, '_page'):
--
To view, visit https://gerrit.wikimedia.org/r/361419
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id61d6632ac1512c429ec3f3d7be7d221fddbfdf2
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/361427 )
Change subject: Manual:Pywikibot is not old
......................................................................
Manual:Pywikibot is not old
Change-Id: Ibbaa13a26e785834a8885a4b5d279907fc73d393
---
M docs/index.rst
M docs/installation.rst
M docs/library_usage.rst
3 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
Framawiki: Looks good to me, but someone else must approve
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/index.rst b/docs/index.rst
index c9e3763..55fff71 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -6,7 +6,7 @@
**This documentation is incomplete**, and needs quite some work.
If you are not familiar with pywikibot, please start at the
- old documentation:
+ documentation:
`Manual:Pywikibot on mediawiki.org <https://www.mediawiki.org/wiki/Manual:Pywikibot>`_
diff --git a/docs/installation.rst b/docs/installation.rst
index 2221e95..9e24268 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -4,4 +4,4 @@
.. _installation:
.. note::
- Please see the old documentation at `Manual:Pywikibot/Installation <https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation>`_
+ Please see the documentation at `Manual:Pywikibot/Installation <https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation>`_
diff --git a/docs/library_usage.rst b/docs/library_usage.rst
index 759b795..232143d 100644
--- a/docs/library_usage.rst
+++ b/docs/library_usage.rst
@@ -2,4 +2,4 @@
------------
.. note::
- Please see the old documentation at `Manual:Pywikibot/Create your own script <https://www.mediawiki.org/wiki/Manual:Pywikibot/Create_your_own_script>`_
+ Please see the documentation at `Manual:Pywikibot/Create your own script <https://www.mediawiki.org/wiki/Manual:Pywikibot/Create_your_own_script>`_
--
To view, visit https://gerrit.wikimedia.org/r/361427
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbaa13a26e785834a8885a4b5d279907fc73d393
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Framawiki <framawiki(a)tools.wmflabs.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/362184 )
Change subject: [DOC] Fix missleading comment for UserBlocked
......................................................................
[DOC] Fix missleading comment for UserBlocked
Change-Id: Iefea1ad27bf2eb691d3e1636a3323548833e5491
---
M pywikibot/exceptions.py
1 file changed, 4 insertions(+), 5 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index 921ce86..aa249c7 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -77,7 +77,7 @@
- FamilyMaintenanceWarning: missing information in family definition
"""
#
-# (C) Pywikibot team, 2008-2015
+# (C) Pywikibot team, 2008-2017
#
# Distributed under the terms of the MIT license.
#
@@ -480,13 +480,12 @@
"""Server responded with BadTitle."""
-# UserBlocked exceptions should in general not be caught. If the bot has
-# been blocked, the bot operator should address the reason for the block
-# before continuing.
-
pass
+# UserBlocked exceptions should in general not be caught. If the bot has
+# been blocked, the bot operator should address the reason for the block
+# before continuing.
class UserBlocked(Error): # noqa
"""Your username or IP has been blocked"""
--
To view, visit https://gerrit.wikimedia.org/r/362184
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iefea1ad27bf2eb691d3e1636a3323548833e5491
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/362930 )
Change subject: [bugfix] re-enable tests for TestInterwikidataBot.test_without_repo
......................................................................
[bugfix] re-enable tests for TestInterwikidataBot.test_without_repo
Phase 1 of Wiktionary has launched in wikidata since 20th June.
Now Wiktionary pages can be linked with every item for all the Wiktionaries
namespaces (except main, citations, user and talk)
Use wikitech for the tests instead.
Bug: T169480
Change-Id: Idc7b2b6b9ff8a3c181550c6d580c4d4bdd3f2a3f
---
M tests/interwikidata_tests.py
1 file changed, 6 insertions(+), 6 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/interwikidata_tests.py b/tests/interwikidata_tests.py
index d5618db..f7e0932 100644
--- a/tests/interwikidata_tests.py
+++ b/tests/interwikidata_tests.py
@@ -47,7 +47,7 @@
'code': 'fa',
},
'wt': {
- 'family': 'wiktionary',
+ 'family': 'wikitech',
'code': 'en',
},
}
@@ -89,16 +89,16 @@
def test_without_repo(self):
"""Test throwing error when site does not have a data repo."""
wt_page = pywikibot.Page(self.wt, 'User:Ladsgroup')
- self.assertRaises(ValueError, DummyBot, generator=[wt_page], site=self.wt)
+ self.assertRaises(ValueError, DummyBot, generator=[wt_page],
+ site=self.wt)
- fa_wiktionary = pywikibot.Site('fa', 'wiktionary')
self.assertRaisesRegex(
ValueError,
- r'wiktionary:fa does not have a data repository, '
+ r'wikitech:en does not have a data repository, '
r'use interwiki\.py instead.',
interwikidata.IWBot,
- generator=[pywikibot.Page(fa_wiktionary, 'User:Dalba')],
- site=fa_wiktionary,
+ generator=[pywikibot.Page(self.wt, 'User:Dalba')],
+ site=self.wt,
)
--
To view, visit https://gerrit.wikimedia.org/r/362930
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc7b2b6b9ff8a3c181550c6d580c4d4bdd3f2a3f
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <Ladsgroup(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Multichill <maarten(a)mdammers.nl>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/362927 )
Change subject: [bugfix] Fix TestLazyLoginNotExistUsername test for Stewardwiki
......................................................................
[bugfix] Fix TestLazyLoginNotExistUsername test for Stewardwiki
login with not existing username is denied with
login result "Failed" and the reason
"The supplied credentials could not be authenticated".
Use this result to raise a NoUsername exception as expected.
Bug: T169458
Change-Id: I81f62ecaf6ee57b12d0878e7da2cab9a5a63d996
---
M pywikibot/data/api.py
M pywikibot/login.py
2 files changed, 7 insertions(+), 2 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 4c28951..acb0d19 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -3076,7 +3076,8 @@
break
else:
break
- raise APIError(code=login_result["login"]["result"], info="")
+ info = login_result['login'].get('reason', '')
+ raise APIError(code=login_result['login']['result'], info=info)
def storecookiedata(self, data):
"""Ignore data; cookies are set by threadedhttp module."""
diff --git a/pywikibot/login.py b/pywikibot/login.py
index 01ebf6b..fefbda7 100644
--- a/pywikibot/login.py
+++ b/pywikibot/login.py
@@ -3,7 +3,7 @@
"""Library to log the bot in to a wiki account."""
#
# (C) Rob W.W. Hooft, 2003
-# (C) Pywikibot team, 2003-2016
+# (C) Pywikibot team, 2003-2017
#
# Distributed under the terms of the MIT license.
#
@@ -320,6 +320,10 @@
raise NoUsername(
'Username "{0}" does not have read permissions on '
'{1}'.format(self.login_name, self.site))
+ elif e.code == 'Failed':
+ raise NoUsername(
+ 'Username "{0}" does not have read permissions on '
+ '{1}\n.{2}'.format(self.login_name, self.site, e.info))
# TODO: investigate other unhandled API codes (bug T75539)
if retry:
self.password = None
--
To view, visit https://gerrit.wikimedia.org/r/362927
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I81f62ecaf6ee57b12d0878e7da2cab9a5a63d996
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Multichill <maarten(a)mdammers.nl>
Gerrit-Reviewer: jenkins-bot <>