[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-04-08 Thread Dvorapa
Dvorapa added a comment. Okay, if any issue with the new release occur, please create a new task with a new description of the problem. The issue with `retry=True` and deleting password might still occur, but we need to know more details about how it happens TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-04-01 Thread Dvorapa
Dvorapa added a comment. You can try https://test.pypi.org/project/pywikibot-test/ (but I created it in a rush, so no guarantee it will work properly) TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-04-01 Thread Seppl2013
Seppl2013 added a comment. Could you please put a release on test.pypi.org so that I can install the master with pip ... TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa,

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-31 Thread Dvorapa
Dvorapa added a comment. password is deleted if there is **ANY** issue with login, which is not correct. But I hope all issues should be fixed now TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-31 Thread Seppl2013
Seppl2013 added a comment. Thx for the offer. I am fine as long as i have a workaround ... no need to hurry then. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt,

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-31 Thread Dvorapa
Dvorapa added a comment. Wait for the patches that I made today. Hopefully this will work finally and no patch needs to be done. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dvorapa Cc:

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-31 Thread Seppl2013
Seppl2013 added a comment. Again i had to do a patch to make sure the password is not forgot with two lines: login.py: site.password=password site.__init__.py: self.password=None # in constructor login_manager = api.LoginManager(site=self,

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-30 Thread Dvorapa
Dvorapa added a comment. Okay, please test the most current Pywikibot master if you can and tell me if there is something that works incorrect. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To:

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-30 Thread Seppl2013
Seppl2013 added a comment. I suspect: login_manager = api.LoginManager(site=self, user=self.username()) if login_manager.login(retry=True, autocreate=autocreate): as the culprit .. here it might be that the existing password seems to be forgotten again. TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-30 Thread Seppl2013
Seppl2013 added a comment. Thx. There is a followup problem. When trying to login to a Mediawiki 1.33.2 system I get: WARNING: API error readapidenied: You need read permission to use this module. WARNING: API error readapidenied: You need read permission to use this module.

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-28 Thread Seppl2013
Seppl2013 added a comment. Very good. I think this task can be closed now. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013,

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-28 Thread Dvorapa
Dvorapa added a comment. In T248471#6005754 , @Seppl2013 wrote: > Thx the data.api LoginManager works. How do i get rid of the warning: > > WARNING: API warning (login): Main-account login via action=login is deprecated and may

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. Thx the data.api LoginManager works. How do i get rid of the warning: 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

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Dvorapa
Dvorapa added a comment. Gerrit patch uploader: all steps to generate and upload patch are described: https://tools.wmflabs.org/gerrit-patch-uploader/ > pywikbot.api does not seem to exist and for: Sorrry, it should be pywikibot.data.api, but this is easy to find out: from

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. https://test.pypi.org/project/py-3rdparty-mediawiki/0.0.2rc0/ has the latest code that works with the patch. https://github.com/WolfgangFahl/py-3rdparty-mediawiki/blob/master/wikibot/wikibot.py#L135 has your proposal but commented it since it breaks the tests.

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. I am trying to figure out how to create a patch file with https://cocoon.apache.org/2.0/howto/howto-patch.html - the unified diff there looks different than the rcsdiff patch above. What is needed for a proper patch file? TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. The new patch seems to be: rcsdiff __init__.py === RCS file: RCS/__init__.py,v retrieving revision 1.1 diff -r1.1 __init__.py 2026c2026 < def login(self, sysop=None,

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. https://pypi.org/project/pywikibot/ shows a build error ... TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013,

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. When i debug the code i end up in: def getCookie(self): """ Login to the site. @see: U{https://www.mediawiki.org/wiki/API:Login} @return: cookie data if successful, None otherwise. """

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. It looks like site.py is gone now and code moved to site/__init__.py ... what is the motivation for this inorthodox coding style? TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. Tried it and it does not work as advertised. pywikbot.api does not seem to exist and: from pywikibot.login import LoginManager lm = LoginManager(password=self.getPassword(), site=self.site, user=self.user) lm.login() the result is an error:

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. now my software is broken again and I need to repatch manually since pip uninstall removed the RCS directory ... TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To:

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Dvorapa
Dvorapa added a comment. https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.html?highlight=loginmanager#pywikibot.login.LoginManager from pywikibot.api import LoginManager lm = LoginManager(password='', site=pywikibot.Site('', ''), user='') lm.login() If

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. How? TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho,

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Dvorapa
Dvorapa added a comment. Why don't you use LoginManager directly if you need to pass a password? TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dvorapa Cc: Dvorapa, Xqt, Mpaa, Aklapper,

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. From my point the proposed change is not a workaround. It's fine. The encryption in this case was motivated to be MediaWiki-Japi compatible which uses https://github.com/WolfgangFahl/py-3rdparty-mediawiki/blob/master/wikibot/crypt.py inspired by

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Dvorapa
Dvorapa added a comment. Note: `readPassword` seems to be the method, that needs adjustments in this case or there should be created a new little brother/sister method to it. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Dvorapa
Dvorapa added a comment. @Seppl2013 I don't understand. What's the difference in encryption between `user-config.py` and `passwordfile`? Both are just text files and both accept the same values, only passwordfile is deditated only to passwords and not to other settings. Also there is a

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. https://stackoverflow.com/questions/59254302/how-to-login-with-pywikibot-using-password-from-environment-variable/60882730#60882730 shows that others have the same need TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. @Dvorpa - if you now how to handle the patch upload could you please do it for me - i don't know how to create a patchfile from an RCS diff. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-27 Thread Seppl2013
Seppl2013 added a comment. @Dvorpa - i'd like to keep my passwords encrypted. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013,

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-26 Thread Dvorapa
Dvorapa added a comment. @Seppl2013 Have you tried password file? From what I know `authenticate` is for server password, not for user password. Please try and tell me if this is the cause of your issue! TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-26 Thread Dvorapa
Dvorapa added a comment. In T248471#6001011 , @Seppl2013 wrote: > Since it's only two lines it looks very awkward to learn a new tool chain for this. WikiMedia still lives in its own development world so that it is hard for outsiders

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-26 Thread Seppl2013
Seppl2013 added a comment. I am preparing a new python package at https://github.com/WolfgangFahl/py-3rdparty-mediawiki and would love to concentrate on this. This new package will depend on the patch above. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-26 Thread Seppl2013
Seppl2013 added a comment. Since it's only two lines it looks very awkward to learn a new tool chain for this. WikiMedia still lives in its own development world so that it is hard for outsiders to contribute effectivly. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-25 Thread Xqt
Xqt added a comment. @Seppl2013: Could you please commit your patch to the Gerrit repository for reviewing. You may use "gerrit patch uploader" if you don't have a developer accout at gerrit, see https://www.mediawiki.org/wiki/Gerrit_patch_uploader TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-25 Thread Seppl2013
Seppl2013 added a comment. The patch seems to work for all 45 of my sites. It would be great if it would make it into the release. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013

[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling

2020-03-25 Thread Seppl2013
Seppl2013 added a comment. I am currently experimenting with this patch: RCS file: RCS/site.py,v retrieving revision 1.1 diff -r1.1 site.py 2017c2017 < def login(self, sysop=False, autocreate=False): --- > def login(self, sysop=False,