XZise created this task.
XZise assigned this task to Mpaa.
XZise added subscribers: XZise, Mpaa, jayvdb.
XZise added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
A QueryGenerator might return the same page, because not all data was
returned in the first request. When then the second request comes in it
contains the same page with additional information. I stumbled across this when
I was searching for the files with the same hash:
```
>>> import pywikibot
>>> s = pywikibot.Site('commons', 'commons')
>>> h = '1fd33cb7c6163260585093846174886af2733cd6'
>>> list(s.allimages(sha1=h))
[FilePage(b'File:Star empty.svg'), FilePage(b'File:Star empty.svg')]
```
Both are about the exact same page but the
[[https://commons.wikimedia.org/w/api.php?inprop=protection&indexpageids=&generator=allimages&action=query&gaifrom=!&gailimit=500&meta=userinfo&maxlag=5&prop=info%7Cimageinfo%7Ccategoryinfo&continue=&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata&gaisha1=1fd33cb7c6163260585093846174886af2733cd6&uiprop=blockinfo%7Chasmsg|first
request]] says that there is a continuation which results
[[https://commons.wikimedia.org/w/api.php?inprop=protection&iistart=2007-03-26T01%3A55%3A47Z&indexpageids=&generator=allimages&action=query&gaifrom=!&gailimit=500&meta=userinfo&maxlag=5&prop=info%7Cimageinfo%7Ccategoryinfo&continue=%7C%7Cinfo%7Ccategoryinfo%7Cuserinfo&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata&gaisha1=1fd33cb7c6163260585093846174886af2733cd6&uiprop=blockinfo%7Chasmsg|in
the second request]] which contains the same page.
There is a [[https://gerrit.wikimedia.org/r/174827/|patch]] by @Mpaa which
promises to fix this and @jayvdb said he has also a patch related to this.
TASK DETAIL
https://phabricator.wikimedia.org/T87014
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign
<username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Mpaa, XZise
Cc: jayvdb, Mpaa, Aklapper, XZise, pywikipedia-bugs
_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs