XZise claimed this task. XZise added a comment. In order to properly identify the family and code corresponding to a URL it also needs to check the path as multiple MediaWiki instances may be on the same domain. To do that it can either compare the path to //index.php// which is known as it's the same as the path to //api.php// (granted it may not be actually the same, I haven't checked and `Family` allows two different paths, but then we need to adjust `Family.from_url`). And that path is already known so that is fine. But most wikis on the interwiki map actually use the article path (e.g. `en.wikipedia.org/wiki/$1`) which is in `Family.nicepath` but due to https://phabricator.wikimedia.org/T89451 we try to minimize the number of variables necessary and thus my patch is using `APISite.article_path` which does a request to the wiki to get the article path.
Now in it's own that is fine as you probably want a `Site` instance when you call `Family.from_url`. But unfortunately the `APISite._cache_interwiki` method creates a `Site` instance for every entry to actually cache it. TASK DETAIL https://phabricator.wikimedia.org/T111610 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: XZise Cc: gerritbot, Aklapper, pywikibot-bugs-list, XZise, valhallasw, jayvdb _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
