Local key -new in this moment work as duplicate for pagegenerators option -newpages.
This complicates both the code and documentation, and creates difficulties for users trying to use this key, which is not available to other scripts. Accordingly, need to mark this key as deprecated in order to prepare bot owners for its further removal from "interwiki.py"
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| interwiki: Replace -new option with pagegenerators -newpages | pywikibot/core | master | +54 -87 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T76429 argparse support for global & pagegen arguments | |||
| Open | None | T182523 option conflict (tracking) | |||
| Resolved | Xqt | T425439 Mark "-new" as deprecate key and remove it in future |
Event Timeline
Change #1285490 had a related patch set uploaded (by Xqt; author: Xqt):
[pywikibot/core@master] interwiki: Replace -new option with pagegenerators -newpages
WARNING: C:\Users\DragonMsi\Documents\pywikibot2\scripts\interwiki.py:2437: ArgumentDeprecationWarning: -new:30 is deprecated since release 11.3.0; use -newpages:30 instead. main()
Should main() be printed in such cases?
@Ivan-r: The warning system is used here, not the logging system. Colors are implemented for the logging system at Pywikibot but not for the warning system. And also the last line of the stack level is printed by default. To change the default warning would be a feature request and a new issue because it is too extensive to implement it.
Change #1285490 merged by jenkins-bot:
[pywikibot/core@master] interwiki: Replace -new option with pagegenerators -newpages
I see that in another case, there are no extra lines.
Logging in to mcw:pl as ProBot WARNING: API error writeapidenied: You're not allowed to edit this wiki through the API. ERROR: Login failed (writeapidenied). Password for user ProBot on mcw:pl (no characters will be shown):
So it looks like an incorrect implementation of the warning in this particular case, and not normal behavior.