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