jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/408487 )
Change subject: [doc] Prepare next release
......................................................................
[doc] Prepare next release
Change-Id: I4630ed67a778cd2b54b1e8a4cee610f89bbd57ef
---
M HISTORY.rst
M docs/conf.py
2 files changed, 8 insertions(+), 2 deletions(-)
Approvals:
Framawiki: Looks good to me, approved
jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst
index e2bbd3c..f829df2 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -4,6 +4,12 @@
Current release
---------------
+* Bugfixes and improvements
+* Localisation updates
+
+3.0.20180204
+------------
+
* Deprecation warning: support for py2.6 and py3.3 will be dropped
* Bugfixes and improvements
* Localisation updates
diff --git a/docs/conf.py b/docs/conf.py
index 60cfe23..85380aa 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -54,7 +54,7 @@
# General information about the project.
project = 'Pywikibot'
-copyright = '2017, Pywikibot team'
+copyright = '2003-2018, Pywikibot team'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -63,7 +63,7 @@
# The short X.Y version.
version = '3.0'
# The full version, including alpha/beta/rc tags.
-release = '3.0.20170713'
+release = '3.0.20180204'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
--
To view, visit https://gerrit.wikimedia.org/r/408487
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4630ed67a778cd2b54b1e8a4cee610f89bbd57ef
Gerrit-Change-Number: 408487
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Framawiki <framawiki(a)tools.wmflabs.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
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/407917 )
Change subject: [bugfix] Fix using templatesWithParams results
......................................................................
[bugfix] Fix using templatesWithParams results
- templatesWithParams gives a Page object as first tuple item but not a string
use it's title to compare it
- follow pep8 naming convention for the method variables
Bug: T186412
Change-Id: I270de96d9364f823134eaa744fe6eaca2066b24e
---
M pywikibot/login.py
1 file changed, 9 insertions(+), 9 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/login.py b/pywikibot/login.py
index 6b133fb..478cb20 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-2017
+# (C) Pywikibot team, 2003-2018
#
# Distributed under the terms of the MIT license.
#
@@ -165,17 +165,17 @@
"""
if self.site.family.name in botList \
and self.site.code in botList[self.site.family.name]:
- botListPageTitle, botTemplate = botList[
+ botlist_pagetitle, bot_template_title = botList[
self.site.family.name][self.site.code]
- botListPage = pywikibot.Page(self.site, botListPageTitle)
- if botTemplate:
- for template in botListPage.templatesWithParams():
- if template[0] == botTemplate \
- and template[1][0] == self.username:
+ botlist_page = pywikibot.Page(self.site, botlist_pagetitle)
+ if bot_template_title:
+ for template, params in botlist_page.templatesWithParams():
+ if (template.title() == bot_template_title
+ and params[0] == self.username):
return True
else:
- for linkedPage in botListPage.linkedPages():
- if linkedPage.title(withNamespace=False) == self.username:
+ for linked_page in botlist_page.linkedPages():
+ if linked_page.title(withNamespace=False) == self.username:
return True
return False
else:
--
To view, visit https://gerrit.wikimedia.org/r/407917
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I270de96d9364f823134eaa744fe6eaca2066b24e
Gerrit-Change-Number: 407917
Gerrit-PatchSet: 2
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: 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/407923 )
Change subject: [IMPR] Assign result templatesWithParams() to variables
......................................................................
[IMPR] Assign result templatesWithParams() to variables
Change-Id: Iea43ca567161da5e6f763822e73091b9f5740079
---
M pywikibot/page.py
1 file changed, 11 insertions(+), 9 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index e44f393..b2f1888 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -850,7 +850,7 @@
return False
if not hasattr(self, "_catredirect"):
catredirs = self.site.category_redirects()
- for (template, args) in self.templatesWithParams():
+ for template, args in self.templatesWithParams():
if template.title(withNamespace=False) in catredirs:
# Get target (first template argument)
try:
@@ -1175,30 +1175,32 @@
# go through all templates and look for any restriction
# multiple bots/nobots templates are allowed
- for template in templates:
- title = template[0].title(withNamespace=False)
+ for template, params in templates:
+ title = template.title(withNamespace=False)
if title == 'Nobots':
- if len(template[1]) == 0:
+ if not params:
return False
else:
- bots = template[1][0].split(',')
+ bots = params[0].split(',')
if 'all' in bots or pywikibot.calledModuleName() in bots \
or username in bots:
return False
elif title == 'Bots':
- if len(template[1]) == 0:
+ if not params:
return True
else:
- (ttype, bots) = template[1][0].split('=', 1)
+ (ttype, bots) = params[0].split('=', 1)
bots = bots.split(',')
if ttype == 'allow':
return 'all' in bots or username in bots
if ttype == 'deny':
return not ('all' in bots or username in bots)
if ttype == 'allowscript':
- return 'all' in bots or pywikibot.calledModuleName() in bots
+ return ('all' in bots
+ or pywikibot.calledModuleName() in bots)
if ttype == 'denyscript':
- return not ('all' in bots or pywikibot.calledModuleName() in bots)
+ return not ('all' in bots
+ or pywikibot.calledModuleName() in bots)
# no restricting template found
return True
--
To view, visit https://gerrit.wikimedia.org/r/407923
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iea43ca567161da5e6f763822e73091b9f5740079
Gerrit-Change-Number: 407923
Gerrit-PatchSet: 1
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: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>