https://bugzilla.wikimedia.org/show_bug.cgi?id=65262

            Bug ID: 65262
           Summary: ns parameter of Page object and/or defaultnamespace of
                    Link object should force the namespace
           Product: Pywikibot
           Version: core (2.0)
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
       Web browser: ---
   Mobile Platform: ---

ns parameter of Page object and/or defaultnamespace of Link object should force
the Namespace instead of add a Namespace if no one is given.

Especially for categories but also for other namespaces it is possible to name
pages which looks like a Namespace e.g. "Kategory:Wikipedia:Hilfe".

site = pywikibot.Site()
pywikibot.Category(pywikibot.Link("Wikipedia:Hilfe"), defaultNamespace=14) or
pywikibot.Category(site, "Wikipedia:Hilfe", ns=14)

fails with an exception error

pywikibot.Page(site, "Wikipedia:Hilfe", ns=14) gives
Page("Wikipedia:Hilfe") instead of the category page as expected.

There are several scripts which fix that point by adding a "category:" in front
of a page title which should be obsolete.

See https://gerrit.wikimedia.org/r/#/c/132781/ for example

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to