Bugs item #2801955, was opened at 2009-06-05 20:21 Message generated for change (Tracker Item Submitted) made by vyznev You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2801955...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ilmari Karonen (vyznev) Assigned to: Nobody/Anonymous (nobody) Summary: API queries always using default site
Initial Comment: There's recently been some cases on Commons where BetacommandBot has unintentionally pulled a file from Wikipedia rather than from Commons when trying to do a rename: see discussion at http://commons.wikimedia.org/wiki/Commons:Administrators%27_noticeboard#Stra...
I took a look at the code, and it seems a lot of methods in wikipedia.py (and maybe elsewhere, haven't checked) are calling query.GetData() without passing an explicit site parameter, causing query.py to use the default site given by default_code and default_family. Now, I'm no Python expert and not particularly familiar with pywikipedia, but this looks like it would cause problems whenever multiple sites are involved.
Adding something like "site = self.site()" to the query.GetData() calls ought to fix this, but someone also really ought to look over the code and see how deep this problem may go.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2801955...
pywikipedia-bugs@lists.wikimedia.org