Page MenuHomePhabricator

desupport Family.get_known_families() in favour of Site.interwiki()
Closed, ResolvedPublic


The known_families dict in family.Family looks outdated and is deprecated for 5 years. APISite.interwiki() is better solution because it returns a Site object rather than a complete dict which Family.get_known_families() does and nobody knows what to do with this; known_families is not used inside the framework. Unfortunately interwiki() currently fails with SiteDefinitionError if a familiy is not predefined in families Folder. I propose to remove known_families dict and corresponding get_known_families() function from the framework finally. Steps to do:

  • Desupport known_families and get_known_families with FutureWarning instead of DeprecationWarning
  • Use AutoFamily in pywikibot._code_fam_from_url function to create a Site object instead of raising SiteDefinitionError
  • Remove known_families and get_known_families

Event Timeline

Change 584919 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Create a Site with AutoFamily if a family isn't predefined

Change 584919 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Create a Site with AutoFamily if a family isn't predefined

Xqt claimed this task.

Already done with rPWBC3d5aeecd