So while writing some methods for Wikidata, I discovered that locked wikis,
deleted wikis, and renamed wikis all go into the same family.obsolete dict.
In fact, its impossible to create a site object for a closed wiki (both in
trunk and rewrite):
>>> wikipedia.getSite('aa','wikipedia')
pywikibot.exceptions.NoSuchSite: Language aa in family wikipedia is obsolete

This isn't favorable behavior since it prevents read access as well, and
write access for those who have it (stewards).

I wrote a quick patch for rewrite which separated this into three different
groups: locked (readable but not writable), deleted (not readable), and
"obsolete" (renamed wikis and backwards compatibility).
Trying to create a site for a locked wiki works fine, but will throw an
error when you try to fetch an edit token. Creating a site for a deleted or
obsolete wiki will throw the same error as before, just with a little bit
more specific error message.

What do people think? This is a bit urgent since Wikidata support in trunk
is broken because of it:
>>> wikipedia.DataPage(wikipedia.getSite('en','wikipedia'), 'Main
Page').interwiki()
pywikibot.exceptions.NoSuchSite: Language ii in family wikipedia is obsolete

-- Legoktm
_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to