[Pywikibot-commits] [Gerrit] pywikibot/core[master]: Add 'application/vnd.php.serialized' to expected content for...

2017-03-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342162 )

Change subject: Add 'application/vnd.php.serialized' to expected content 
formats of DataSite
..


Add 'application/vnd.php.serialized' to expected content formats of DataSite

Bug: T129281
Change-Id: Ifef728e940451b60fb04cd4d3d4bae0501548c03
---
M tests/paraminfo_tests.py
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved



diff --git a/tests/paraminfo_tests.py b/tests/paraminfo_tests.py
index 86236ba..8a8d776 100644
--- a/tests/paraminfo_tests.py
+++ b/tests/paraminfo_tests.py
@@ -12,6 +12,7 @@
 
 from pywikibot.family import WikimediaFamily
 from pywikibot.page import Claim, Property
+from pywikibot.site import DataSite
 from pywikibot.tools import MediaWikiVersion
 
 from tests.aspects import (
@@ -123,6 +124,9 @@
 ]
 if MediaWikiVersion(self.site.version()) >= MediaWikiVersion('1.24'):
 base.append('application/json')
+if isinstance(self.site, DataSite):
+# It is not clear when this format has been added, see T129281.
+base.append('application/vnd.php.serialized')
 
 self._check_param_values(self.site, 'edit', 'contentformat', base)
 self._check_param_values(self.site, 'parse', 'contentformat', base)

-- 
To view, visit https://gerrit.wikimedia.org/r/342162
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifef728e940451b60fb04cd4d3d4bae0501548c03
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

___
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits


[Pywikibot-commits] Errored: wikimedia/pywikibot-core#3897 (master - 6f33dee)

2017-03-09 Thread Travis CI
Build Update for wikimedia/pywikibot-core
-

Build: #3897
Status: Errored

Duration: 2 hours, 24 minutes, and 6 seconds
Commit: 6f33dee (master)
Author: jenkins-bot
Message: Merge "Fix spelling mistake in pagegenerators.py"

View the changeset: 
https://github.com/wikimedia/pywikibot-core/compare/f91a37b80f80...6f33dee4d10e

View the full build log and details: 
https://travis-ci.org/wikimedia/pywikibot-core/builds/209347961

--

You can configure recipients for build notifications in your .travis.yml file. 
See https://docs.travis-ci.com/user/notifications

___
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits


[Pywikibot-commits] Errored: wikimedia/pywikibot-core#3896 (master - f91a37b)

2017-03-09 Thread Travis CI
Build Update for wikimedia/pywikibot-core
-

Build: #3896
Status: Errored

Duration: 2 hours, 19 minutes, and 18 seconds
Commit: f91a37b (master)
Author: xqt
Message: Revert "Improve and re-enable translateMagicWords"

This reverts commit 911d9359256bfbb0742e1159457d5a5633f76433.

Bug: 159997
Change-Id: I6fbecbee2d3dd09ad3dcd8ae76bc4e0cbf857f9e

View the changeset: 
https://github.com/wikimedia/pywikibot-core/compare/ac67d2b48908...f91a37b80f80

View the full build log and details: 
https://travis-ci.org/wikimedia/pywikibot-core/builds/209338376

--

You can configure recipients for build notifications in your .travis.yml file. 
See https://docs.travis-ci.com/user/notifications

___
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits


[Pywikibot-commits] [Gerrit] pywikibot/core[master]: Fix spelling mistake in pagegenerators.py

2017-03-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/341994 )

Change subject: Fix spelling mistake in pagegenerators.py
..


Fix spelling mistake in pagegenerators.py

Change-Id: Iafa6d5e260dea206606c0ca62b92bc1c427f57be
---
M pywikibot/pagegenerators.py
1 file changed, 20 insertions(+), 20 deletions(-)

Approvals:
  Dalba: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 98ed579..b96d860 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -964,7 +964,7 @@
 If includeredirects is False, redirects are not included. If
 includeredirects equals the string 'only', only redirects are added.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param content: If True, load current version of each page (default False)
 @param site: Site for generator results.
@@ -1382,7 +1382,7 @@
total=None, _filter_unique=filter_unique):
 """Yield unique pages edited by user:username.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param namespaces: list of namespace numbers to fetch contribs from
 @type namespaces: list of int
@@ -1970,7 +1970,7 @@
 """
 New file generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
@@ -2046,7 +2046,7 @@
 """
 Unused files generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
@@ -2062,7 +2062,7 @@
 """
 Page lacking interwikis generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
 """
@@ -2077,7 +2077,7 @@
 """
 Uncategorized category generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
@@ -2093,7 +2093,7 @@
 """
 Uncategorized file generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
@@ -2109,7 +2109,7 @@
 """
 Uncategorized page generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
@@ -2125,7 +2125,7 @@
 """
 Uncategorized template generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
@@ -2141,7 +2141,7 @@
 """
 Lonely page generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
@@ -2157,7 +2157,7 @@
 """
 Unwatched page generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
@@ -2172,7 +2172,7 @@
 """
 Wanted page generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
@@ -2188,7 +2188,7 @@
 """
 Ancient page generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number of pages to retrieve in total
 @type total: int
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
@@ -2204,7 +2204,7 @@
 """
 Dead-end page generator.
 
-@param total: Maxmum number of pages to retrieve in total
+@param total: Maximum number 

[Pywikibot-commits] [Gerrit] pywikibot/core[master]: Revert "Improve and re-enable translateMagicWords"

2017-03-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342000 )

Change subject: Revert "Improve and re-enable translateMagicWords"
..


Revert "Improve and re-enable translateMagicWords"

This reverts commit 911d9359256bfbb0742e1159457d5a5633f76433.

Bug: 159997
Change-Id: I6fbecbee2d3dd09ad3dcd8ae76bc4e0cbf857f9e
---
M pywikibot/cosmetic_changes.py
M tests/cosmetic_changes_tests.py
2 files changed, 8 insertions(+), 22 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved



diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index 07fb95c..f1923a8 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -50,7 +50,7 @@
 """
 #
 # (C) xqt, 2009-2016
-# (C) Pywikibot team, 2006-2017
+# (C) Pywikibot team, 2006-2016
 #
 # Distributed under the terms of the MIT license.
 #
@@ -221,7 +221,8 @@
 self.cleanUpSectionHeaders,
 self.putSpacesInLists,
 self.translateAndCapitalizeNamespaces,
-self.translateMagicWords,
+# FIXME: fix bugs and re-enable
+# self.translateMagicWords,
 self.replaceDeprecatedTemplates,
 # FIXME: fix bugs and re-enable
 # self.resolveHtmlEntities,
@@ -405,22 +406,19 @@
 """Use localized magic words."""
 # not wanted at ru
 # arz uses english stylish codes
-# no need to run on English wikis
-if self.site.code not in ['arz', 'en', 'ru']:
+if self.site.code not in ['arz', 'ru']:
 exceptions = ['nowiki', 'comment', 'math', 'pre']
 for magicWord in ['img_thumbnail', 'img_left', 'img_center',
   'img_right', 'img_none', 'img_framed',
   'img_frameless', 'img_border', 'img_upright', ]:
-aliases = list(self.site.getmagicwords(magicWord))
-preferred = aliases.pop(0)
+aliases = self.site.getmagicwords(magicWord)
 if not aliases:
 continue
 text = textlib.replaceExcept(
 text,
-r'\[\[(?P.+?:.+?\..+?\|(.*?\|)*?) *(' +
-'|'.join(aliases) +
-r') *(?P(\|.*?)*?\]\])',
-r'[[\g' + preferred + r'\g', exceptions)
+r'\[\[(?P.+?:.+?\..+?\|) *(' + '|'.join(aliases) +
+r') *(?P(\|.*?)?\]\])',
+r'[[\g' + aliases[0] + r'\g', exceptions)
 return text
 
 def cleanUpLinks(self, text):
diff --git a/tests/cosmetic_changes_tests.py b/tests/cosmetic_changes_tests.py
index 5db7281..cc3947c 100644
--- a/tests/cosmetic_changes_tests.py
+++ b/tests/cosmetic_changes_tests.py
@@ -244,18 +244,6 @@
 self.assertEqual(
 '[[File:Foo.bar|miniatur]]',
 self.cct.translateMagicWords('[[File:Foo.bar|mini]]'))
-self.assertEqual(
-'[[File:Foo.bar|links|miniatur]]',
-self.cct.translateMagicWords('[[File:Foo.bar|left|thumb]]'))
-self.assertEqual(
-'[[File:Foo.bar|250px|links]]',
-self.cct.translateMagicWords('[[File:Foo.bar|250px|left]]'))
-self.assertEqual(
-'[[File:Foo.bar|links|250px]]',
-self.cct.translateMagicWords('[[File:Foo.bar| left |250px]]'))
-self.assertEqual(
-'[[File:Foo.bar|250px|zentriert|Baz]]',
-self.cct.translateMagicWords('[[File:Foo.bar|250px|center|Baz]]'))
 
 def test_cleanUpLinks_pipes(self):
 """Test cleanUpLinks method."""

-- 
To view, visit https://gerrit.wikimedia.org/r/342000
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fbecbee2d3dd09ad3dcd8ae76bc4e0cbf857f9e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

___
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits


[Pywikibot-commits] Errored: wikimedia/pywikibot-core#3895 (master - ac67d2b)

2017-03-09 Thread Travis CI
Build Update for wikimedia/pywikibot-core
-

Build: #3895
Status: Errored

Duration: 2 hours, 27 minutes, and 8 seconds
Commit: ac67d2b (master)
Author: jenkins-bot
Message: Merge "Update security requirements of requests"

View the changeset: 
https://github.com/wikimedia/pywikibot-core/compare/06b28ecc2573...ac67d2b48908

View the full build log and details: 
https://travis-ci.org/wikimedia/pywikibot-core/builds/209244604

--

You can configure recipients for build notifications in your .travis.yml file. 
See https://docs.travis-ci.com/user/notifications

___
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits


[Pywikibot-commits] Errored: wikimedia/pywikibot-core#3894 (master - 06b28ec)

2017-03-09 Thread Travis CI
Build Update for wikimedia/pywikibot-core
-

Build: #3894
Status: Errored

Duration: 54 minutes and 2 seconds
Commit: 06b28ec (master)
Author: jenkins-bot
Message: Merge "Allow retrieval of unit as ItemPage for WbQuantity"

View the changeset: 
https://github.com/wikimedia/pywikibot-core/compare/3cff42e71434...06b28ecc2573

View the full build log and details: 
https://travis-ci.org/wikimedia/pywikibot-core/builds/209243021

--

You can configure recipients for build notifications in your .travis.yml file. 
See https://docs.travis-ci.com/user/notifications

___
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits