Page MenuHomePhabricator

Port patrol.py to core
Closed, ResolvedPublic

Details

Reference
bz72206

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:47 AM
bzimport added a project: Pywikibot-Scripts.
bzimport set Reference to bz72206.
bzimport added a subscriber: Unknown Object (????).
jayvdb created this task.Oct 18 2014, 7:14 AM

link to bot requirement

IMO this script should be ported using mwlib, and then as a separate task (T71980) we investigate replacing mwlib with mwparserfromhell.

Which of the features are needed?

jayvdb assigned this task to droid.Jan 7 2015, 5:38 PM
jayvdb added subscribers: XZise, droid.

Which of the features are needed?

mwlib or patrol.py ?

If you mean mwlib, @XZise has already provided an assessment of its 'need' on T71980. In short, it isnt needed, but it also isnt very nice to require @droid to change the libraries as part of her OPW project - her goal is to remove reasons that users cant switch to core. Someone else can switch libraries before or after the port, if they believe it should be done. FWIW, I believe it should be done, and may be necessary for it to be done if tool-labs wont install mwlib soon, as Wikisource wants to use this on tool labs as soon as possible.

XZise added a comment.Jan 7 2015, 5:43 PM

Well at least in core I'd be able to assist in doing both at once. The amount of mwlib in patrol.py is not that high that it isn't possible to convert the file and upload it to review including the mwlib usage. I could then provide assistance in removing it in her patch and we are good to go. Or someone with knowledge about compat first implements it there (or I provide a very basic patch which need to be converted from core-like to compat-compatible).

Which of the features are needed?

mwlib or patrol.py ?

I mean the use cases for this script on Wikisource.

jayvdb added a comment.Jan 7 2015, 6:35 PM

Which of the features are needed?

mwlib or patrol.py ?

I mean the use cases for this script on Wikisource.

See the URL in the task description. The compat version was written by me for English Wikisource. It was also used on English Wikipedia, but is no longer needed there. @Billinghurst could provide more information about the current need for this on Wikisource, as I am not active on Wikisource atm.

@XZise, it would be simpler to just use the API , maybe with some textlib but I dont think that is necessary. https://en.wikisource.org/wiki/User:JVbot/patrol_whitelist is a pretty simple format, except for the links. mwlib was used because pywikipedia couldnt parse those links properly, and it wouldnt surprise me if we find some bugs still exist in pywikibot wrt the links used in that page. I also wouldnt be surprised if mwparserfromhell also had bugs wrt those links - mwparserfromhell is not very mature. Changing the parser to a new parser would need unit tests to ensure it correctly understands the whitelist page features, and doesnt have odd bugs (and in the case of mwparserfromhell, it could core dump which limits ability to report and resolve the problems).

Change 184118 had a related patch set uploaded (by Prianka):
Porting patrol.py to core.

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

Patch-For-Review

Change 184118 merged by jenkins-bot:
Port patrol.py to core

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

droid closed this task as Resolved.Apr 5 2015, 9:10 PM
droid set Security to None.