jenkins-bot has submitted this change and it was merged.
Change subject: Default wikimedia rcstream to https on port 443 ......................................................................
Default wikimedia rcstream to https on port 443
Instead of http on port 80
This commit itself is not tested (I'm not a pywikibot user), though I have checked my own little socketIO_client script and it should be okay.
Bug: T145244 Change-Id: I4a01817ba7e525f3ebdf82cab939ac8bbcdf1835 --- M pywikibot/comms/rcstream.py M pywikibot/family.py 2 files changed, 10 insertions(+), 5 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/comms/rcstream.py b/pywikibot/comms/rcstream.py index 3e67ed2..823597a 100644 --- a/pywikibot/comms/rcstream.py +++ b/pywikibot/comms/rcstream.py @@ -45,7 +45,7 @@ is passed to rcstream using a 'subscribe' command. Pass '*' to listen to all wikis for a given rc host. @param rchost: the recent changes stream host to connect to. For Wikimedia - wikis, this is 'stream.wikimedia.org' + wikis, this is 'https://stream.wikimedia.org' @param rcport: the port to connect to (default: 80) @param rcpath: the sockets.io path. For Wikimedia wikis, this is '/rc'. (default: '/rc') @@ -58,7 +58,7 @@
Usage:
- >>> t = RcListenerThread('en.wikipedia.org', 'stream.wikimedia.org') + >>> t = RcListenerThread('en.wikipedia.org', 'https://stream.wikimedia.org') >>> t.start() >>> change = t.queue.get() >>> change @@ -164,7 +164,7 @@ is passed to rcstream using a 'subscribe' command. Pass '*' to listen to all wikis for a given rc host. @param rchost: the recent changes stream host to connect to. For Wikimedia - wikis, this is 'stream.wikimedia.org' + wikis, this is 'https://stream.wikimedia.org' @param rcport: the port to connect to (default: 80) @param rcpath: the sockets.io path. For Wikimedia wikis, this is '/rc'. (default: '/rc') @@ -218,5 +218,6 @@ return rc_listener( wikihost=site.hostname(), rchost=site.rcstream_host(), + rcport=site.rcstream_port(), total=total, ) diff --git a/pywikibot/family.py b/pywikibot/family.py index c95f2e5..6058e6d 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -1612,8 +1612,12 @@ return 'https'
def rcstream_host(self, code): - """Return 'stream.wikimedia.org' as the RCStream hostname.""" - return 'stream.wikimedia.org' + """Return 'https://stream.wikimedia.org' as the RCStream hostname.""" + return 'https://stream.wikimedia.org' + + def rcstream_port(self, code): + """Return 443 as the RCStream port number.""" + return 443
class WikimediaOrgFamily(SingleSiteFamily, WikimediaFamily):
pywikibot-commits@lists.wikimedia.org