Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-login.py.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  **Steps to replicate the issue**:
  
  Try to logout if you are already logged out
  
    D:\pwb\GIT\core>pwb login -logout
    WARNING: No user is logged in on site wikipedia:de
    Password for user Xqtest on wikipedia:de (no characters will be shown):
    Logging in to wikipedia:de as Xqtest
    Logged out of wikipedia:de.
  
  
  
    D:\pwb\GIT\core>pwb shell
    Welcome to the Pywikibot interactive shell!
    >>> site = pywikibot.Site()
    >>> site.logged_in()
    False
    >>> site.logout()
    WARNING: No user is logged in on site wikipedia:de
    Password for user Xqtest on wikipedia:de (no characters will be shown):
    Logging in to wikipedia:de as Xqtest
    >>> site.logged_in()
    False
    >>>
  
  **What happens here?**:
  API:Logout <https://www.mediawiki.org/wiki/API:Logout> needs a token (see 
also T222508 <https://phabricator.wikimedia.org/T222508>). To get the token a 
login() is made after rPWBCc4fbf0c 
<https://phabricator.wikimedia.org/rPWBCc4fbf0cb17d116b5dd6d04675838d850c454770d>
 if necessary.
  
  If you are logged in a logout() works as expected:
  
    >>> site = pywikibot.Site()
    >>> site.logged_in()
    False
    >>> site.login()
    WARNING: No user is logged in on site wikipedia:de
    Password for user Xqtest on wikipedia:de (no characters will be shown):
    Logging in to wikipedia:de as Xqtest
    >>> site.logged_in()
    True
    >>> site.logout()
  
  **What should have happened instead?**:
  No login() should be made during logout()
  
  **Software version** (skip for WMF-hosted wikis like Wikipedia):
  Pywikibot 3.0.20190722+

TASK DETAIL
  https://phabricator.wikimedia.org/T326614

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Aklapper, pywikibot-bugs-list, Xqt, PotsdamLamb, Jyoo1011, JohnsonLee01, 
SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Framawiki, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to