There are two remaining scripts using -total instead of -limit option:
- redirect.py
- unused_files.py
This should be changed for consistency
There are two remaining scripts using -total instead of -limit option:
This should be changed for consistency
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Renamed -total option to -limit at redirect.py and unusedfiles.py | pywikibot/core | master | +26 -12 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T76429 argparse support for global & pagegen arguments | |||
Open | None | T182523 option conflict (tracking) | |||
Open | None | T100610 -limit argument conflict | |||
Resolved | None | T148354 -total option should be renamed to -limit |
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
-total
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.
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
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
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..
Change 484007 restored by Xqt:
Renamed -total option to -limit at redirect.py and unusedfiles.py
Change 484007 abandoned by Zoranzoki21:
I am not sure how to handle this..
I did it for you :)
Change 484007 merged by jenkins-bot:
[pywikibot/core@master] Renamed -total option to -limit at redirect.py and unusedfiles.py