Chad added a comment.
Started (see https://phabricator.wikimedia.org/P242). Should take an hour or so to all catch up.
TASK DETAIL
https://phabricator.wikimedia.org/T87248
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: Chad
Cc: Krinkle, XZise, valhallasw, JanZerebecki, Nikerabbit, siebrand, cpa199, zhaofengli, llbraughler, adrianheine, Krenair, Xqt, jayvdb, fbstj, greg, Legoktm, Chad, MarkTraceur, matmarex, UltrasonicNXT, Aklapper, QChris, pywikipedia-bugs
jayvdb added a comment.
If this is the case, and it does look like it, we need to remove 'step' from site.random, as this API has no continuation mechanism as far as I can see.
TASK DETAIL
https://phabricator.wikimedia.org/T84944
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: jayvdb
Cc: gerritbot, valhallasw, jayvdb, Aklapper, Mpaa, pywikipedia-bugs
Mpaa added a comment.
@valhallasw: yes, that was what I meant with "If one is unlucky enough, the random start of a batch might fail in an already seen interval"
TASK DETAIL
https://phabricator.wikimedia.org/T84944
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
Cc: gerritbot, valhallasw, jayvdb, Aklapper, Mpaa, pywikipedia-bugs
valhallasw triaged this task as "Low" priority.
valhallasw added a comment.
Sounds good! One issue with docstrings is that most people don't realize .py files can be opened and inspected for documentation, so providing it as a seperate README is helpful.
TASK DETAIL
https://phabricator.wikimedia.org/T66847
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: valhallasw
Cc: jayvdb, valhallasw, Mpaa, Spage, pywikipedia-bugs
valhallasw added a subscriber: valhallasw.
valhallasw added a comment.
In https://phabricator.wikimedia.org/T84944#941417, @Mpaa wrote:
> I guess each request in the QueryGenerator _Iter_ loop is independent from the previous. If one is unlucky enough, the random start of a batch might fail in an already seen interval?
>From https://en.wikipedia.org/w/api.php?action=help&modules=query%2Brandom :
> Pages are listed in a fixed sequence, only the starting point is random. This means that if, for example, "Main Page" is the first random page on your list, "List of fictional monkeys" will *always* be second, "List of people on stamps of Vanuatu" third, etc.
This means there can be overlaps if multiple requests to query=random are made, the same page /can/ be returned twice. The assumption there can be no duplicates is therefore false.
TASK DETAIL
https://phabricator.wikimedia.org/T84944
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: valhallasw
Cc: valhallasw, jayvdb, Aklapper, Mpaa, pywikipedia-bugs
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=&gen… request]] says that there is a continuation which results [[https://commons.wikimedia.org/w/api.php?inprop=protection&iistart=2007-03-2… 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
Mpaa created this task.
Mpaa added a subscriber: Mpaa.
Mpaa added a project: pywikibot-core.
TASK DESCRIPTION
Botwiki has currently MW 1.19 and it is quite unused.
We could handshake with them not to upgrade the wiki and use it as test site with a lower MW version.
I was trying to run basic tests (I had to change botwiki_family.py removing self.namespaces dict) with in but I get:
```
>>> site = pywikibot.Site('botwiki', 'botwiki')
>>> page = pywikibot.Page(site, 'Main_Page')
>>> page
Page(Main Page)
>>> page.text
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/python/core/pywikibot/page.py", line 440, in text
self._text = self.get(get_redirect=True)
File "/home/user/python/core/pywikibot/tools.py", line 711, in wrapper
return obj(*__args, **__kw)
File "/home/user/python/core/pywikibot/page.py", line 349, in get
self._getInternals(sysop)
File "/home/user/python/core/pywikibot/page.py", line 373, in _getInternals
self.site.loadrevisions(self, getText=True, sysop=sysop)
File "/home/user/python/core/pywikibot/site.py", line 3159, in loadrevisions
step=step, total=total, **rvargs)
File "/home/user/python/core/pywikibot/site.py", line 1587, in _generator
gen = gen_class(type_arg, site=self, **args)
File "/home/user/python/core/pywikibot/data/api.py", line 1689, in __init__
QueryGenerator.__init__(self, prop=prop, **kwargs)
File "/home/user/python/core/pywikibot/data/api.py", line 1299, in __init__
set(self.modules) & self.site._paraminfo.query_modules_with_limits
File "/home/user/python/core/pywikibot/data/api.py", line 437, in query_modules_with_limits
self.fetch(self.query_modules)
File "/home/user/python/core/pywikibot/data/api.py", line 402, in query_modules
self._init()
File "/home/user/python/core/pywikibot/data/api.py", line 218, in _init
assert('type' in query_modules_param)
AssertionError
```
At first site it looks paraminfo has some issue with that version (?).
TASK DETAIL
https://phabricator.wikimedia.org/T85786
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
Cc: Aklapper, Mpaa, jayvdb, pywikipedia-bugs