jenkins-bot has submitted this change and it was merged.
Change subject: [doc] Use common copyright string
......................................................................
[doc] Use common copyright string
- use @return/@rtype markup symbols
- new url for MachineReadableRCFeedFormatter doc
- keep lines beneath 80 chars
Change-Id: Iede65d5d893499a74ac49911c7d9383adbf07919
---
M pywikibot/comms/rcstream.py
1 file changed, 24 insertions(+), 13 deletions(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/comms/rcstream.py b/pywikibot/comms/rcstream.py
index 02cbd6b..3e67ed2 100644
--- a/pywikibot/comms/rcstream.py
+++ b/pywikibot/comms/rcstream.py
@@ -2,14 +2,21 @@
"""
SocketIO-based rcstream client.
-(c) 2014 Merlijn van Deen
-
-This file is part of the Pywikibot framework, and is licensed under the MIT license.
+This file is part of the Pywikibot framework.
This module requires socketIO_client to be installed:
pip install socketIO_client
"""
+#
+# (C) 2014 Merlijn van Deen
+# (C) Pywikibot team, 2014-2016
+#
+# Distributed under the terms of the MIT license.
+#
from __future__ import absolute_import, unicode_literals
+
+__version__ = '$Id$'
+#
import sys
import threading
@@ -62,7 +69,7 @@
'server_url': 'http://en.wikipedia.org', 'id': 703158386,
'revision': {'new': 640271171, 'old': 468264850},
'type': 'edit', 'namespace': 0}
- >>> t.stop() # optional, the thread will shut down on exiting python as well
+ >>> t.stop() # optional, the thread will shut down on exiting python
"""
def __init__(self, wikihost, rchost, rcport=80, rcpath='/rc', total=None):
@@ -132,7 +139,11 @@
)
def run(self):
- """Threaded function. Runs insided the thread when started with .start()."""
+ """
+ Threaded function.
+
+ Runs inside the thread when started with .start().
+ """
self.running = True
while self.running:
self.client.wait(seconds=0.1)
@@ -160,15 +171,15 @@
@param total: the maximum number of entries to return. The underlying thread
is shut down then this number is reached.
- @yields dict: dict as formatted by MediaWiki's MachineReadableRCFeedFormatter[1],
- which consists of at least id (recent changes id), type ('edit',
- 'new', 'log' or 'external'), namespace, title, comment, timestamp,
- user and bot (bot flag for the change). See [1] for more details.
-
+ @return: yield dict as formatted by MediaWiki's
+ MachineReadableRCFeedFormatter, which consists of at least id
+ (recent changes id), type ('edit', 'new', 'log' or 'external'),
+ namespace, title, comment, timestamp, user and bot (bot flag for the
+ change).
+ @see: U{MachineReadableRCFeedFormatter<https://doc.wikimedia.org/
+ mediawiki-core/master/php/classMachineReadableRCFeedFormatter.html>}
+ @rtype: generator
@raises ImportError
-
- [1]: See mediawiki/includes/rcfeed/MachineReadableRCFeedFormatter.php
-
"""
if isinstance(socketIO_client, Exception):
raise ImportError('socketIO_client is required for the rc stream;\n'
--
To view, visit https://gerrit.wikimedia.org/r/267003
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iede65d5d893499a74ac49911c7d9383adbf07919
Gerrit-PatchSet: 6
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Lokal Profil <lokal.profil(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
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: [bugfix] Exclude a '-' language from processing
......................................................................
[bugfix] Exclude a '-' language from processing
- wikisource_family.Family constructor appends a '-' language at the end of
the language_by_size list. This must be excluded from processing. Otherwise
we get that entry twice.
- exclusion of 'www' is no longer needed since stats are retrieved as xml
data set. This exception was previously used for the screen scraping regex
and is no longer required.
Bug: T131752
Change-Id: I05bab72fa24ef13346aee2d7b50aaaeeee2179b4
---
M scripts/maintenance/wikimedia_sites.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/maintenance/wikimedia_sites.py b/scripts/maintenance/wikimedia_sites.py
index 9ba8a32..3c56c28 100755
--- a/scripts/maintenance/wikimedia_sites.py
+++ b/scripts/maintenance/wikimedia_sites.py
@@ -41,7 +41,7 @@
'wiktionary': 'wiktionaries',
}
-exceptions = ['www']
+exceptions = ['-']
def update_family(families):
--
To view, visit https://gerrit.wikimedia.org/r/268942
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I05bab72fa24ef13346aee2d7b50aaaeeee2179b4
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>