matej_suchanek added a comment.

I am thinking of whether this method is useful for anything but a confusion. If the site should be repo, it is a DataSite. That it's a DataSite you can test via isinstance(). The identity testing in the current APISite.is_data_repository() method is either obsolete (for repos themselves), or it doesn't work (for the mentioned case).

IMO the best solution would be:

  1. deprecate and remove APISite.is_data_repository()
  2. always query for the repository
  3. override DataSite.data_repository() with return self (for better performance)

TASK DETAIL
https://phabricator.wikimedia.org/T85483

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: matej_suchanek
Cc: zhuyifei1999, matej_suchanek, TerraCodes, jayvdb, Ricordisamoa, Aklapper, pywikibot-bugs-list, Pietrodn, Lydia_Pintscher, XZise, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Luke081515, Wesalius, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to