jenkins-bot has submitted this change and it was merged.
Change subject: Clarify license of documentation
......................................................................
Clarify license of documentation
Change-Id: Id5043b838351df08deed00818fb8b52fedae7713
---
M docs/index.rst
M docs/licenses.rst
2 files changed, 6 insertions(+), 8 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/index.rst b/docs/index.rst
index bcf202d..9ef9559 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -14,7 +14,8 @@
Pywikibot supports Python 2.6.5, 2.7 and 3.2+.
-Pywikibot is licensed under the :ref:`MIT license <licenses-MIT>`; the documentation is licensed under the :ref:`CC-BY-SA-3.0 <licenses-CCBYSA>` license.
+Pywikibot and this documentation are licensed under the :ref:`MIT license <licenses-MIT>`;
+manual pages on mediawiki.org are licensed under the `CC-BY-SA 3.0 <licenses-CCBYSA>` license.
The documentation consists of four major parts:
diff --git a/docs/licenses.rst b/docs/licenses.rst
index f35d34b..c73274d 100644
--- a/docs/licenses.rst
+++ b/docs/licenses.rst
@@ -1,8 +1,9 @@
Licenses
========
-The framework itself is available under the :ref:`MIT license <licenses-MIT>`; the
-documentation is available under the :ref:`CC-BY-SA 3.0 <licenses-CCBYSA>` license.
+The framework itself and this documentation are available under the
+:ref:`MIT license <licenses-MIT>`; manual pages on mediawiki.org are
+available under the `CC-BY-SA 3.0 <licenses-CCBYSA>` license.
.. _licenses-MIT:
@@ -34,8 +35,4 @@
OTHER DEALINGS IN THE SOFTWARE.
-.. _licenses-CCBYSA:
-
-CC-BY-SA 3.0
-------------
-This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
+.. _licenses-CCBYSA: http://creativecommons.org/licenses/by-sa/3.0/
--
To view, visit https://gerrit.wikimedia.org/r/223763
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id5043b838351df08deed00818fb8b52fedae7713
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(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: [IMPR] interwiki: Remove getNamespaceIndex usage
......................................................................
[IMPR] interwiki: Remove getNamespaceIndex usage
This is the only remaining usage of getNamespaceIndex which has been deprecated
since quite some time.
Change-Id: I3aaec9579ec0e1c559f93f37f8b8638c2a3508ab
---
M scripts/interwiki.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 151f21d..33749ea 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -2544,10 +2544,10 @@
ns = namespaces[0]
if ns != 'all':
if isinstance(ns, unicode) or isinstance(ns, str):
- index = site.getNamespaceIndex(ns)
+ index = site.namespaces.lookup(ns)
if index is None:
raise ValueError(u'Unknown namespace: %s' % ns)
- ns = index
+ ns = index.id
namespaces = []
else:
ns = 'all'
--
To view, visit https://gerrit.wikimedia.org/r/223766
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3aaec9579ec0e1c559f93f37f8b8638c2a3508ab
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(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: httplib2 is not used anymore, remove paragraph from docs/licenses.rst
......................................................................
httplib2 is not used anymore, remove paragraph from docs/licenses.rst
Change-Id: I658b6b98c89673498a0598f1a7f69475481f6ce4
---
M docs/licenses.rst
1 file changed, 0 insertions(+), 3 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/licenses.rst b/docs/licenses.rst
index 9ab1340..f35d34b 100644
--- a/docs/licenses.rst
+++ b/docs/licenses.rst
@@ -4,9 +4,6 @@
The framework itself is available under the :ref:`MIT license <licenses-MIT>`; the
documentation is available under the :ref:`CC-BY-SA 3.0 <licenses-CCBYSA>` license.
-Httplib2, which is provided as 'external' library, is also available
-under the :ref:`MIT license <licenses-MIT>`.
-
.. _licenses-MIT:
MIT License
--
To view, visit https://gerrit.wikimedia.org/r/223762
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I658b6b98c89673498a0598f1a7f69475481f6ce4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [FEAT] ParamInfo: Guess write using mustbeposted
......................................................................
[FEAT] ParamInfo: Guess write using mustbeposted
Almost all default write actions (apart from purge) must be POSTed so
it can guess that actions that are POSTed (except for login) are also
write actions.
Change-Id: I65fa9ffcfd25f18d8589160485c3c5a318f0a046
---
M pywikibot/data/api.py
1 file changed, 9 insertions(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
Ricordisamoa: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 71cc0a9..a998d2a 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -494,6 +494,15 @@
if (help_text.find('\n\nThis module only accepts POST '
'requests.\n', start) < end):
self._paraminfo[path]['mustbeposted'] = ''
+ # All actions which must be POSTed are write actions except for
+ # login. Because Request checks if the user is logged in when
+ # doing a write action the check would always fail on login.
+ # Purge is the only action which isn't POSTed but actually does
+ # require writerights. This was checked with the data from
+ # 1.25wmf22 on en.wikipedia.org.
+ if ('mustbeposted' in self._paraminfo[path] and
+ path != 'login') or path == 'purge':
+ self._paraminfo[path]['writerights'] = ''
self._emulate_pageset()
--
To view, visit https://gerrit.wikimedia.org/r/200153
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I65fa9ffcfd25f18d8589160485c3c5a318f0a046
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] checkimages: Convert generator to iterator
......................................................................
[FIX] checkimages: Convert generator to iterator
With ff628236 the general handling of the script changed and with that it also
now used duplicates based on the hash differently. It tried to step through the
generator but that is not possible without turning them first into a iterator.
Bug: T105188
Change-Id: I02791b150b000beda86b7510663badaf842b41ba
---
M scripts/checkimages.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 1b50c33..5ea917b 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -913,8 +913,8 @@
regexOnCommons = (r"\[\[:File:%s\]\] is also on '''Commons''': "
r"\[\[commons:File:.*?\]\](?: \(same name\))?$"
% re.escape(self.imageName))
- commons_image_with_this_hash = next(site.allimages(sha1=hash_found,
- total=1), None)
+ commons_image_with_this_hash = next(iter(site.allimages(sha1=hash_found,
+ total=1)), None)
if commons_image_with_this_hash:
servTMP = pywikibot.translate(self.site, serviceTemplates)
templatesInTheImage = self.image.templates()
--
To view, visit https://gerrit.wikimedia.org/r/223582
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I02791b150b000beda86b7510663badaf842b41ba
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Remove broken wikis from battlestarwiki family
......................................................................
Remove broken wikis from battlestarwiki family
Moving these languages from langs to interwiki_removals will
cause anyone using Pywikibot to remove any interlanguage links
to these languages when they appear on English and German
Battlestarwiki. However as these sites have been down for a
while, and their User:Interwiki_Bot hasnt been active for many years,
and there are no bot edits in the last month on the English site.
Bug: T103470
Change-Id: Icd54ef6bda2544fb0134a0e7e8267c6ada45cc1c
---
M pywikibot/families/battlestarwiki_family.py
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
Objections:
John Vandenberg: There's a problem with this change, please improve
diff --git a/pywikibot/families/battlestarwiki_family.py b/pywikibot/families/battlestarwiki_family.py
index 954dfe3..549c085 100644
--- a/pywikibot/families/battlestarwiki_family.py
+++ b/pywikibot/families/battlestarwiki_family.py
@@ -15,7 +15,9 @@
name = 'battlestarwiki'
- languages_by_size = ['en', 'de', 'fr', 'zh', 'es', 'ms', 'tr', 'simple']
+ languages_by_size = ['en', 'de']
+
+ interwiki_removals = ['fr', 'zh', 'es', 'ms', 'tr', 'simple']
langs = dict([(lang, '%s.battlestarwiki.org' % lang)
for lang in languages_by_size])
--
To view, visit https://gerrit.wikimedia.org/r/223019
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icd54ef6bda2544fb0134a0e7e8267c6ada45cc1c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
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: interwiki script test fails if 'Test page' exists
......................................................................
interwiki script test fails if 'Test page' exists
Bug: T104568
Change-Id: I2597fcfe679469e73b4e8d806f1760c3a07e330a
---
M tests/script_tests.py
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/script_tests.py b/tests/script_tests.py
index e77e5a0..68d6b17 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -83,7 +83,7 @@
'catall': 'q\n', # q for quit
'editarticle': 'Test page\n',
'imageuncat': 'q\n',
- 'interwiki': 'Test page\n',
+ 'interwiki': 'Test page that should not exist\n',
'misspelling': 'q\n',
'pagefromfile': 'q\n',
'replace': 'foo\nbar\n\n\n', # match, replacement,
@@ -134,7 +134,8 @@
'harvest_template': 'ERROR: Please specify',
'illustrate_wikidata': 'I need a generator with pages to work on',
'imageuncat': 'WARNING: This script is primarily written for Wikimedia Commons',
- 'interwiki': 'does not exist. Skipping.', # 'Test page' does not exist
+ # script_input['interwiki'] above lists a title that should not exist
+ 'interwiki': 'does not exist. Skipping.',
'login': 'Logged in on ',
'match_images': 'Require two images to work on.',
'pagefromfile': 'Please enter the file name',
--
To view, visit https://gerrit.wikimedia.org/r/223292
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2597fcfe679469e73b4e8d806f1760c3a07e330a
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
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 <>