This changeset corrects errant usage of urllib.parse.urlparse() in the wikipedia plugin, fixing a regression introduced by #2414. This fix prevents namespaces from being erroneously discarded.
In the process of this fix, I discovered that the Special:* namespace is a special case as far as the MediaWiki API is concerned, queries to the API for pages in this namespace don't do what you might expect, so these pages cannot be located and turned into snippets for IRC. So, instead, the URL rule ignores these pages, and issues a specific explanation if a user tries to query them using a command.
Description
Closes #2573.
This changeset corrects errant usage of
urllib.parse.urlparse()
in thewikipedia
plugin, fixing a regression introduced by #2414. This fix prevents namespaces from being erroneously discarded.In the process of this fix, I discovered that the
Special:*
namespace is a special case as far as the MediaWiki API is concerned, queries to the API for pages in this namespace don't do what you might expect, so these pages cannot be located and turned into snippets for IRC. So, instead, the URL rule ignores these pages, and issues a specific explanation if a user tries to query them using a command.Checklist
make qa
(runsmake lint
andmake test
)