Page MenuHomePhabricator

Reduce (API) warning clutter in login.py after clean installation
Open, LowestPublic

Description

Steps to reproduce

  1. Follow steps of https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation like a new user

Expected behavior

$ python pwb.py login
Password for user DvorapaBot on wikipedia:cs (no characters will be shown): 
Logged in on wikipedia:cs as DvorapaBot.

Current behavior

$ python pwb.py login
Password for user DvorapaBot on wikipedia:cs (no characters will be shown): 
Logging in to wikipedia:cs as DvorapaBot
WARNING: API warning (main): Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes. Use [[Special:ApiFeatureUsage]] to see usage of deprecated features by your application.
WARNING: API warning (login): Main-account login via "action=login" is deprecated and may stop working without warning. To continue login with "action=login", see [[Special:BotPasswords]]. To safely continue using main-account login, see "action=clientlogin".
Logged in on wikipedia:cs as DvorapaBot.

Configuration
Python 3.6.2, latest commit in pywikibot master

Event Timeline

Xqt triaged this task as Lowest priority.Oct 12 2017, 2:41 PM
Dvorapa renamed this task from Reduce API warning clutter in login.py after clean installation to Reduce (API) warning clutter in login.py after clean installation.Oct 6 2018, 2:22 PM

Isn't this solved with T137805 already?

$ python pwb.py login -logout
Logged out of wikipedia:cs.
$ python pwb.py login
WARNING: No user is logged in on site wikipedia:cs
Password for user DvorapaBot on wikipedia:cs (no characters will be shown): 
Logging in to wikipedia:cs as DvorapaBot
Logged in on wikipedia:cs as DvorapaBot.

Well, the major issue yes, do we want to consolidate also these messages into one? Like:

$ python pwb.py login
Password for user DvorapaBot on wikipedia:cs (no characters will be shown): 
Logged in on wikipedia:cs as DvorapaBot.

Or perhaps merge their styles? (remove unnecessary "WARNING:" prefix)

$ python pwb.py login
No user is logged in on site wikipedia:cs
Password for user DvorapaBot on wikipedia:cs (no characters will be shown): 
Logging in to wikipedia:cs as DvorapaBot
Logged in on wikipedia:cs as DvorapaBot

What do you think?

$ python pwb.py login -logout
Logged out of wikipedia:cs.
$ python pwb.py login
WARNING: No user is logged in on site wikipedia:cs
Password for user DvorapaBot on wikipedia:cs (no characters will be shown): 
Logging in to wikipedia:cs as DvorapaBot
Logged in on wikipedia:cs as DvorapaBot.

Well, the major issue yes, do we want to consolidate also these messages into one? Like:

$ python pwb.py login
Password for user DvorapaBot on wikipedia:cs (no characters will be shown): 
Logged in on wikipedia:cs as DvorapaBot.

Or perhaps merge their styles? (remove unnecessary "WARNING:" prefix)

$ python pwb.py login
No user is logged in on site wikipedia:cs
Password for user DvorapaBot on wikipedia:cs (no characters will be shown): 
Logging in to wikipedia:cs as DvorapaBot
Logged in on wikipedia:cs as DvorapaBot

What do you think?

I am for second option without warnings. Pywikibot shouldn't show WARNING: No user is logged in on site wikipedia:cs as python pwb.py login is for it.