jenkins-bot has submitted this change and it was merged.
Change subject: Don't use set literals in tests
......................................................................
Don't use set literals in tests
Set literals are not available in Python 2.6.
This doesn't change the fact that the tests don't work on 2.6 but at
least it stops the message about illegal syntax popping up every time
one installs the module.
Change-Id: I9b8674af99bc3acd418b2a378679e7254e1dee79
---
M tests/page_tests.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/page_tests.py b/tests/page_tests.py
index 48f40fe..5a60678 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -253,9 +253,9 @@
if not site.hasExtension('Disambiguator', False):
raise unittest.SkipTest('Disambiguator extension not loaded on test site')
pg = pywikibot.Page(site, 'Random')
- pg._pageprops = {'disambiguation', ''}
+ pg._pageprops = set(['disambiguation', ''])
self.assertTrue(pg.isDisambig())
- pg._pageprops = {}
+ pg._pageprops = set()
self.assertFalse(pg.isDisambig())
def testReferences(self):
--
To view, visit https://gerrit.wikimedia.org/r/86433
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9b8674af99bc3acd418b2a378679e7254e1dee79
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mineo <themineo(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(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: update licence file from compat
......................................................................
update licence file from compat
Change-Id: Ie91ef0c01d4688a197df0652474a1b763cd9e4df
---
M LICENSE
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/LICENSE b/LICENSE
index 6011a07..976c237 100644
--- a/LICENSE
+++ b/LICENSE
@@ -21,3 +21,7 @@
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+Everything in the 'externals' directory is general released under seperate
+licenses. Some parts may come from Pywikipedia bot team and share the same
+permissions, but in general they have to be checked for any external package
+seperately.
--
To view, visit https://gerrit.wikimedia.org/r/86378
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie91ef0c01d4688a197df0652474a1b763cd9e4df
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(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: Cleanup cfd.py
......................................................................
Cleanup cfd.py
Removed unneeded escapes from some regexes
Removed unused variables
Change-Id: I2e0b9356d4433b2c0c7ba6dcaf6273d04fba9daf
---
M scripts/cfd.py
1 file changed, 12 insertions(+), 13 deletions(-)
Approvals:
Adamw: Looks good to me, but someone else must approve
Xqt: Looks good to me, but someone else must approve
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/cfd.py b/scripts/cfd.py
index a830298..9116660 100644
--- a/scripts/cfd.py
+++ b/scripts/cfd.py
@@ -18,7 +18,7 @@
import category
# The location of the CFD working page.
-cfdPage = 'Wikipedia:Categories for discussion/Working'
+cfdPage = u'Wikipedia:Categories for discussion/Working'
# A list of templates that are used on category pages as part of the CFD
# process that contain information such as the link to the per-day discussion page.
@@ -29,17 +29,17 @@
# to see how these work in context. To get this bot working on other wikis you will
# need to adjust these regular expressions at the very least.
nobots = re.compile(r"NO\s*BOTS", re.IGNORECASE)
-example = re.compile(r"\[\[\:Category\:(.)\1\1\1\1\]\]", re.IGNORECASE)
+example = re.compile(r"\[\[:Category:(.)\1\1\1\1\]\]", re.IGNORECASE)
speedymode = re.compile(r"^===*\s*Speedy Moves\s*===*\s*$", re.IGNORECASE)
-movemode = re.compile(r"^===*\s*Move\/Merge then delete\s*===*\s*$", re.IGNORECASE)
+movemode = re.compile(r"^===*\s*Move/Merge then delete\s*===*\s*$", re.IGNORECASE)
emptymode = re.compile(r"^===*\s*Empty then delete\s*===*\s*$", re.IGNORECASE)
deletemode = re.compile(r"^===*\s*Ready for deletion\s*===*\s*$", re.IGNORECASE)
maintenance = re.compile(r"^===*\s*Old by month categories with entries\s*===*\s*$", re.IGNORECASE)
-dateheader = re.compile(r"(\[\[Wikipedia\:Categories[_ ]for[_ ](?:discussion|deletion)\/Log\/([^\]]*?)\]\])",
+dateheader = re.compile(r"(\[\[Wikipedia:Categories[_ ]for[_ ](?:discussion|deletion)/Log/([^\]]*?)\]\])",
re.IGNORECASE)
-movecat = re.compile(r"\[\[\:Category\:([^\]]*?)\]\][^\]]*?\[\[\:Category\:([^\]]*?)\]\]", re.IGNORECASE)
-deletecat = re.compile(r"\[\[\:Category\:([^\]]*?)\]\]", re.IGNORECASE)
-findday = re.compile(r"\[\[(Wikipedia\:Categories for (?:discussion|deletion)\/Log\/\d{4} \w+ \d+)#", re.IGNORECASE)
+movecat = re.compile(r"\[\[:Category:([^\]]*?)\]\][^\]]*?\[\[:Category:([^\]]*?)\]\]", re.IGNORECASE)
+deletecat = re.compile(r"\[\[:Category:([^\]]*?)\]\]", re.IGNORECASE)
+findday = re.compile(r"\[\[(Wikipedia:Categories for (?:discussion|deletion)/Log/\d{4} \w+ \d+)#", re.IGNORECASE)
class ReCheck:
@@ -59,9 +59,6 @@
# Variable declarations
day = "None"
mode = "None"
- src = "None"
- dest = "None"
- line = ""
summary = ""
robot = None
@@ -97,9 +94,11 @@
dest = m.result.group(2)
thisDay = findDay(src, day)
if mode == "Move" and thisDay != "None":
- summary = "Robot - Moving category " + src + " to [[:Category:" + dest + "]] per [[WP:CFD|CFD]] at " + thisDay + "."
+ summary = "Robot - Moving category " + src + " to [[:Category:" + dest + "]] per [[WP:CFD|CFD]] at " + \
+ thisDay + "."
elif mode == "Speedy":
- summary = "Robot - Speedily moving category " + src + " to [[:Category:" + dest + "]] per [[WP:CFDS|CFDS]]."
+ summary = "Robot - Speedily moving category " + src + " to [[:Category:" + dest + \
+ "]] per [[WP:CFDS|CFDS]]."
else:
continue
# If the category is redirect, we do NOT want to move articles to
@@ -144,7 +143,7 @@
# parameter, which is essentially a fallback that is extracted from the
# per-day subheadings on the working page.
def findDay(pageTitle, oldDay):
- page = pywikibot.Page(pywikibot.Site(), "Category:" + pageTitle)
+ page = pywikibot.Page(pywikibot.Site(), u"Category:" + pageTitle)
try:
pageSrc = page.get()
m = findday.search(pageSrc)
--
To view, visit https://gerrit.wikimedia.org/r/86345
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2e0b9356d4433b2c0c7ba6dcaf6273d04fba9daf
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Adamw <awight(a)wikimedia.org>
Gerrit-Reviewer: DrTrigon <dr.trigon(a)surfeu.ch>
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: remove default settings from family file
......................................................................
remove default settings from family file
Change-Id: I0fed01a1c34d2acb1905c4193a7b70fd0b75df96
---
M pywikibot/families/wikiquote_family.py
1 file changed, 0 insertions(+), 14 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/families/wikiquote_family.py b/pywikibot/families/wikiquote_family.py
index 9326056..736e50b 100644
--- a/pywikibot/families/wikiquote_family.py
+++ b/pywikibot/families/wikiquote_family.py
@@ -23,20 +23,6 @@
self.langs = dict([(lang, '%s.wikiquote.org' % lang)
for lang in self.languages_by_size])
- # attop is a list of languages that prefer to have the interwiki
- # links at the top of the page.
- self.interwiki_attop = []
-
- # on_one_line is a list of languages that want the interwiki links
- # one-after-another on a single line
- self.interwiki_on_one_line = []
-
- # Similar for category
- self.category_attop = []
-
- # List of languages that want the category on_one_line.
- self.category_on_one_line = []
-
# Global bot allowed languages on http://meta.wikimedia.org/wiki/Bot_policy/Implementation#Current_implementa…
self.cross_allowed = [
'af', 'am', 'ar', 'az', 'be', 'bg', 'br', 'bs', 'ca', 'cs', 'da',
--
To view, visit https://gerrit.wikimedia.org/r/86369
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0fed01a1c34d2acb1905c4193a7b70fd0b75df96
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot