List of steps to reproduce:
- See T301768
- https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.html?highlight=get_file_history#pywikibot.FilePage.get_file_history
- https://codesearch.wmcloud.org/pywikibot/?q=get_file_history&i=nope&files=&excludeFiles=&repos=
- rPWBC31cd9fd
What happens?:
get the first or last item of the sequence (using pop()) fails with KeyError or TypeError
What should have happened instead?:
Either return a sequence (or generator) with get_file_history or describe a way how to find the first or last item in the dict e.g.
hist = image.get_file_history() key = sorted(hist.keys()) item = hist.pop(key)
Software version:
Pywikibot 3.0.20170403 or earlier. Strange that is was not detected the last 7 years