Bugs item #3609076, was opened at 2013-03-25 16:11
Message generated for change (Comment added) made by xqt
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3609076&group_id=93107

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: None
Group: rewrite
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: xqt (xqt)
>Assigned to: xqt (xqt)
Summary: instance attribute does not work while creating a site

Initial Comment:
Creating a site with instance attribute does not always work as expected.
Calling the framework without installing keeps the APIsite:

>>> r = wp.getSite('wikidata', 'wikidata', interface='DataSite')
>>> r
Site("wikidata", "wikidata")
>>> type(r)
<class 'pywikibot.site.APISite'>

but it works right with internal use:
>>> s = wp.Site('de', 'wikipedia')
>>> s
Site("de", "wikipedia")
>>> r = s.data_repository()
>>> r
DataSite("wikidata", "wikidata")
>>> type(r)
<class 'pywikibot.site.DataSite'>
>>> type(s)
<class 'pywikibot.site.APISite'>

where site,data_repository() returns:

return pywikibot.Site(code, fam, self.username(),
                                  interface="DataSite")

Installing the framework fails with that internal use, see
http://bin.8191.at/?bcdda66fd7b9bc62#amJm4jTHCBOhQRNBUqGOGPR094V3oQcVQuEtiaobn2M=

----------------------------------------------------------------------

>Comment By: xqt (xqt)
Date: 2013-03-25 16:44

Message:
sorry, I am wrong. Comes from cache.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3609076&group_id=93107

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

Reply via email to