Page MenuHomePhabricator

-total option should be renamed to -limit
Closed, ResolvedPublic

Description

There are two remaining scripts using -total instead of -limit option:

  • redirect.py
  • unused_files.py

This should be changed for consistency

Related Objects

Event Timeline

Xqt triaged this task as Lowest priority.Oct 17 2016, 6:22 AM

Limit is more intuitive in my opinion.

Anyway, this is a breaking change, so we need a long deprication period while both are recognized. Such a change makes harder also the compat->core transition.

What about having both globally as synonims? It is a simple "or" in command line parsing, and causes no problems.

All changes will be implemented to be backward compatible to previous releases and compat too. We would have -limit as a synonyme to -total but an ArgumentDeprecationWarning would be shown. Look for the alias/warning done for the old -<mode>log options which we have still in compat.

Currently we have -limit and -total options:

-limit

  • casechecker
  • checkimages
  • lonelypages
  • reflinks
  • welcome

-total

  • redirect
  • unused_files

But I guess all method use total parameter for the numer of pages to be processed.

Why do you think so?
Limit is more familiar to people because of SQL use, and this is a similar role.

Why do you think so?
Limit is more familiar to people because of SQL use, and this is a similar role.

Just for consistency with total parameter of all page and site methods which is confusing.
limit is used for api query limits reading data in one bulk. But unfortunately this is not consistent in api.py

Why do you think so?
Limit is more familiar to people because of SQL use, and this is a similar role.

Just for consistency with total parameter of all page and site methods which is confusing.
limit is used for api query limits reading data in one bulk. But unfortunately this is not consistent in api.py

This is similar to comment/summary/message issue. If standardizing, I would choose limit as it is more apropriate semantically (at least in my country). Limit is understood as an end in the middle of the work, whereas total is often understood as a selection (part, compilation) from the group. Besides that it is much broader used in Pwb

OK then we should work on consistancy in this way.

Xqt renamed this task from pagegenerators -limit option should be renamed to -total to -total option should be renamed to -limit.Jan 12 2019, 5:23 PM
Xqt updated the task description. (Show Details)

Change 484007 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[pywikibot/core@master] Renamed -total option to -limit at redirect.py and unusedfiles.py

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

Change 484007 abandoned by Zoranzoki21:
Renamed -total option to -limit at redirect.py and unusedfiles.py

Reason:
I am not sure how to handle this..

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

Kizule removed projects: Patch-For-Review, User-Kizule.
Kizule subscribed.

Change 484007 restored by Xqt:
Renamed -total option to -limit at redirect.py and unusedfiles.py

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

Change 484007 abandoned by Zoranzoki21:
I am not sure how to handle this..

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

I did it for you :)

Change 484007 abandoned by Zoranzoki21:
I am not sure how to handle this..

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

I did it for you :)

Thanks!

Change 484007 merged by jenkins-bot:
[pywikibot/core@master] Renamed -total option to -limit at redirect.py and unusedfiles.py

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

Patch merged, this should be closed as resolved.