Mpaa created this task.
Mpaa added a subscriber: Mpaa.
Mpaa added a project: pywikibot-core.
TASK DESCRIPTION
Botwiki has currently MW 1.19 and it is quite unused.
We could handshake with them not to upgrade the wiki and use it as test site with a lower MW version.
I was trying to run basic tests (I had to change botwiki_family.py removing self.namespaces dict) with in but I get:
```
>>> site = pywikibot.Site('botwiki', 'botwiki')
>>> page = pywikibot.Page(site, 'Main_Page')
>>> page
Page(Main Page)
>>> page.text
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/python/core/pywikibot/page.py", line 440, in text
self._text = self.get(get_redirect=True)
File "/home/user/python/core/pywikibot/tools.py", line 711, in wrapper
return obj(*__args, **__kw)
File "/home/user/python/core/pywikibot/page.py", line 349, in get
self._getInternals(sysop)
File "/home/user/python/core/pywikibot/page.py", line 373, in _getInternals
self.site.loadrevisions(self, getText=True, sysop=sysop)
File "/home/user/python/core/pywikibot/site.py", line 3159, in loadrevisions
step=step, total=total, **rvargs)
File "/home/user/python/core/pywikibot/site.py", line 1587, in _generator
gen = gen_class(type_arg, site=self, **args)
File "/home/user/python/core/pywikibot/data/api.py", line 1689, in __init__
QueryGenerator.__init__(self, prop=prop, **kwargs)
File "/home/user/python/core/pywikibot/data/api.py", line 1299, in __init__
set(self.modules) & self.site._paraminfo.query_modules_with_limits
File "/home/user/python/core/pywikibot/data/api.py", line 437, in query_modules_with_limits
self.fetch(self.query_modules)
File "/home/user/python/core/pywikibot/data/api.py", line 402, in query_modules
self._init()
File "/home/user/python/core/pywikibot/data/api.py", line 218, in _init
assert('type' in query_modules_param)
AssertionError
```
At first site it looks paraminfo has some issue with that version (?).
TASK DETAIL
https://phabricator.wikimedia.org/T85786
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Mpaa
Cc: Aklapper, Mpaa, jayvdb, pywikipedia-bugs
XZise added a subscriber: XZise.
XZise added a comment.
Yeah it seems sensible that -verbose should enable this. Another problem is actually, that the logging levels are now don't make sense anymore. There is a WARNING level which is always shown and there are warnings which aren't shown by default.
TASK DETAIL
https://phabricator.wikimedia.org/T72970
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise
Cc: XZise, gerritbot, Nullzero, jayvdb, pywikipedia-bugs
cpa199 added a comment.
I know this has been marked as resolved, but it seems that the github mirror hasn't been updated still for phabricator-extensions-Sprint as it doesn't have this change for example - https://gerrit.wikimedia.org/r/#/c/186222/
TASK DETAIL
https://phabricator.wikimedia.org/T87248
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Chad, cpa199
Cc: Krinkle, XZise, valhallasw, JanZerebecki, Nikerabbit, siebrand, cpa199, zhaofengli, llbraughler, adrianheine, Krenair, Xqt, jayvdb, fbstj, greg, Legoktm, Chad, MarkTraceur, matmarex, UltrasonicNXT, Aklapper, QChris, pywikipedia-bugs
XZise created this task.
XZise added subscribers: XZise, Xqt.
XZise added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
There are currently some methods in `BaseSite` which return the custom namespace name for certain (usually special) namespaces added before the `Namespace` class was added. There should be a way to get them without relying to know the namespace id's themselves. There are currently `special_namespace`, `image_namespace`, `mediawiki_namespace`, `template_namespace`, `category_namespace` and `category_namespaces`. Those should be deprecated and replaced by a more usable system which should also incorporate `BasePage.isImage` and `BasePage.isCategory`.
One suggestion is to have, similar to how PHP does it, constants like `NS_CATEGORY` which contain the namespace number and via `BaseSite.namespaces[BaseSite.NS_CATEGORY]` it would be possible to get the actual `Namespace` object. This would rely on the presumption that the namespace ids will never change (or the changes are so drastic that it must be redesigned anyway).
A more future proof solution would be to add other methods which are like the current ones but just return the `Namespace` object. In fact it might be possible to do that already as it behaves similar to the string which is returned already.
Especially another problem regarding the `Page`'s methods is that those don't necessarily mean that the page is a `FilePage` or `Category`[Page]. So it can't be substituted by an `isinstance` call but it could either compare the namespace to a constant like `NS_CATEGORY` (and minimize the number of magic numbers) or use the `Namespace` object returned by the new function.
TASK DETAIL
https://phabricator.wikimedia.org/T87543
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise
Cc: Xqt, Aklapper, XZise, jayvdb, pywikipedia-bugs