Andrybak added a comment.
I applied the patch locally:
$ git log -1 --oneline
970f1f086 (HEAD -> stable, tag: 10.7.2, origin/stable) [10.7.2] Add support
for tokwiki and publish 10.7.2 release
$ git diff
diff --git a/pywikibot/login.py b/pywikibot/login.py
index e7eb88cc7..eefb39d95 100644
--- a/pywikibot/login.py
+++ b/pywikibot/login.py
@@ -23,7 +23,6 @@ from pywikibot.comms import http
from pywikibot.exceptions import APIError, NoUsernameError
from pywikibot.tools import (
PYTHON_VERSION,
- deprecated,
file_mode_checker,
normalize_username,
)
@@ -288,7 +287,7 @@ class LoginManager:
continue
if botpassword:
- entry = (entry[0], BotPassword(*entry[1]))
+ entry = (*entry[:-1], BotPassword(*entry[-1]))
code, family, username, password = (
self.site.code, self.site.family.name)[:4 - entry_len] +
entry
@@ -539,16 +538,6 @@ class ClientLoginManager(LoginManager):
raise pywikibot.exceptions.APIError(code=status, info=fail_reason)
- @deprecated("site.tokens['login']", since='8.0.0')
- def get_login_token(self) -> str | None:
- """Fetch login token.
-
- .. deprecated:: 8.0
-
- :return: login token
- """
- return self.site.tokens['login']
-
class BotPassword:
and it works for me:
$ python pwb.py login -logout
Logged out of redacted:en.
Execution time: 2 seconds
$ python pwb.py login
Logging in to redacted:en as AndrybakBot@AndrybakBot
Logged in on redacted:en as AndrybakBot.
Execution time: 2 seconds
TASK DETAIL
https://phabricator.wikimedia.org/T412074
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]