Lokal_Profil added a comment.

Change 320649 had a related patch set uploaded (by Lokal Profil):
Make uncertainties in WbQuantity optional

https://gerrit.wikimedia.org/r/320649

There is a lot of extra code in here just to ensure this is compatible with older versions of WikiBase.

Specifically WbQuantity now requires a site object which it then only uses to check the MediaWiki version of the site. To me that feels like unnecessary overhead (and would require a lot of people update their client code)

A solution would be to simply ignore older versions of WikiBase (everything works fine as long as you supply an error) and maybe just listen for "pywikibot.data.api.APIError: invalid-snak" when someone tries to add a Claim where the target is WbQuantity and if so raise an error/warning suggesting "this might be due to you not specifying an error"?


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

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

To: Lokal_Profil
Cc: gerritbot, Aklapper, Lokal_Profil, pywikibot-bugs-list, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, jayvdb, Ricordisamoa, Wesalius, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to