| Lokal_Profil added a comment. |
In T150210#2783476, @gerritbot wrote:Change 320649 had a related patch set uploaded (by Lokal Profil):
Make uncertainties in WbQuantity optional
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"?
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
