Page MenuHomePhabricator

-user argument conflict
Closed, ResolvedPublic

Description

-user: was added as a global argument to core in Dec 2008, and backported to compat in May 2012.
https://mediawiki.org/wiki/Special:Code/pywikipedia/6171
https://mediawiki.org/wiki/Special:Code/pywikipedia/10261

However, -user was in use by several scripts, and used for a conflicting purpose.

clean_sandbox.py : '-user' boolean to enable the bot to operate within userspace. It does work, as -user: and -user are different (global arg parsing ignores '-user' as it doesnt end in a colon). However it will present a major problem for the argparse implementation, and is very confusing. It is also buggy: T87634

-userlist was renamed -user in compat, Feb 2012, and copied to core, December 2012
https://mediawiki.org/wiki/Special:Code/pywikipedia/9899
https://mediawiki.org/wiki/Special:Code/pywikipedia/10768

template.py : '-user:' string argument to process pages by the user - impossible to use this argument, excepting selecting the bot's user account, as the global arg parser requires a password for that username.

Added to compat in Nov 2010, and ported to core in Sep 2011
https://mediawiki.org/wiki/Special:Code/pywikipedia/8698
https://mediawiki.org/wiki/Special:Code/pywikipedia/9545

patrol.py : identical problem as template.py

-user was part of the initial compat script, March 2011. not yet ported to core.
https://mediawiki.org/wiki/Special:Code/pywikipedia/9090

Event Timeline

jayvdb claimed this task.
jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptJan 27 2015, 4:19 AM
valhallasw triaged this task as Medium priority.Jan 29 2015, 9:26 PM
valhallasw subscribed.

Change 209994 had a related patch set uploaded (by Ladsgroup):
Deprecating -user argument in clean_sandbox.py

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

Change 209994 abandoned by Ladsgroup:
Deprecating -user argument in clean_sandbox.py

Reason:
Alternate patch got merged: If6de6b1a3df60b762d8dc99f1310602eee61d03f

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

clean_sandbox.py done; template.py still to be done.

Xqt subscribed.

core is usable. We don't need to have those enhancements for compat anymore.

Change 266212 had a related patch set uploaded (by Xqt):
[BREAK] Solve -user argument conflict.

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

Change 266330 had a related patch set uploaded (by Mpaa):
template.py: Solve -user argument conflict.

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

Change 266330 abandoned by Mpaa:
template.py: Solve -user argument conflict.

Reason:
Did not realise was already done in Ifb07f1e0d2ddc0e7cb780e21565cdaa04860c5d2

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

Change 266212 had a related patch set uploaded (by Xqt):
[BREAK] Solve -user argument conflict

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

Change 266212 merged by jenkins-bot:
[BREAK] Solve -user argument conflict

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