Page MenuHomePhabricator

Raise an exception when an invalid namespace is provided to Link/BaseLink
Open, Needs TriagePublic

Description

When an invalid namespace is provided to Link/BaseLink the invalid namespace is quietly ignored and replaced by Namespace.MAIN (per Link.__init__() behaviour). [This happens in BaseLink.lookup_namespace() and Link.__init__()].

Raising an Exception would probably be more appropriate.


This was one of the @TODOs from gerrit:442168

Details

Event Timeline

Change 511399 had a related patch set uploaded (by Lokal Profil; owner: Lokal Profil):
[pywikibot/core@master] Removing @TODOs

https://gerrit.wikimedia.org/r/511399

Perhaps these two tasks (T67262 and T223897) could be solved now after the Link rewrite

Change 511399 merged by jenkins-bot:
[pywikibot/core@master] Removing @TODOs

https://gerrit.wikimedia.org/r/511399