[Pywikipedia-bugs] [Maniphest] [Commented On] T130570: -user fails when -lang not set for single site family
Seppl2013 added a comment. It's 2019 and this isn't even mentioned in the documentation page yet. TASK DETAIL https://phabricator.wikimedia.org/T130570 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Seppl2013, Mika77, Aklapper, jayvdb, pywikibot-bugs-list, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Dalba, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T195921: User specified in -user is ignored when no username in config
Seppl2013 added a comment. https://www.mediawiki.org/wiki/Manual_talk:Pywikibot/Use_on_third-party_wikis is inconsistent with this. TASK DETAIL https://phabricator.wikimedia.org/T195921 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Seppl2013, Aklapper, Dalba, Framawiki, pywikibot-bugs-list, Dvorapa, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T234135: Trying to get pywikibot running by following documentation fails
Seppl2013 added a comment. Ok I am continuing my search for the root directory in which to find generate_family.py - at https://www.mediawiki.org/wiki/Manual:Pywikibot/Scripts it's a red link ... TASK DETAIL https://phabricator.wikimedia.org/T234135 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, pywikibot-bugs-list, Seppl2013, Aklapper, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T234135: Trying to get pywikibot running by following documentation fails
Seppl2013 added a comment. I tried: register_family_file(family, os.path.abspath(os.path.expanduser("~")+'/.pywikibot/families')+"/"+family+".py") in **user-config.py** # -*- coding: utf-8 -*- import os family = 'royalfamily' register_family_file(family, os.path.abspath(os.path.expanduser("~")+'/.pywikibot/families')+"/"+family+".py") mylang = 'en' usernames[family]['en'] = u'wf' console_encoding = 'utf-8' password_file = "wf-password.py" #family_files[family] = 'http://royal-family.bitplan.com/' #register_families_folder()) #use_api_login = True and cat royalfamily_family.py from pywikibot import family class Family(family.Family): name = 'royalfamily' langs = { 'en': 'http://royal-family.bitplan.com/' } with the result: python3 migrate.py Traceback (most recent call last): File "migrate.py", line 4, in mysite = pywikibot.Site() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pywikibot/__init__.py", line 1237, in Site fam = Family.load(fam) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pywikibot/tools/__init__.py", line 1738, in wrapper return obj(*__args, **__kw) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pywikibot/family.py", line 1008, in load raise UnknownFamily('Family %s does not exist' % fam) pywikibot.exceptions.UnknownFamily: Family royalfamily does not exist CRITICAL: Exiting due to uncaught exception TASK DETAIL https://phabricator.wikimedia.org/T234135 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, pywikibot-bugs-list, Seppl2013, Aklapper, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Updated] T234135: Trying to get pywikibot running by following documentation fails
Seppl2013 added a comment. thx for the comments. The actual problem is that the warnings do not make sense. They refer to something independent like Global configuration variable "mylang" and are therefor confusing for newbies. Yes https://www.mediawiki.org/wiki/Manual:Pywikibot/Use_on_third-party_wikis is the documentation I tried for this. Yes the alternative statement is in the same user-config.py file and commented out/in for the two attempts i made. I do not know how to use generate_family_files.py. The documentation says: //The generate_family_file.py in the root directory// Obviously it's not referrring to the root directory of my MacOS installation. But it looks like i am expected to search for this root directory. So a google search shows me https://phabricator.wikimedia.org/T153891 So I am expecting it will crash if i try it ... since that task is open since December 2016 ... TASK DETAIL https://phabricator.wikimedia.org/T234135 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, pywikibot-bugs-list, Seppl2013, Aklapper, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Updated] T130570: -user fails when -lang not set for single site family
Seppl2013 added a comment. I assume the WARNING: /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pywikibot/site.py:774: UserWarning: Global configuration variable "mylang" changed to "royalfamily" while instantiating site royalfamily:royalfamily in https://phabricator.wikimedia.org/T234135 to be based on ths issue https://phabricator.wikimedia.org/T130570. https://www.mediawiki.org/wiki/Manual:Pywikibot/Use_on_third-party_wikis has no reference of this issue. It might be sensible to link a "known problems" section. TASK DETAIL https://phabricator.wikimedia.org/T130570 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Seppl2013, Mika77, Aklapper, jayvdb, pywikibot-bugs-list, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, Dalba, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T234135: Trying to get pywikibot running by following documentation fails
Seppl2013 added a comment. Indeed I get the same "no module named royalfamily" error as you do with: #!/usr/bin/python # -*- coding: utf-8 -*- import os import pywikibot # no need to import in user_config.py from pywikibot import config2 # no need to import in user_config.py family = 'royalfamily' mylang = 'en' config2.register_family_file(family, os.path.abspath(os.path.expanduser("~")+'/.pywikibot/families')+"/"+family+".py") mysite=pywikibot.Site(mylang, family) print(mysite.sitename) So I improved it to: #!/usr/bin/python # -*- coding: utf-8 -*- import os import pywikibot # no need to import in user_config.py from pywikibot import config2 # no need to import in user_config.py family = 'royalfamily' mylang = 'en' familyfile=os.path.abspath(os.path.expanduser("~")+'/.pywikibot/families')+"/"+family+"_family.py" if not os.path.isfile(familyfile): print ("family file %s is missing" % (familyfile)) else: print ("will try to use family file %s" % (familyfile)) config2.register_family_file(family, familyfile) mysite=pywikibot.Site(mylang, family) print(mysite.sitename) With the expected result python3 migrate.py will try to use family file /Users/wf/.pywikibot/families/royalfamily_family.py royalfamily:en I have added the example code to https://www.mediawiki.org/wiki/Manual:Pywikibot/Use_on_third-party_wikis#Configuring_custom_families_folder and recommend to close this issue. Thanks a lot for the swift reactions and in depth discussion. TASK DETAIL https://phabricator.wikimedia.org/T234135 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, pywikibot-bugs-list, Seppl2013, Aklapper, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T234135: Trying to get pywikibot running by following documentation fails
Seppl2013 added a comment. Sorry - the next issue is coming up: WARNING: /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pywikibot/family.py:71: _NotImplementedWarning: royalfamily_family.__new__.__init__ is deprecated. cls.instance.__init__() Which looks like the syntax: # -*- coding: utf-8 -*- from pywikibot import family class Family(family.Family): def __init__(self): self.name = 'royalfamily' self.langs = { 'en': 'http://royal-family.bitplan.com/' } def scriptpath(self, code): return '' is not o.k. although I just changed the doc page assuming the examples in https://www.mediawiki.org/wiki/Manual:Pywikibot/Third-party_Wiki_Quick_Start would be o.k. TASK DETAIL https://phabricator.wikimedia.org/T234135 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, pywikibot-bugs-list, Seppl2013, Aklapper, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T234135: Trying to get pywikibot running by following documentation fails
Seppl2013 added a comment. # -*- coding: utf-8 -*- from pywikibot import family class Family(family.Family): name = 'royalfamily' langs = { 'en': 'royal-family.bitplan.com', } def scriptpath(self, code): return '' works - so it's looks the example is outdated. TASK DETAIL https://phabricator.wikimedia.org/T234135 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, pywikibot-bugs-list, Seppl2013, Aklapper, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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 https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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 https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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: write() argument must be str, not None from the middle of nowhere. The patch looks so much simpler and i understand it ... 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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: Seppl2013 Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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. """ # THIS IS OVERRIDDEN IN data/api.py return None ??? 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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 https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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. You'll need to prepare at least one ini file with your credentials if you want to test your self so you might be the first to create the issue mentioned in http://mediawiki-japi.bitplan.com/index.php/Py-3rdparty-mediawiki#Features 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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, autocreate=False): --- > def login(self, sysop=None, autocreate=False,password=None): 2089c2089 < login_manager = api.LoginManager(site=self, user=self.username()) --- > login_manager = api.LoginManager(site=self, user=self.username(),password=password) Things run again - only 4 x slower than with the 2019 version ... 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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 https://stackoverflow.com/questions/24168246/replicate-javas-pbewithmd5anddes-in-python-2-7 that's why it's important to be able to set the password via API and not from a configuration file. In fact https://test.pypi.org/project/py-3rdparty-mediawiki/0.0.2b0/ only uses put_throttle = 0 as the content of user-config.py to simplify things as in mediawiki -japi down to from wikibot.wikibot import WikiBot wikibot=WikiBot.ofWikiId("test2") wikibot.site ... the necessary family files are generated and registered on the fly from the Mediawiki-Japi ini files. https://github.com/WolfgangFahl/py-3rdparty-mediawiki/blob/master/wikibot/wikibot.py needs the patch at: self.site.login(password=self.getPassword()) at this point. If you can supply a similar solution that's also fine. 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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, Xqt, Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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 Cc: Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Created] T248471: pywikibot password handling
Seppl2013 created this task. Seppl2013 added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION To use pywikibot with a farm of wikis i try to set the login password via software. I am getting the password from an encrypted source. The line config2.authenticate[self.netloc] = (self.user,self.getPassword()) didn't seem to have any effect in my adapter code so i started debugging the login process. It looks like LoginManager has a password field which is not used in site.php: class LoginManager(object): """Site login manager.""" @deprecated_args(username='user', verbose=None) def __init__(self, password=None, sysop=False, site=None, user=None): login_manager = api.LoginManager( site=self, sysop=sysop, user=self._username[sysop]) The login function in LoginManager does not have a password parameter at all. The current code structure makes it really awkward to supply a password via software. if not self.password: # First check that the username exists, # to avoid asking for a password that will not work. if not autocreate: self.check_user_exists() # As we don't want the password to appear on the screen, we set # password = True self.password = pywikibot.input( It would be great if the logic would be changed to making a password available via api would be made simpler e.g. by having password=None as an optional parameter for login. TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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, autocreate=False,password=None): 2088c2088 < site=self, sysop=sysop, user=self._username[sysop]) --- > site=self, sysop=sysop, user=self._username[sysop],password=password) would there be more to it than these two lines? TASK DETAIL https://phabricator.wikimedia.org/T248471 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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 safely continue using main-account login, see action=clientlogin. I specifically want to make changes on behalf of main acount users. 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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, user=self.username(), password=self.password) i would laugh about how awkward the code is if it wasn't for how complicated things got in doing this open source multi developer multi -year patching style ... If i supply: mw_version password user site and what not why on earth would the API decide to fetch this via API - e.g. looking at a timeout value whether the version might have been changed. Boy i am telling the API the verison to make sure it doesn't have to look it up ... 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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, Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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. ERROR: APIError: readapidenied: You need read permission to use this module. [help: See http://.bitplan.com/api.php for API usage. 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.] WARNING: API error readapidenied: You need read permission to use this module. WARNING: API error readapidenied: You need read permission to use this module. WARNING: Could not check user ... exists on ...:en Password for user ... on ...:en (no characters will be shown): Warning: Password input may be echoed. So there is a lot of activity the framework does on the API which still fails to deliver the login. I'd prefer an API where login means login and not checking whether there is a user and other other stuff which eventually leads to not login in but asking for a password which was already supplied ... 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Updated] T248471: pywikibot password handling
Seppl2013 added a comment. Sigh - this is like a catch 22 see how https://phabricator.wikimedia.org/T248673 got closed while i am stuck with MW 1.27.3. So neither my old wiki nor my new wiki is useable in the process of semi-automatic migration ... 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, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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 PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: pywikibot password handling
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 https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: login() with retry=True might delete correct password if unknown APIError occurs
Seppl2013 added a comment. I have tried today with pywikibot>=3.0.20200508 and on my local machine the tests run. I am having some trouble in the travis environment of a project I am using things now - I'll create a separate issue for that. 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, JohnsonLee01, Dijkstra, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T253378: pywikibot transitive dependency on crypto
Seppl2013 added a comment. Looks like this is a general pip problem with transitive dependencies. The pycrypto library is also explcitly mentioned in the requirements.txt file for py-3rdparty-mediawiki. I'll try to release that library on pypi to see if that fixes the issue. TASK DETAIL https://phabricator.wikimedia.org/T253378 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: pywikibot-bugs-list, Aklapper, Seppl2013, JohnsonLee01, Dijkstra, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T253378: pywikibot transitive dependency on crypto
Seppl2013 added a comment. see https://pypi.org/project/py-3rdparty-mediawiki/0.0.2/ TASK DETAIL https://phabricator.wikimedia.org/T253378 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: pywikibot-bugs-list, Aklapper, Seppl2013, JohnsonLee01, Dijkstra, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Created] T254003: How to use pywikibot to get data from SMW ask API?
Seppl2013 created this task. Seppl2013 added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION The SemanticMediaWiki extension has it's own Mediawiki API extensions see https://www.semantic-mediawiki.org/wiki/Help:API I'd like to use pywikbot to use these API funtions and created the following pyunit test: api=APIGenerator("ask",query="[[Topic name::Fixme]]",site=site) for item in api: print (item) When i try this i get: WARNING: API warning (main): Unrecognized parameter: 'continue' TASK DETAIL https://phabricator.wikimedia.org/T254003 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, Dijkstra, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Edited] T254003: How to use pywikibot to get data from SMW ask API?
Seppl2013 updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T254003 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, Dijkstra, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T254003: How to use pywikibot to get data from SMW ask API?
Seppl2013 added a comment. @Xqt - thanks for looking into this. I am currently adding this to https://github.com/WolfgangFahl/py-3rdparty-mediawiki/issues/1 with https://github.com/WolfgangFahl/py-3rdparty-mediawiki/blob/master/wikibot/smw.py where I am happily using a standard Request for the time being to simplify things. It seems that APIGenerator adds caching handling and some legacy stuff as well as continuation - for the time being i'd focus more on the core functionality of unpacking the printrequest structures delivered and being able to use cut for ask queries. The implementation will be mostly along the lines of https://github.com/BITPlan/com.bitplan.simplegraph/blob/master/simplegraph-smw/src/main/java/com/bitplan/simplegraph/smw/SmwSystem.java where this was already succesfully implemented in Java. TASK DETAIL https://phabricator.wikimedia.org/T254003 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, Dijkstra, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T171886: installing pywikibot with pip fails because the package isn't a git repository; setup.py is unable to find the version of pywikibot
Seppl2013 added a comment. You trial was obviously on Windows and not Ubuntu 18.04 LTS TASK DETAIL https://phabricator.wikimedia.org/T171886 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: valhallasw, Seppl2013 Cc: JJMC89, matej_suchanek, Multichill, Xqt, Dvorapa, Seppl2013, valhallasw, zhuyifei1999, Framawiki, pywikibot-bugs-list, Aklapper, Mateusz_Konieczny, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T171886: installing pywikibot with pip fails because the package isn't a git repository; setup.py is unable to find the version of pywikibot
Seppl2013 added a comment. Please reopen this issue - marking it invalid since it's not reproducible in the Wikimedia Universe is not helpful for those having the problem in their own environment . TASK DETAIL https://phabricator.wikimedia.org/T171886 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: valhallasw, Seppl2013 Cc: JJMC89, Multichill, Xqt, Dvorapa, Seppl2013, valhallasw, zhuyifei1999, Framawiki, pywikibot-bugs-list, Aklapper, Mateusz_Konieczny, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Lewizho99, Mdupont, Maathavan, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T171886: installing pywikibot with pip fails because the package isn't a git repository; setup.py is unable to find the version of pywikibot
Seppl2013 added a comment. Seems to happen again e.g. pip3 install --no-cache-dir -I pywikibot==3.0.20200508 Collecting pywikibot==3.0.20200508 Downloading https://files.pythonhosted.org/packages/42/3d/ecfce167ec6b29726d043ec324daf29e48b094c37319a7b193bbd9e40610/pywikibot-3.0.20200508.tar.gz (516kB) 100% || 522kB 17.2MB/s Complete output from command python setup.py egg_info: fatal: not a git repository (or any of the parent directories): .git Command '['git', 'log', '-1', '--format=%ci']' returned non-zero exit status 128. TASK DETAIL https://phabricator.wikimedia.org/T171886 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: valhallasw, Seppl2013 Cc: Seppl2013, valhallasw, zhuyifei1999, Framawiki, pywikibot-bugs-list, Aklapper, Mateusz_Konieczny, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Reopened] T171886: installing pywikibot with pip fails because the package isn't a git repository; setup.py is unable to find the version of pywikibot
Seppl2013 reopened this task as "Open". TASK DETAIL https://phabricator.wikimedia.org/T171886 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: valhallasw, Seppl2013 Cc: Seppl2013, valhallasw, zhuyifei1999, Framawiki, pywikibot-bugs-list, Aklapper, Mateusz_Konieczny, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T171886: installing pywikibot with pip fails because the package isn't a git repository; setup.py is unable to find the version of pywikibot
Seppl2013 added a comment. It was a bit frustrating. https://pypi.org/project/pywikibot/ === pywikibot==3.0.20200306 in requirements.txt works all more recent versions fail on Ubuntu 18.04 LTS with python 3.6 and 3.7.5. I tried lots of configurations and the error message should up very often. It would be great if youd install a continuous integration e.g. with travis testing different dist and python combinations so that downstream projects do not choke up on this problem. TASK DETAIL https://phabricator.wikimedia.org/T171886 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: valhallasw, Seppl2013 Cc: Xqt, Dvorapa, Seppl2013, valhallasw, zhuyifei1999, Framawiki, pywikibot-bugs-list, Aklapper, Mateusz_Konieczny, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T254003: How to use pywikibot to get data from SMW ask API?
Seppl2013 added a comment. The https://pypi.org/project/py-3rdparty-mediawiki/ support now works quite nicely to handle the SMW API. This task can IMHO be closed. TASK DETAIL https://phabricator.wikimedia.org/T254003 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T254003: How to use pywikibot to get data from SMW ask API?
Seppl2013 added a comment. https://github.com/WolfgangFahl/py-3rdparty-mediawiki/blob/master/wikibot/smw.py#L137 from pywikibot.data.api import Request ... def submit(self, parameters): """ submit the request with the given parameters Args: parameters(list): the parameters to use for the SMW API request Returns: dict: the submit result""" request=Request(site=self.site,parameters=parameters) return request.submit() TASK DETAIL https://phabricator.wikimedia.org/T254003 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Dvorapa, Xqt, Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Created] T270474: RuntimeError: No user-config.py found
Seppl2013 created this task. Seppl2013 added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Danmichaelo, Aklapper. TASK DESCRIPTION **Current behavior:** When using pywikibot in an import statement the check for user-config.py is immediately done and throw a runtime error even if pywikibot is never called. It is explained that an Environment variable needs to be set to avoid this behavior. Set PYWIKIBOT_NO_USER_CONFIG=1 to disable loading user-config.py **Expected behavior:** - It should be possible to import pywikibot even it no user-config is available. - It should be possible to use pywikibot and disable the user-config.py check via API (not via Environment variable!) - Reasoning** When deploying a library like https://github.com/WolfgangFahl/py-3rdparty-mediawiki and make it available for the general public that has a choice of using either mwclient or pywikibot as the API channel to MediaWiki it does not make sens to throw an error by pywikibot when people choose mwclient. In fact this makes offering pywikibot as a library impossible in the long run. Please fix this issue so that py-3rdparty-mediawiki will be able to offer a pywikibot. With the current state of affairs I'd have to remove the pywikibot support for the inconvenience it introduces for users. TASK DETAIL https://phabricator.wikimedia.org/T270474 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Aklapper, Danmichaelo, Seppl2013, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T270474: Allow using pywikibot without user-config.py and PYWIKIBOT_NO_USER_CONFIG=1
Seppl2013 added a comment. looks great. How do i get rid of the "family and mylang ar not set ..." messages? TASK DETAIL https://phabricator.wikimedia.org/T270474 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Seppl2013 Cc: FeRDNYC, Xqt, Aklapper, Danmichaelo, Seppl2013, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T270474: Allow using pywikibot without user-config.py and PYWIKIBOT_NO_USER_CONFIG=1
Seppl2013 added a comment. https://github.com/WolfgangFahl/py-3rdparty-mediawiki/issues/35 will have to wait for the release on pypi see https://pypi.org/project/pywikibot/ TASK DETAIL https://phabricator.wikimedia.org/T270474 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Seppl2013 Cc: FeRDNYC, Xqt, Aklapper, Danmichaelo, Seppl2013, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: login() with retry=True might delete correct password if unknown APIError occurs
Seppl2013 added a comment. What is the proper procedure to tell pywikibot the password for login via API ? I am using python # needs patch as outlined in https://phabricator.wikimedia.org/T248471 #self.site.login(password=self.getPassword()) lm = LoginManager(password=self.getPassword(), site=self.site, user=self.user) lm.login() and i get a WARNING: WARNING: Could not check user '...' exists on wiki:lang and then i am asked for the password. Password for user ... on wiki:lang (no characters will be shown): Warning: Password input may be echoed. This still doesn't make any sense to me since the LoginManager was initialized with the proper password. Why does it forget about it? 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, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Created] T266935: Regression: Loginmanager does not make proper use of password parameter
Seppl2013 created this task. Seppl2013 added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION as outlined in T248471 <https://phabricator.wikimedia.org/T248471> the code # needs patch as outlined in https://phabricator.wikimedia.org/T248471 #self.site.login(password=self.getPassword()) password=self.getPassword() lm = LoginManager(password=password, site=self.site, user=self.user) lm.login() does not perform as intended. I get an error message i have replaced wiki lang and user with tags to hide the original message details: Logging in to : as WARNING: API error readapidenied: You need read permission to use this module. WARNING: API error readapidenied: You need read permission to use this module. ERROR: APIError: readapienied: You need read permission to use this module. [help: See http://.bitplan.com/api.php for API usage. 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.] WARNING: API error readapiddenied: You need read permission to use this module. WARNING: API error readapidenied: You need read permission to use this module. WARNING: Could not check user exists on : Password for user on : (no characters will be shown): Warning: Password input may be echoed. I'd expect that the API calls are not done but a straight login attempt. If API calls must be done and fail this should not lead to the password be forgotten. It shoul not be mandatory to check the user with a siteinfo call. May be we need a parameter that forces this behavior to avoid this hard to debug situation. TASK DETAIL https://phabricator.wikimedia.org/T266935 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T266935: Regression: Loginmanager does not make proper use of password parameter
Seppl2013 added a comment. If checking the version is the issue please allow to specify the version via API instead of trying to find out via API before being logged in ... TASK DETAIL https://phabricator.wikimedia.org/T266935 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: login() with retry=True might delete correct password if unknown APIError occurs
Seppl2013 added a comment. With pywikibot 5.0.0 i have to start all over again ... sigh .. 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, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T248471: login() with retry=True might delete correct password if unknown APIError occurs
Seppl2013 added a comment. There is a WARNING: API error readapidenied: You need read permission to use this module. warning with no details on what the API called is. When debugging it reveals that a meta=siteinfo is tried and if that fails a login is performed. This doesn't make any sense if a proper user/password combination is given. Why try to use the API - how can this be switched off because of course you can't use the API if you are not logged in ... 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, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T266935: Regression: Loginmanager does not make proper use of password parameter
Seppl2013 added a comment. If you try to debug the situation and click on "site" in the loginmanager a sequence of API call is initiated ... that makes it even harder to find out what is going on ... TASK DETAIL https://phabricator.wikimedia.org/T266935 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T266935: Regression: Loginmanager does not make proper use of password parameter
Seppl2013 added a comment. One of the issues seems to be that I don't know how to get rid of the "You need read permission to use this module." messsage on MediaWiki1.35 so that things would at least work for my public wikis. bash curl -s "http://test.bitplan.com/api.php?action=query=siteinfo=general|namespaces|namespacealiases|statistics=json" | jq . json { "error": { "code": "readapidenied", "info": "You need read permission to use this module.", "*": "See http://test.bitplan.com/api.php for API usage. 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." } } TASK DETAIL https://phabricator.wikimedia.org/T266935 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Mpaa, Dvorapa, Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Changed Subscribers] T266935: Regression: Loginmanager does not make proper use of password parameter
Seppl2013 added a subscriber: Xqt. Seppl2013 added a comment. @Xqt - thanks for trying again. I still have some project based on pywikibot although I am trying to avoid it and use mwclient more these days due to this limited useability in intranet situations. TASK DETAIL https://phabricator.wikimedia.org/T266935 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, Mpaa, Dvorapa, Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Jayprakash12345, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, Wong128hk, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T278076: pywikibot cannot collect family files from zip folder e.g. from py2app collection
Seppl2013 added a comment. @Xqt - thx for the reply and asking - i am fine with this schedule - thank you very much. TASK DETAIL https://phabricator.wikimedia.org/T278076 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Seppl2013 Cc: valhallasw, Xqt, pywikibot-bugs-list, Aklapper, Seppl2013, Danmichaelo, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T278076: Allow import pywikibot without using and properly configuring it - e.g. with no families directory available
Seppl2013 added a comment. I am happy with my workaround for the time being. I also intend to change my app to a webbased app and use py2app to create an app that only communicates with the webbased app. That way i'll avoid any similar problems. Still to fix things upstream the default should be not to throw an exception but simply log the problem by default. So os.listdir might be wrapped in a try catch blog. Only if configured to specifically show start up issues should there be an exception. TASK DETAIL https://phabricator.wikimedia.org/T278076 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: valhallasw, Xqt, pywikibot-bugs-list, Aklapper, Seppl2013, Danmichaelo, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T278076: pywikibot cannot collect family files from zip folder e.g. from py2app collection
Seppl2013 added a comment. looks like avoiding the exception TASK DETAIL https://phabricator.wikimedia.org/T278076 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Seppl2013 Cc: valhallasw, Xqt, pywikibot-bugs-list, Aklapper, Seppl2013, Danmichaelo, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T278076: pywikibot cannot collect family files from zip folder e.g. from py2app collection
Seppl2013 added a comment. Thx. for the explanation. And no - testing the script just now with just the config2.py changed will be tough since the three CI pipelines i am using are all pulling directly from PyPi. For my local environment it would be sort of feasible but i fear the installation routines would override my local changes as they did when i was trying things out for almost a day recently. My current project priorities are also different -i need to make sure i don't have showstoppers and this one isn't any more. TASK DETAIL https://phabricator.wikimedia.org/T278076 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Seppl2013 Cc: valhallasw, Xqt, pywikibot-bugs-list, Aklapper, Seppl2013, Danmichaelo, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T278076: Allow import pywikibot without using and properly configuring it - e.g. with no families directory available
Seppl2013 added a comment. If you then do a import pywikibot This will already activate some code which might fail. Even if you do import os os.environ["PYWIKIBOT_NO_USER_CONFIG"]="2" you might end up with an exception. Since code I am publishing might be downloaded by users in lots of different environments this essentially forces each and every user to configure things to avoid the exception which is not feasible. There is a bad need to avoid this problem. Currently i am thinking about something like a try: import pywikbot except Exception as ex: # ignore it or do something about it pass which looks like a very ugly workaround which i would love to avoid and therefore added this issue to hope for an upstream fix. TASK DETAIL https://phabricator.wikimedia.org/T278076 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, pywikibot-bugs-list, Aklapper, Seppl2013, Danmichaelo, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T278076: Allow import pywikibot without using and properly configuring it - e.g. with no families directory available
Seppl2013 added a comment. see https://github.com/WolfgangFahl/py-3rdparty-mediawiki/commit/8ab0bd846d191fa93cfd661c89e2bc769d69f06b for trying this workaround TASK DETAIL https://phabricator.wikimedia.org/T278076 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, pywikibot-bugs-list, Aklapper, Seppl2013, Danmichaelo, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T278076: Allow import pywikibot without using and properly configuring it - e.g. with no families directory available
Seppl2013 added a comment. @Xqt https://github.com/WolfgangFahl/py-3rdparty-mediawiki/issues/43 has the issue about pycrypto... Which sample are you talking about? How could i get a traceback if i only try an import without catching the Exception. I am in the process of adding try/catch now and in on case i am using: if not "Request" in sys.modules: from pywikibot.data.api import Request as a workaround but that all really awkward and outright most ugly. TASK DETAIL https://phabricator.wikimedia.org/T278076 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, pywikibot-bugs-list, Aklapper, Seppl2013, Danmichaelo, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T278076: Allow import pywikibot without using and properly configuring it - e.g. with no families directory available
Seppl2013 added a comment. The sample % python Python 3.8.8 (default, Mar 18 2021, 06:01:57) [Clang 11.0.3 (clang-1103.0.32.62)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from wikibot import wikibot >>> Doesn't help since this is not the enviroment py2app creates. py2app will call python in a "clean" environment with not configuration files, no environment variables, no nothing. And in that enviroment the example would fail. But there would also be no proper stacktrace. That is the reason why i opened this ticket. My workaround is working but i can't even see the resulting stderr code. TASK DETAIL https://phabricator.wikimedia.org/T278076 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Seppl2013 Cc: Xqt, pywikibot-bugs-list, Aklapper, Seppl2013, Danmichaelo, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs