https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
Web browser: --- Bug ID: 55146 Summary: interwiki() fails for closed wikipedia Product: Pywikibot Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1608/ Reported by: cdpark Created on: 2013-04-04 01:32:44 Subject: interwiki() fails for closed wikipedia Assigned to: amird Original description: Page.interwiki() and PageData.interwiki() fails when wikidata contains sitelinks of closed wikipedias.
For example, following code is broken now.
--------------------------------------------------------------------------------------------------- #!/usr/bin/python # -*- coding: utf-8 -*-
import pywikibot
en = pywikibot.getSite('en', 'wikipedia') mainpage = pywikibot.Page(en, u'Main Page') interwiki = mainpage.interwiki()
print interwiki
--------------------------------------------------------------------------------------------------------------
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
--- Comment #1 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- - **assigned_to**: nobody --> amird
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
--- Comment #2 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- I posted this on the ML about a month ago (http://lists.wikimedia.org/pipermail/pywikipedia-l/2013-March/007766.html%5C) and assumed that because no one responded it wasn't a big deal so I didn't bother fixing it. This issue is more than just interwiki links, it's that we prevent read (and write for stewards) access for a locked (but readable) wiki.
I think the best way to fix it would be to split that list of obsolete wiki's into 3: locked, deleted, and obsolete (renamed, backwards compatibility), and then any wiki that is deleted/obsolete throw an error, but locked does not.
(Setting group to none since this also affects rewrite branch)
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
--- Comment #3 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- - **milestone**: 346788 --> - **labels**: 745455 -->
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
--- Comment #4 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- The problem is from API: http://en.wikipedia.org/w/api.php?action=query&format=jsonfm&titles=... in comprehension of: http://en.wikipedia.org/w/api.php?action=query&format=jsonfm&titles=... legoktm: I think your idea is good but unrelated, none of these wikis are obsolete
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
--- Comment #5 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Sorry, I misunderstood but every time i run the code on Main Page,bot returns me invalid title because the iws are invalid titles: http://en.wikipedia.org/w/index.php?title=Template:Main%5C_Page%5C_interwiki...
can you give me another example (e.g. a test userspace page)
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/bugs/1608
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
Nemo federicoleva@tiscali.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|General |Wikidata
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
Amir Ladsgroup ladsgroup@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ladsgroup@gmail.com Assignee|Pywikipedia-bugs@lists.wiki |ladsgroup@gmail.com |media.org |
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|Wikidata |General Assignee|ladsgroup@gmail.com |Pywikipedia-bugs@lists.wiki | |media.org
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
--- Comment #6 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 112842 had a related patch set uploaded by Nullzero: Make obsolete site object can be created
https://gerrit.wikimedia.org/r/112842
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
--- Comment #7 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 112842 merged by jenkins-bot: Make obsolete site object can be created
https://gerrit.wikimedia.org/r/112842
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
Bug 55146 depends on bug 61120, which changed state.
Bug 61120 Summary: pywikibot.Link.langlinkUnsafe can't deal with obsolete sites https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
Sorawee Porncharoenwase nullzero.free@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED CC| |nullzero.free@gmail.com Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |---
--- Comment #8 from xqt info@gno.de --- Patch reverted with https://gerrit.wikimedia.org/r/#/c/119277/
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
Bug 55146 depends on bug 61120, which changed state.
Bug 61120 Summary: pywikibot.Link.langlinkUnsafe can't deal with obsolete sites https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |---
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146 Bug 55146 depends on bug 61120, which changed state.
Bug 61120 Summary: pywikibot.Link.langlinkUnsafe can't deal with obsolete sites https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=55146
Sorawee Porncharoenwase nullzero.free@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED
--- Comment #9 from Sorawee Porncharoenwase nullzero.free@gmail.com --- Merged
pywikipedia-bugs@lists.wikimedia.org