Page MenuHomePhabricator

Gracefully fallback on older Wikibase API versions
Closed, ResolvedPublic

Description

Several problems have been identified with using pywikibot with older versions of Wikibase.

  1. snaks-order/qualifier-order support, added to pywikibot in https://gerrit.wikimedia.org/r/#/c/125575/ (fixed in https://gerrit.wikimedia.org/r/#/c/167532)
  2. wbeditentity claims support, added to Wikibase in https://gerrit.wikimedia.org/r/#/c/81671/

Event Timeline

jayvdb assigned this task to Pietrodn.
jayvdb raised the priority of this task from to Medium.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot-Wikidata.
jayvdb changed Security from none to None.
jayvdb subscribed.

Change 167532 had a related patch set uploaded (by John Vandenberg):
Don't crash when snaks-order is missing in API result

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

Patch-For-Review

Initially, Site.editentity needs to determine the Wikibase version, and raise NotImplementedError if the caller is trying to use features that are not supported by that version.

And then another improvement (but much lower priority) is for Site.editentity to fall back to using other API calls to achieve the same effect.

Change 167532 had a related patch set uploaded (by John Vandenberg):
Don't crash when snaks-order is missing in API result

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

Patch-For-Review

Change 167532 merged by jenkins-bot:
Don't crash when snaks-order is missing in API result

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

Change 167532 merged by jenkins-bot:
Don't crash when snaks-order is missing in API result

@jayvdb: Does that fix this task? Or is more work needed? If so, should the task assignee be reset?

@Pietrodn would be better at answering that , as they were using an older version of Wikibase.
I believe we dont have good wikibase version detection, which would be the ideal solution, but we may have hit the goal here.
We probably dont have support for wbeditentity on older Wikibase.

There is also the question of how much 'older' do we want to support, given it is a very fast moving product.

@Pietrodn: I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome! Thanks for your understanding!

The patch to pywikibot has been merged, which resolved the problem for me: https://gerrit.wikimedia.org/r/#/c/pywikibot/core/+/167532/

I think this issue can be closed.

Xqt claimed this task.