[Pywikipedia-bugs] [Maniphest] [Commented On] T354474: API requests when processing pages with XMLDumpPageGenerator
Mpaa added a comment. It seems OK to me how it is checked today, it is checked via template checking and I did not see reference to current text. I do not understand why it is checked there, as it is also checked in page.save(). It seems redundant to me, but maybe there is some edge case I cannot see. TASK DETAIL https://phabricator.wikimedia.org/T354474 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Xqt, Aklapper, pywikibot-bugs-list, Mpaa, mevo, PotsdamLamb, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T354474: API requests when processing pages with XMLDumpPageGenerator
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **Steps to replicate the issue**: - iterate pages with XMLDumpPageGenerator() **What happens?**: For each page an API request is done to check if text can be written by bot, when page is constructed from XML entry: 982 -> page.text = entry.text This defeats the purpose of off-line processing. > /home/pc/python/core/pywikibot/pagegenerators/_generators.py(982)__next__() 969 def __next__(self) -> pywikibot.page.Page: 970 """Get next Page.""" 971 while True: 972 entry = next(self.parser) 973 if self.skipping: 974 if entry.title < self.start: 975 continue 976 self.skipping = False 977 page = pywikibot.Page(self.site, entry.title) 978 if page.namespace() not in self.namespaces: 979 continue 980 if not self.text_predicate or self.text_predicate(entry.text): 981 if self.content: 982 -> page.text = entry.text 983 return page 528 @text.setter 529 def text(self, value: str | None): 530 """Update the current (edited) wikitext. 531 532 :param value: New value or None 533 """ 534 try: 535 -> self.botMayEdit() # T262136, T267770 536 except Exception as e: 537 # dry tests aren't able to make an API call 538 # but are rejected by an Exception; ignore it then. 539 if not str(e).startswith('DryRequest rejecting request:'): 540 raise **What should have happened instead?**: No access to network, until a page is saved. TASK DETAIL https://phabricator.wikimedia.org/T354474 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Edited] T354095: xmlreader might fail
Mpaa updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T354095 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, mevo, Isabelladantes1983, Themindcoder, Adamm71, Jersione, Hellket777, LisafBia6531, 786, Biggs657, PotsdamLamb, Jyoo1011, JohnsonLee01, Juan90264, 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, Neuronton, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T354095: xmlreader might fail
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION See https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.iterparse > Note > > iterparse() only guarantees that it has seen the “>” character of a starting tag when it emits a “start” event, so the attributes are defined, but the contents of the text and tail attributes are undefined at that point. The same applies to the element children; they may or may not be present. > > If you need a fully populated element, look for “end” events instead. **Steps to replicate the issue** (include links if applicable): - apply this patch diff --git a/pywikibot/xmlreader.py b/pywikibot/xmlreader.py index 5d3575e6b..98a420364 100644 --- a/pywikibot/xmlreader.py +++ b/pywikibot/xmlreader.py @@ -235,10 +235,23 @@ class XmlDump: elem.clear() self.root.clear() +def _assert(self, elem): +"assert." +assert self.title == elem.findtext(f'{{{self.uri}}}title') +assert self.ns == elem.findtext(f'{{{self.uri}}}ns') +assert self.pageid == elem.findtext(f'{{{self.uri}}}id') +assert self.restrictions == elem.findtext(f'{{{self.uri}}}restrictions') +assert self.isredirect == (elem.findtext(f'{{{self.uri}}}redirect') is not None) +edit, move = parseRestrictions(elem.findtext(f'{{{self.uri}}}restrictions')) +assert self.editRestriction == edit +assert self.moveRestriction == move + def _parse_all(self, event, elem): """Parser that yields all revisions.""" if event == 'start' and elem.tag == f'{{{self.uri}}}page': self._headers(elem) +if event == 'end' and elem.tag == f'{{{self.uri}}}page': +self._assert(elem) if event == 'end' and elem.tag == f'{{{self.uri}}}revision': yield self._create_revision(elem) elem.clear() - run from pywikibot import xmlreader filename = 'enwikisource.xml'# use a dump with full history per page dump = xmlreader.XmlDump(filename, allrevisions=True) gen = dump.parse() for i, rev in enumerate(gen): rev.text = rev.text[0:10] + ' ...' print((rev.__dict__['revisionid'], vars(rev))) - **What happens?**: ('4054131', {'title': 'Presidential Radio Address - 3 March 2001', 'ns': '0', 'id': '', 'text': '{{header\n ...', 'username': 'Mpaa', 'ipedit': False, 'timestamp': '2012-09-06T23:31:28Z', 'editRestriction': None, 'moveRestriction': None, 'revisionid': '4054131', 'comment': 'year/noyearcat in header + changed cat + changed note', 'isredirect': False}) --- AssertionErrorTraceback (most recent call last) File ~/Downloads/xmldump/test_xml.py:63 42 yield next(dump.parse()) 45 #import tracemalloc 46 #tracemalloc.start() 47 #print(tracemalloc.get_traced_memory()) (...) 60 #print(tracemalloc.get_traced_memory()) 61 #tracemalloc.stop() ---> 63 for i, rev in enumerate(gen): 64 rev.text = rev.text[0:10] + ' ...' 65 print((rev.__dict__['revisionid'], vars(rev))) File ~/python/core/pywikibot/xmlreader.py:190, in XmlDump.parse(self) 188 self.root = elem 189 continue --> 190 yield from self._parse(event, elem) File ~/python/core/pywikibot/xmlreader.py:254, in XmlDump._parse_all(self, event, elem) 252 self._headers(elem) 253 if event == 'end' and elem.tag == f'{{{self.uri}}}page': --> 254 self._assert(elem) 255 if event == 'end' and elem.tag == f'{{{self.uri}}}revision': 256 yield self._create_revision(elem) File ~/python/core/pywikibot/xmlreader.py:242, in XmlDump._assert(self, elem) 240 assert self.title == elem.findtext(f'{{{self.uri}}}title') 241 assert self.ns == elem.findtext(f'{{{self.uri}}}ns') --> 242 assert self.pageid == elem.findtext(f'{{{self.uri}}}id') 243 assert self.restrictions == elem.findtext(f'{{{self.uri}}}restrictions') 244 assert self.isredirect == (elem.findtext(f
[Pywikipedia-bugs] [Maniphest] [Commented On] T228335: multiple matches order of _code_fam_from_url depends on Python version
Mpaa added a comment. @xqt, since now pywikibot supports only >= 3.7 this can be closed., right? TASK DETAIL https://phabricator.wikimedia.org/T228335 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Dvorapa, Aklapper, Dalba, Xqt, pywikibot-bugs-list, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Closed] T258036: Pywikibot CategorizedPageGenerator yields more files than present in category
Mpaa closed this task as "Resolved". Mpaa claimed this task. TASK DETAIL https://phabricator.wikimedia.org/T258036 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Eatcha, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T258036: Pywikibot CategorizedPageGenerator yields more files than present in category
Mpaa added a comment. After adding lazy load of metadata in T253591 <https://phabricator.wikimedia.org/T253591> I get the same number in petscan, category in commons and script. I'll close it for now, to be reopened in case. TASK DETAIL https://phabricator.wikimedia.org/T258036 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Eatcha, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T353387: Suggest installing requests_oauthlib instead of throwing NoUsernameError
Mpaa added a comment. There is an error, but it almost invisible due to the long traceback: ERROR: OAuth authentication not supported: No module named 'requests_oauthlib' I think an exception should be raised here: https://github.com/wikimedia/pywikibot/blob/master/pywikibot/comms/http.py#L437 TASK DETAIL https://phabricator.wikimedia.org/T353387 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Framawiki, mevo, LAVANYANELLURI, ajaypediredla14, Jainitbafna, AFZL210, Gaurav24072002, Abhinay76, PotsdamLamb, Annysah01, Rohitgeddam, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Soda, Chaytanya, Zkhalido, JorisDarlingtonQuarshie, wiki-helenatxu, Viztor, Klein, Wenyi, Tks4Fish, Mh-3110, Lahi, JakeTheDeveloper, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, xSavitar, Altostratus, Avicennasis, MuhammadShuaib, Tmalhotra, SimmeD, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T281633: [dev] pre-commit for linting and code formatting
Mpaa added a comment. @JJMC89 do you have updates about this? e.g. a new .pre-commit-config.yaml? TASK DETAIL https://phabricator.wikimedia.org/T281633 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Rubin16, valhallasw, Xqt, Aklapper, pywikibot-bugs-list, JJMC89, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T352606: Cannot run tests vs sites where oauth is configured in user-config.py
Mpaa added a comment. I think that here we could use apipath, as the goal should to check only that the site is online. if 'hostname' not in data and 'site' in data: # Ignore if the family has defined this as # obsolete without a mapping to a hostname. with suppress(KeyError): data['hostname'] = ( data['site'].base_url(data['site'].path())) --> ata['site'].apipath() But I am not familiar with all implication s of aspects.py TASK DETAIL https://phabricator.wikimedia.org/T352606 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T352606: Cannot run tests vs sites where oauth is configured in user-config.py
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **Steps to replicate the issue** (include links if applicable): - configure to use oauth for the site used for tests (e.g. en.wikisource in this case) - python -m unittest tests.proofreadpage_tests.TestProofreadPageValidSite.test_url_image **What happens?**: setUpClass (tests.proofreadpage_tests.TestProofreadPageValidSite) ... skipped 'TestProofreadPageValidSite: hostname https://en.wikisource.org/w/index.php failed: HTTP status: 400 - Bad Request' **What should have happened instead?**: the test should proceed Reason is that /index.php does not accept requests with oauth. In [9]: requests.get('https://en.wikisource.org/w/api.php', auth=oauth) Out[9]: In [10]: requests.get('https://en.wikisource.org/w/index.php', auth=oauth) Out[10]: hostname = data['hostname'] in setUpClass() of class CheckHostnameMixin(TestCaseBase) is set to ./index.php data['hostname'] is defined in setUpClass() of class TestCase(TestCaseBase, metaclass=MetaTestCaseClass): if 'hostname' not in data and 'site' in data: # Ignore if the family has defined this as # obsolete without a mapping to a hostname. with suppress(KeyError): data['hostname'] = ( data['site'].base_url(data['site'].path())) where data['site'].path() is the path() method of Family(). TASK DETAIL https://phabricator.wikimedia.org/T352606 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Updated] T352482: APIError: Petscan: No result for source categories
Mpaa added a comment. I think this now fails because on my request to delete "Category:Pywikibot Protect Test" in T352560 <https://phabricator.wikimedia.org/T352560>, the category has now been removed also from: User:Sn1per/ProtectTest1 User:Sn1per/ProtectTest2 https://test.wikipedia.org/w/index.php?title=User%3ASn1per%2FProtectTest1&diff=583975&oldid=221071 TASK DETAIL https://phabricator.wikimedia.org/T352482 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, mevo, Aklapper, pywikibot-bugs-list, JJMC89, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Triaged] T352560: doctests failing for Category.articles and Category.members
Mpaa triaged this task as "Unbreak Now!" priority. TASK DETAIL https://phabricator.wikimedia.org/T352560 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, JJMC89, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T352560: doctests failing for Category.articles and Category.members
Mpaa added a comment. @JJMC89 This is my fault. There was an issue with a PetScan test and I thought it was due to this category not being present: Category:Pywikibot Protect Test so I created it. It shall be deleted at https://test.wikipedia.org/wiki/Category:Pywikibot_Protect_Test but I have no rights. TASK DETAIL https://phabricator.wikimedia.org/T352560 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, JJMC89, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T348910: Replace deprecated inprop=preload with preloadcontent
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **Steps to replicate the issue** (include links if applicable): import pywikibot import pywikibot.proofreadpage as pp site = pywikibot.Site('en', 'wikisource') page = pp.ProofreadPage(site, 'Page:Complete Works of Count Tolstoy - 13.djvu/201') p = list(site.preloadpages([page], content=True))[0] p.text WARNING: API warning (main): Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes. Use [[Special:ApiFeatureUsage]] to see usage of deprecated features by your application. Out[9]: ' ... - see https://en.wikisource.org//w/api.php?titles=Page:Complete+Works+of+Count+Tolstoy+-+13.djvu/201&inprop=protection|preload&prop=info|proofread&action=query&indexpageids=&continue=&meta=userinfo&uiprop=blockinfo|hasmsg&maxlag=5&format=json **What happens?**: See API warning: 'The value "preload" to parameter "inprop" has been deprecated.' **What should have happened instead?**: Nothing. See https://en.wikisource.org/w/api.php?action=help&modules=query%2Binfo preload Deprecated. Gives the text returned by EditFormPreloadText. Use preloadcontent instead, which supports other kinds of preloaded text too. **Software version** (skip for WMF-hosted wikis like Wikipedia): Release version: 8.5.0.dev0 **Other information** (browser name/version, screenshots, etc.): TASK DETAIL https://phabricator.wikimedia.org/T348910 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T335720: Site() can request info unnecessarily
Mpaa added a comment. In T335720#8825687 <https://phabricator.wikimedia.org/T335720#8825687>, @Xqt wrote: > The problem is that the pop default is evaluated even if it is not needed: > > x = {'foo': 'bar'} > def baz(): print('quez') > > x.pop('foo', baz()) > quez > 'bar' > > Here some other samples: > https://codesearch.wmcloud.org/pywikibot/?q=%28get%7Cpop%29%5C%28%5B%5E+%2C%5C%29%5D%2B%2C+%5B%5E%5C%28%5C%29%5D%2B%5C%28&files=&excludeFiles=&repos= > > dict should have been implemented like that instead: > > class lazy_dict(dict): > sentinel = object() > def pop(value, default=sentinel): > try: > r = super.pop(value) > except KeyError: > if default is sentinel: > raise > r = default > return r > > but it is a C function See https://bugs.python.org/issue39083 TASK DETAIL https://phabricator.wikimedia.org/T335720 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Xqt, JJMC89, Themindcoder, Adamm71, Jersione, Hellket777, LisafBia6531, 786, Biggs657, PotsdamLamb, Jyoo1011, JohnsonLee01, Juan90264, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Framawiki, Lewizho99, Mdupont, Maathavan, Dvorapa, Altostratus, Neuronton, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T323851: Timestamp.fromtimestampformat() class method is failing
Mpaa added a comment. Weird. Could you give an example where MW outputs a timestamp on 12 digits? See https://www.mediawiki.org/wiki/Manual:WfTimestamp TASK DETAIL https://phabricator.wikimedia.org/T323851 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Mpaa Cc: Aklapper, Mpaa, Xqt, pywikibot-bugs-list, Adamm71, Jersione, Hellket777, LisafBia6531, 786, Biggs657, PotsdamLamb, Jyoo1011, JohnsonLee01, Juan90264, 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, Neuronton, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T319132: Match.group and Match.__getitem__(g) do not raise the same Exception
Mpaa added a comment. A lot of files have been changed by https://gerrit.wikimedia.org/r/c/pywikibot/core/+/836138. This might occur somewhere else. TASK DETAIL https://phabricator.wikimedia.org/T319132 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, Jersione, Hellket777, LisafBia6531, 786, Biggs657, PotsdamLamb, Jyoo1011, JohnsonLee01, Juan90264, 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, Neuronton, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T319132: Match.group and Match.__getitem__(g) do not raise the same Exception
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **Steps to replicate the issue** (include links if applicable): import re text = 'abcd' pat = re.compile('z') m = pat.search(text) In [11]: m.group() --- AttributeErrorTraceback (most recent call last) Input In [11], in () > 1 m.group() AttributeError: 'NoneType' object has no attribute 'group' In [12]: m[0] --- TypeError Traceback (most recent call last) Input In [12], in () > 1 m[0] TypeError: 'NoneType' object is not subscriptable **What happens?**: Scripts might not catch the right Exception after https://gerrit.wikimedia.org/r/c/pywikibot/core/+/836138 TASK DETAIL https://phabricator.wikimedia.org/T319132 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Closed] T316976: Wrong paraminfo for query+proofreadpagesinindex
Mpaa closed this task as "Invalid". TASK DETAIL https://phabricator.wikimedia.org/T316976 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Soda, Inductiveload, Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Bebiezaza, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, DannyS712, Wenyi, Xover, Tbscho, MayS, Mdupont, JJMC89, Tshrinivasan, Dvorapa, Altostratus, Avicennasis, Info-farmer, mys_721tx, Xqt, Candalua, jayvdb, Masti, Tpt, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T316976: Wrong paraminfo for query+proofreadpagesinindex
Mpaa added a comment. In T316976#8209768 <https://phabricator.wikimedia.org/T316976#8209768>, @Soda wrote: > @Mpaa `prppiilimit` was recently removed as a result of T314022 <https://phabricator.wikimedia.org/T314022>, I'm guessing pywikibot hasn't been updated ? Ah, OK, that explains :-) Thanks @Soda TASK DETAIL https://phabricator.wikimedia.org/T316976 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Soda, Inductiveload, Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Bebiezaza, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, DannyS712, Wenyi, Xover, Tbscho, MayS, Mdupont, JJMC89, Tshrinivasan, Dvorapa, Altostratus, Avicennasis, Info-farmer, mys_721tx, Xqt, Candalua, jayvdb, Masti, Tpt, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T316976: Wrong paraminfo for query+proofreadpagesinindex
Mpaa added a comment. I cleared pywikibot chache and now they are aligned. In [3]: site._paraminfo['query+proofreadpagesinindex']['parameters'] Out[3]: [{'index': 1, 'name': 'prop', 'type': ['ids', 'title'], 'default': 'ids|title', 'multi': '', 'lowlimit': 50, 'highlimit': 500, 'limit': 500}, {'index': 2, 'name': 'title', 'type': 'string'}, {'index': 3, 'name': 'pageid', 'type': 'integer'}] Do not know what has changed compared to what I had in cache for paraminfo, but seems OK now. TASK DETAIL https://phabricator.wikimedia.org/T316976 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Soda, Inductiveload, Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Bebiezaza, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, DannyS712, Wenyi, Xover, Tbscho, MayS, Mdupont, JJMC89, Tshrinivasan, Dvorapa, Altostratus, Avicennasis, Info-farmer, mys_721tx, Xqt, Candalua, jayvdb, Masti, Tpt, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T316976: Wrong paraminfo for query+proofreadpagesinindex
Mpaa added a comment. API query: URI: '/w/api.php' Body: 'prppiititle=Index%3AConfederate+Military+History+-+1899+-+Volume+4.djvu&list=proofreadpagesinindex&action=query&indexpageids=&continue=&prppiilimit=500&meta=userinfo&uiprop=blockinfo%7Chasmsg&maxlag=5&format=json' TASK DETAIL https://phabricator.wikimedia.org/T316976 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Inductiveload, Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Bebiezaza, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Soda, Zkhalido, Viztor, DannyS712, Wenyi, Xover, Tbscho, MayS, Mdupont, JJMC89, Tshrinivasan, Dvorapa, Altostratus, Avicennasis, Info-farmer, mys_721tx, Xqt, Candalua, jayvdb, Masti, Tpt, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Changed Subscribers] T316976: Wrong paraminfo for query+proofreadpagesinindex
Mpaa added a subscriber: Inductiveload. Mpaa added a comment. Pinging @Inductiveload, which might help on API side. TASK DETAIL https://phabricator.wikimedia.org/T316976 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Inductiveload, Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Bebiezaza, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Soda, Zkhalido, Viztor, DannyS712, Wenyi, Xover, Tbscho, MayS, Mdupont, JJMC89, Tshrinivasan, Dvorapa, Altostratus, Avicennasis, Info-farmer, mys_721tx, Xqt, Candalua, jayvdb, Masti, Tpt, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T316976: Wrong paraminfo for query+proofreadpagesinindex
Mpaa created this task. Mpaa added projects: Pywikibot, ProofreadPage. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **Steps to replicate the issue**: import pywikibot import pywikibot.proofreadpage as pp site = pywikibot.Site('en', 'wikisource') page = pp.IndexPage(site, 'Index:Confederate Military History - 1899 - Volume 4.djvu') Internally, IndexPage() calls self._get_prp_index_pagelist(self), which calls: pi_gen = site._generator(ListGenerator, 'proofreadpagesinindex', **ppi_args) **What happens?**: WARNING: API warning (main): Unrecognized parameter: prppiilimit. **What should have happened instead?**: No warning. https://en.wikisource.org/wiki/Special:ApiSandbox#action=paraminfo&format=json&modules=query%2Bproofreadpagesinindex only lists 3 parameters "parameters": [ { "index": 1, "name": "prop", "type": [ "ids", "title" ], "default": "ids|title", "multi": "", "lowlimit": 50, "highlimit": 500, "limit": 500 }, { "index": 2, "name": "title", "type": "string" }, { "index": 3, "name": "pageid", "type": "integer" } ] while: In [15]: site._paraminfo['query+proofreadpagesinindex']['parameters'] Out[15]: [{'index': 1, 'name': 'continue', 'type': 'integer'}, {'index': 2, 'name': 'prop', 'type': ['ids', 'title'], 'default': 'ids|title', 'multi': '', 'lowlimit': 50, 'highlimit': 500, 'limit': 500}, {'index': 3, 'name': 'title', 'type': 'string'}, {'index': 4, 'name': 'pageid', 'type': 'integer'}, {'index': 5, 'name': 'limit', 'type': 'limit', 'default': 100, 'min': 1, 'max': 500, 'highmax': 5000}] I am not sure it the misalignment happens in pywikibot or it is due to how proofreadpagesinindex is implemented/exposes its paramenters. TASK DETAIL https://phabricator.wikimedia.org/T316976 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Bebiezaza, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Soda, Zkhalido, Viztor, DannyS712, Wenyi, Inductiveload, Xover, Tbscho, MayS, Mdupont, JJMC89, Tshrinivasan, Dvorapa, Altostratus, Avicennasis, Info-farmer, mys_721tx, Xqt, Candalua, jayvdb, Masti, Tpt, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T205155: unconnected_pages generator doesn't seem to return all pages
Mpaa added a comment. In T205155#4845859 <https://phabricator.wikimedia.org/T205155#4845859>, @Mpaa wrote: > I do not know what sets the limit of 1 in the API. See https://github.com/wikimedia/mediawiki/blob/0ffef1bb1b3e7de3463552b91549de63a558d4f6/includes/specialpage/QueryPage.php#L693 TASK DETAIL https://phabricator.wikimedia.org/T205155 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, JAnD, Dalba, pywikibot-bugs-list, Aklapper, Multichill, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Ricordisamoa, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Closed] T302496: archivebot.py didn't archive thread whose sign warp in a element
Mpaa closed this task as "Resolved". Mpaa claimed this task. TASK DETAIL https://phabricator.wikimedia.org/T302496 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Ericliu1912, Xqt, Aklapper, Stang, pywikibot-bugs-list, SunAfterRain, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, MJL, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T302496: archivebot.py didn't archive thread whose sign warp in a element
Mpaa added a comment. | style="vertical-align:middle; padding-left:20px;" | '''新年快樂!'''感謝您過去一年來對中文維基百科的貢獻!祝閣下[[新年]]快樂,萬事如意!—— '''[[使用者:Ericliu1912|Eric Liu]]''' 創造は生命('''[[使用者討論:Ericliu1912|留言]].[[使用者:Ericliu1912#訪客芳名錄|留名]].[[維基百科:維基學生會|學生會]]''') 2022年1月31日 (一) 18:48 (UTC){{color|grey|(模板使用方法參見[[使用者:Ericliu1912/維基友愛模板|此處]])} (Pdb) dateDict {'time': {'value': '18:48', 'start': 309, 'end': 314}, 'hour': {'value': '18', 'start': 309, 'end': 311}, 'minute': {'value': '48', 'start': 312, 'end': 314}, 'tzinfo': {'value': 'UTC', 'start': 316, 'end': 319}, 'year': {'value': '2022', 'start': 294, 'end': 298}, 'month': {'value': '1月', 'start': 299, 'end': 301}, 'day': {'value': '5', 'start': 381, 'end': 382}} It does not match because it matches 5 as day and it is to far from the rest, so it is filtered out by _valid_date_dict_positions(). The design is such that, given a pattern, it attempts to match the right most element. TASK DETAIL https://phabricator.wikimedia.org/T302496 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Ericliu1912, Xqt, Aklapper, Stang, pywikibot-bugs-list, SunAfterRain, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, MJL, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Closed] T313736: Content parameter in page.template() has no effect if page templates are cached
Mpaa closed this task as "Resolved". TASK DETAIL https://phabricator.wikimedia.org/T313736 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Updated] T241689: Preloading the categories of a set of pages
Mpaa added a comment. See T67163 <https://phabricator.wikimedia.org/T67163> TASK DETAIL https://phabricator.wikimedia.org/T241689 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Xqt, Dvorapa, Aklapper, Erutuon, valhallasw, pywikibot-bugs-list, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Retitled] T313736: Content parameter in page.template() has no effect if page templates are cached
Mpaa renamed this task from "Content parameter has no effect if page templates are cached" to "Content parameter in page.template() has no effect if page templates are cached". TASK DETAIL https://phabricator.wikimedia.org/T313736 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Edited] T313736: Content parameter has no effect if page templates are cached
Mpaa updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T313736 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T313736: Content parameter has no effect if page templates are cached
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION When page templates are already cached, content parameter has no effect. page._templates might be created also when page is preloaded, with templates=True. **Steps to replicate the issue** (include links if applicable): >>> site = pywikibot.Site('en', 'wikisource') >>> page = pywikibot.Page(site, 'Main Page') >>> tt = page.templates() >>> vars(tt[0]) {'_link': pywikibot.page.Link('Kutenai Tales.djvu/101', APISite("en", "wikisource")), '_revisions': {}, '_pageid': 0, '_contentmodel': 'proofread-page', '_isredir': False, '_applicable_protections': {'create'}, '_protection': {}} >>> tt = page.templates(content=True) >>> vars(tt[0]) {'_link': pywikibot.page.Link('Kutenai Tales.djvu/101', APISite("en", "wikisource")), '_revisions': {}, '_pageid': 0, '_contentmodel': 'proofread-page', '_isredir': False, '_applicable_protections': {'create'}, '_protection': {}} **What happens?**: Content is not loaded. **What should have happened instead?**: Content should be loaded. **Software version** (skip for WMF-hosted wikis like Wikipedia): pywikibot-core.git (9be8e5b <https://phabricator.wikimedia.org/rPWBC9be8e5b53290ef70e7f8f40fbdf89fdfa53992f2>, g16828, 2022/07/24, 12:35:36, OUTDATED) TASK DETAIL https://phabricator.wikimedia.org/T313736 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T308016: Ql filter attempts to process 'non-standard' titles for pages with Proofread-page content model...
Mpaa added a comment. In T308016#7919265 <https://phabricator.wikimedia.org/T308016#7919265>, @ShakespeareFan00 wrote: > However, it does make me wonder if there is a need for the filter to be more robust about how it processes titles that aren't in the standard format for the Proofread-page content model. I do not think so, as the filter is supposed to work only on pages that are in the standard format for the Proofread-page content model. TASK DETAIL https://phabricator.wikimedia.org/T308016 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Xqt, Mpaa, pywikibot-bugs-list, Aklapper, ShakespeareFan00, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Retitled] T308266: Use random.choices() instead of random.shuffle() in site_tests.py
Mpaa renamed this task from "Use random.choises() instead of random.shuffle() in site_tests.py" to "Use random.choices() instead of random.shuffle() in site_tests.py". Mpaa updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T308266 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Xqt, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T308266: Use random.choises() instead of random.shuffle() in site_tests.py
Mpaa added a comment. random.choices() creates a list with replacements, so you might have duplicates. random.sample() maybe? TASK DETAIL https://phabricator.wikimedia.org/T308266 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Xqt, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T308016: Incompatible -ql and -grep filter options for listpages.py...
Mpaa added a comment. This is not a standard way of working with Proofread pages, and to handle it it would create several inconveniences (e.g. how many pages will have the related index? etc.) Before acting on pywikibot, there should be an agreement in the wikisource world on such subpages. Until that, the only reasonable thing to do might be to mitigate the issue by emitting a warning and discarding the page (if theare are no major drawbacks in doing so). TASK DETAIL https://phabricator.wikimedia.org/T308016 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Xqt, Mpaa, pywikibot-bugs-list, Aklapper, ShakespeareFan00, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T307830: tools.ThreadList.stop_all() leads to AttributeError
Mpaa added a comment. In T307830#7911218 <https://phabricator.wikimedia.org/T307830#7911218>, @Xqt wrote: > @Mpaa: I am unsure how to proceed. We could > > - keep the current implementation and add a warning to our documentation that the Thread object hast to be sublassed and provide a stop method if stop_all() is to be used (like ThreadedGenerator does) > - remove the stop_all method and stopping must be implemented outside the ThreadList class > - ignore AttributeError in stop_all() method and just write a debug message (and add a warning to our documentation) > > What do you suggest here? I agree with remove the stop_all method TASK DETAIL https://phabricator.wikimedia.org/T307830 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Mpaa Cc: jayvdb, Mpaa, Aklapper, pywikibot-bugs-list, Xqt, Fernandobacasegua34, 786, Suran38, Biggs657, Lalamarie69, Jyoo1011, JohnsonLee01, Juan90264, 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, Neuronton, Avicennasis, mys_721tx, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T307280: API:Links sometimes miss pages in Page namespace (104)
Mpaa added a comment. In T307280#7893596 <https://phabricator.wikimedia.org/T307280#7893596>, @gerritbot wrote: > Change 787876 had a related patch set uploaded (by Mpaa; author: Mpaa): > > [pywikibot/core@master] [IMPR]: make IndexPage more robust when getting links in Page ns > > https://gerrit.wikimedia.org/r/787876 This is just to make pywikibot more robust in such cases. TASK DETAIL https://phabricator.wikimedia.org/T307280 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, Fernandobacasegua34, 786, Suran38, Biggs657, Lalamarie69, Bebiezaza, Jyoo1011, JohnsonLee01, Juan90264, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Soda, Zkhalido, Hook696, WDoranWMF, Kent7301, joker88john, Viztor, DannyS712, CucyNoiD, Wenyi, Gaboe420, Amorymeltzer, Giuliamocci, Cpaulf30, Af420, Inductiveload, Bsandipan, Xover, Tbscho, MayS, Sethakill, Lewizho99, Mdupont, JJMC89, Maathavan, dg711, Tshrinivasan, Dvorapa, Altostratus, Neuronton, Avicennasis, Info-farmer, mys_721tx, Candalua, jayvdb, Masti, Tpt, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Updated] T307280: API:Links sometimes miss pages in Page namespace (104)
Mpaa added a project: MediaWiki-Action-API. TASK DETAIL https://phabricator.wikimedia.org/T307280 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, Fernandobacasegua34, 786, Suran38, Biggs657, Lalamarie69, Bebiezaza, Jyoo1011, JohnsonLee01, Juan90264, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Soda, Zkhalido, Hook696, WDoranWMF, Kent7301, joker88john, Viztor, DannyS712, CucyNoiD, Wenyi, Gaboe420, Amorymeltzer, Giuliamocci, Cpaulf30, Af420, Inductiveload, Bsandipan, Xover, Tbscho, MayS, Sethakill, Lewizho99, Mdupont, JJMC89, Maathavan, dg711, Tshrinivasan, Dvorapa, Altostratus, Neuronton, Avicennasis, Info-farmer, mys_721tx, Candalua, jayvdb, Masti, Tpt, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Retitled] T307280: API:Links sometimes miss pages in Page namespace (104)
Mpaa renamed this task from "Improve robustnesss when getting pages linked to IndexPage" to "API:Links sometimes miss pages in Page namespace (104)". Mpaa added a project: ProofreadPage. Mpaa updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T307280 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, Fernandobacasegua34, 786, Suran38, Biggs657, Lalamarie69, Bebiezaza, Jyoo1011, JohnsonLee01, Juan90264, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Soda, Zkhalido, Hook696, Kent7301, joker88john, Viztor, DannyS712, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Inductiveload, Bsandipan, Xover, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Tshrinivasan, Dvorapa, Altostratus, Neuronton, Avicennasis, Info-farmer, mys_721tx, Candalua, jayvdb, Masti, Tpt, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T307280: Improve robustnesss when getting pages linked to IndexPage
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION For unknown reasons(*) , sometimes getting pages in Page ns connected to the respective Index page via https://en.wikisource.org/w/api.php?action=help&modules=query%2Blinks will not return all pages but only a subset. e.g.: https://en.wikisource.org/w/api.php?action=query&prop=links&titles=Index:Anne%20of%20the%20Island%20(1920).djvu&pllimit=500&plnamespace=104 where not all pages in Page ns are returned, as opposite to e.g.: https://en.wikisource.org/w/api.php?action=query&prop=links&titles=Index:Through%20Bolshevik%20Russia%20-%20Snowden%20-%201920.djvu&pllimit=500&plnamespace=104 IndexPage shall be made more robust. (*) there might be something in the IndexPage itself which alters the query, or some caching issue or a problem in the API. TASK DETAIL https://phabricator.wikimedia.org/T307280 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T301800: FilePage.get_file_history() returns a dict with timestamp as key but all scripts expect a sequence
Mpaa added a comment. The return type is specified clearly. Scripts that use this function know what to expect and should act accordingly. latest_file_info(self) and oldest_file_info(self) are available for that purpose. I find problematic that someone pop() an item, as the cached self._file_revisions dict will be corrupted. It should be clarified in the docstring or a copy should be returned. TASK DETAIL https://phabricator.wikimedia.org/T301800 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Meno25, Aklapper, pywikibot-bugs-list, Xqt, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T306134: XMLDumpPageGenerator is still not working
Mpaa added a comment. @Xqt, I think this might be the cause. https://gerrit.wikimedia.org/r/c/pywikibot/core/+/769728 TASK DETAIL https://phabricator.wikimedia.org/T306134 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Mpaa Cc: Mpaa, #pywikibot-replace.py, Aklapper, #pywikibot-pagegenerators.py, pywikibot-bugs-list, Basilicofresco, Fernandobacasegua34, 786, Suran38, Biggs657, Lalamarie69, Jyoo1011, JohnsonLee01, Juan90264, 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, TerraCodes, Dvorapa, Altostratus, Neuronton, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T281633: [dev] pre-commit for linting and code formatting
Mpaa added a comment. A well documented task. I tried it and it looks nice to me. BTW, I never found a case where the code is changed yet. Will continue using it and see if I encounter one of those cases. TASK DETAIL https://phabricator.wikimedia.org/T281633 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Rubin16, valhallasw, Xqt, Aklapper, pywikibot-bugs-list, JJMC89, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T299806: IndexPage cannot be save if page has categories
Mpaa added a comment. page.text is: '{{:MediaWiki:Proofreadpage_index_template\n|Type=book\n|Title=\n|Language=en\n|Volume=\n|Author=\n|Translator=\n|Editor=\n|Illustrator=\n|School=\n|Publisher=\n|Address=\n|Year=\n|Key=\n|ISBN=\n|OCLC=\n|LCCN=\n|BNF_ARK=\n|ARC=\n|DOI=\n|Source=_empty_\n|Image=Albert-Auguste Cochon de Lapparent.jpg\n|Progress=C\n|Transclusion=no\n|Validation_date=\n|Pages=[[Page:Pywikibot test page.djvu/1]]\n|Volumes={{Notice|This page is used for continuous integration of pywikibot library.\n\nDo not delete without contacting Pywikibot team (or [[User:Mpaa]] on this site).}}\n|Remarks=\n|Width=\n|Css=\n|Header=\n|Footer=\n}}\n[[Category:Test]]\n[[Category:Test cat]]' The trailing categories are currently not accepted as part of valid text when validating content. TASK DETAIL https://phabricator.wikimedia.org/T299806 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T299806: IndexPage cannot be save if page has categories
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **List of steps to reproduce** (step by step, including full links if applicable): import pywikibot from pywikibot import proofreadpage as pp site = pywikibot.Site('en', 'wikisource') page = pp.IndexPage(site, 'Index:Pywikibot_test_page_2') page.save(summary='test edit') **What happens?**: ~/python/core/pywikibot/proofreadpage.py in save(self, *args, **kwargs) 858 """ 859 if not self.has_valid_content(): --> 860 raise OtherPageSaveError( 861 self, 'An IndexPage must consist only of a single call to ' 862 '{{%s}}.' % self.INDEX_TEMPLATE) OtherPageSaveError: Edit to page [[Index:Pywikibot test page 2]] failed: An IndexPage must consist only of a single call to {{:MediaWiki:Proofreadpage_index_template}}. **What should have happened instead?**: Page is saved without errors. **Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.**: Pywikibot: [ssh] pywikibot-core.git (48e05cf, g15783, 2022/01/09, 12:47:08, OUTDATED) Release version: 7.0.0.dev0 setuptools version: 58.0.4 mwparserfromhell version: 0.6.2 wikitextparser version: n/a requests version: 2.27.1 Python: 3.8.3 (default, Jul 2 2020, 16:21:59) [GCC 7.3.0] TASK DETAIL https://phabricator.wikimedia.org/T299806 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Updated] T299264: replace.py: exceptions in user-fixex.py are not compiled according to 'regex' key in fix
Mpaa added projects: Pywikibot, Pywikibot-replace.py. Restricted Application added a subscriber: pywikibot-bugs-list. TASK DETAIL https://phabricator.wikimedia.org/T299264 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: pywikibot-bugs-list, Aklapper, Mpaa, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Updated] T292539: djvutext.py failure => got multiple values for keyword argument 'site'
Mpaa added a comment. See T292367 <https://phabricator.wikimedia.org/T292367> TASK DETAIL https://phabricator.wikimedia.org/T292539 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Billinghurst, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T292367: djvutxt.py raising TypeError
Mpaa added a comment. Probably a regression from I1e89af25a6e606cb6fab6d7d37fb41d6c146261d TASK DETAIL https://phabricator.wikimedia.org/T292367 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T292367: djvutxt.py raising TypeError
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION user@pc:~/python/core {master}$ python scripts/djvutext.py -index:Works_Translated_by_William_Whiston.djvu -djvu:Works_Translated_by_William_Whiston.djvu -pages:551-778 -summary:"upload text from djvu file" -force -simulate uploading text from /home/user/python/core/Works_Translated_by_William_Whiston.djvu to [[Index:Works Translated by William Whiston.djvu]] ERROR: Fatal error: Traceback (most recent call last): File "scripts/djvutext.py", line 205, in main() File "scripts/djvutext.py", line 199, in main bot = DjVuTextBot(djvu, index_page, pages=pages, site=site, **options) File "scripts/djvutext.py", line 69, in __init__ super().__init__(site=index.site, **kwargs) TypeError: __init__() got multiple values for keyword argument 'site' TASK DETAIL https://phabricator.wikimedia.org/T292367 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Closed] T290400: pagefromfile.py: skip page if content has not changed
Mpaa closed this task as "Invalid". TASK DETAIL https://phabricator.wikimedia.org/T290400 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Triaged] T290400: pagefromfile.py: skip page if content has not changed
Mpaa triaged this task as "Low" priority. TASK DETAIL https://phabricator.wikimedia.org/T290400 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Edited] T290400: pagefromfile.py: skip page if content has not changed
Mpaa updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T290400 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T290400: pagefromfile.py: skip page if content has not changed
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION If pages loaded from file have not changed compared to file read from wiki, there is no point in trying to write them. self.put_current() should be skipped. and a 'no change' shall be notified instead, something like 'Page {} already exists and no changes to be applied, no action!' TASK DETAIL https://phabricator.wikimedia.org/T290400 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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 To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Claimed] T57072: pagegenerators should accept pageids
Mpaa claimed this task. TASK DETAIL https://phabricator.wikimedia.org/T57072 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Cyberpower678, gerritbot, Legoktm, jayvdb, valhallasw, Ricordisamoa, pywikibot-bugs-list, Ladsgroup, Billinghurst, 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, Masti, Alchimista, Rxy, RhinosF1 ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Edited] T270051: Unify Http Exceptions across pywikibot?
Mpaa updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T270051 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] [Triaged] T270051: Unify Http Exceptions across pywikibot?
Mpaa triaged this task as "Low" priority. TASK DETAIL https://phabricator.wikimedia.org/T270051 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] [Created] T270051: Unify Http Exceptions across pywikibot?
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION Sometimes, requests.Exceptions are checked directly and then converted outside http.py (e.g. here <https://github.com/wikimedia/pywikibot/blob/5faf56076d67f98ecbd26f924e96b27670e42bcf/pywikibot/pagegenerators.py#L2913>, or here <https://github.com/wikimedia/pywikibot/blob/809ab27dd50810f89c807b372cbc3f8dc626366a/pywikibot/proofreadpage.py#L610>), while some exceptions are converted in http.error_handling_callback(). A review should be carried out and a general guideline defined: - is it OK to handle requests.Exceptions directly? - shall they be filtered and converted centrally in htt.fetch()? - ... TASK DETAIL https://phabricator.wikimedia.org/T270051 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] [Updated] T269503: login.py doesn't work (critical error "due to uncaught exception")
Mpaa added a comment. In T269503#6671662 <https://phabricator.wikimedia.org/T269503#6671662>, @Xqt wrote: > Really strange: The current wikipedia:it release is '1.36.0-wmf.18' and the response should have `'messagecode'` key. Found this: https://www.mediawiki.org/wiki/Topic:Vrl03a6g6zrlpgps, T261061 <https://phabricator.wikimedia.org/T261061> TASK DETAIL https://phabricator.wikimedia.org/T269503 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Dvorapa, Framawiki, Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Sannita, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, WDoranWMF, Kent7301, joker88john, Viztor, DannyS712, CucyNoiD, Wenyi, Gaboe420, Amorymeltzer, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Sethakill, Lewizho99, Mdupont, JJMC89, Maathavan, dg711, 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] T268645: Pywikibot crashing on ratelimit after the ratelimit removal from bot group in 2020
Mpaa added a comment. According to this test, there are several actions that might emit 'wikibase-api-failed-save' as message. https://github.com/wikimedia/Wikibase/blob/e388e5b69ee0487566d7a8a77196ac0056f49747/repo/tests/phpunit/includes/Api/ApiUserBlockedTest.php Shouldn't they be all checked in: if code == 'failed-save' and \ self.action == 'wbeditentity' and \ self._is_wikibase_error_retryable(result['error']): self.wait() continue instead of 'wbeditentity' only? TASK DETAIL https://phabricator.wikimedia.org/T268645 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Multichill, Xqt, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Akuckartz, Zkhalido, Viztor, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, Altostratus, Avicennasis, Scott_WUaS, mys_721tx, Wikidata-bugs, aude, jayvdb, Masti, Alchimista, Mbch331, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Retitled] T268398: OptionHandler.set_options fails if available_options is overridden in initializer instead as a class attribute
Mpaa renamed this task from "OptionHandler.set_options fails id available_options is overridden in initializer instead as a class attribute" to "OptionHandler.set_options fails if available_options is overridden in initializer instead as a class attribute". TASK DETAIL https://phabricator.wikimedia.org/T268398 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Mpaa Cc: Aklapper, pywikibot-bugs-list, JJMC89, Xqt, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, 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] T267762: cannot import name 'httplib' from 'urllib3.response during "pywikibot-core-tox-fasttest-py37-docker"
Mpaa added a comment. OK, it might be this: https://github.com/urllib3/urllib3/commit/d71c784053dbf53b7cf2511f81232102a6a2ec76#diff-008f01f06c84456177464927734cc849c073b1f3d13bfab947ff812a5b4ac965L27 TASK DETAIL https://phabricator.wikimedia.org/T267762 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] T267762: cannot import name 'httplib' from 'urllib3.response during "pywikibot-core-tox-fasttest-py37-docker"
Mpaa added a comment. Definitely. I tirued to install from scratch: (myenv)user@pc:~/python/work {master}$ python Python 3.8.5 (default, Sep 4 2020, 07:30:14) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> from requests.packages.urllib3.response import httplib Traceback (most recent call last): File "", line 1, in ImportError: cannot import name 'httplib' from 'urllib3.response' (/home/user/anaconda3/envs/myenv/lib/python3.8/site-packages/urllib3/response.py) >>> requests.__version__ '2.25.0' >>> import urllib3 >>> urllib3.__version__ '1.26.1' >>> TASK DETAIL https://phabricator.wikimedia.org/T267762 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] T267762: cannot import name 'httplib' from 'urllib3.response during "pywikibot-core-tox-fasttest-py37-docker"
Mpaa added a comment. New versions of requests and urllib3 were released today. https://github.com/psf/requests/blob/master/HISTORY.md 2.25.0 (2020-11-11) -- **Improvements** - Added support for NETRC environment variable. (#5643) **Dependencies** - Requests now supports urllib3 v1.26. https://github.com/urllib3/urllib3/blob/master/CHANGES.rst Might be related and an upstream issue. TASK DETAIL https://phabricator.wikimedia.org/T267762 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] [Created] T267762: cannot import name 'httplib' from 'urllib3.response during "pywikibot-core-tox-fasttest-py37-docker"
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION See https://integration.wikimedia.org/ci/job/pywikibot-core-tox-fasttest-py37-docker/1535/console The same is valid for py35. 22:24:57 == 22:24:57 ERROR: Failure: ImportError (cannot import name 'httplib' from 'urllib3.response' (/src/.tox/fasttest-py37/lib/python3.7/site-packages/urllib3/response.py)) 22:24:57 -- 22:24:57 Traceback (most recent call last): 22:24:57 File "/src/.tox/fasttest-py37/lib/python3.7/site-packages/nose/failure.py", line 39, in runTest 22:24:57 raise self.exc_val.with_traceback(self.tb) 22:24:57 File "/src/.tox/fasttest-py37/lib/python3.7/site-packages/nose/loader.py", line 418, in loadTestsFromName 22:24:57 addr.filename, addr.module) 22:24:57 File "/src/.tox/fasttest-py37/lib/python3.7/site-packages/nose/importer.py", line 47, in importFromPath 22:24:57 return self.importFromDir(dir_path, fqname) 22:24:57 File "/src/.tox/fasttest-py37/lib/python3.7/site-packages/nose/importer.py", line 94, in importFromDir 22:24:57 mod = load_module(part_fqname, fh, filename, desc) 22:24:57 File "/usr/lib/python3.7/imp.py", line 234, in load_module 22:24:57 return load_source(name, filename, file) 22:24:57 File "/usr/lib/python3.7/imp.py", line 171, in load_source 22:24:57 module = _load(spec) 22:24:57 File "", line 696, in _load 22:24:57 File "", line 677, in _load_unlocked 22:24:57 File "", line 728, in exec_module 22:24:57 File "", line 219, in _call_with_frames_removed 22:24:57 File "/src/tests/eventstreams_tests.py", line 14, in 22:24:57 from pywikibot.comms.eventstreams import EventStreams, EventSource 22:24:57 File "/src/pywikibot/comms/eventstreams.py", line 25, in 22:24:57 from requests.packages.urllib3.response import httplib 22:24:57 ImportError: cannot import name 'httplib' from 'urllib3.response' (/src/.tox/fasttest-py37/lib/python3.7/site-packages/urllib3/response.py) TASK DETAIL https://phabricator.wikimedia.org/T267762 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] T267717: clean_sandbox.py: uncaught exception: TypeError: unsupported operand type(s) for -: 'NoneType' and 'datetime.timedelta'
Mpaa added a comment. @Xqt shouldn't self.available_options['delay_td'] be accessible also via self.opt.delay_td also after setting a new value? TASK DETAIL https://phabricator.wikimedia.org/T267717 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Mpaa Cc: Mpaa, Aklapper, alanajjar, pywikibot-bugs-list, Meno25, 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] T261549: -redirectonly pagegenerators option wasn't ported from compat
Mpaa added a comment. @Xqt, I think this should be implemented as a filter. TASK DETAIL https://phabricator.wikimedia.org/T261549 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Homeboy_445, Strainu, Aklapper, Xqt, pywikibot-bugs-list, Annysah01, Rohitgeddam, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Soda, Chaytanya, Zkhalido, wiki-helenatxu, Viztor, Wenyi, Kieubinhtb, Tks4Fish, Mh-3110, Asad_Ali_Palijo, Lahi, Soteriaspace, JakeTheDeveloper, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, xSavitar, Altostratus, Avicennasis, MuhammadShuaib, Tmalhotra, SimmeD, mys_721tx, jayvdb, droid, Masti, Alchimista, Rxy, Jay8g ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Unassigned] T57072: pagegenerators should accept pageids
Mpaa removed Mpaa as the assignee of this task. TASK DETAIL https://phabricator.wikimedia.org/T57072 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Cyberpower678, gerritbot, Legoktm, jayvdb, valhallasw, Ricordisamoa, pywikibot-bugs-list, Ladsgroup, Billinghurst, 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, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Unassigned] T73646: replace.py: async output messages jumbled with user interaction on main thread
Mpaa removed Mpaa as the assignee of this task. TASK DETAIL https://phabricator.wikimedia.org/T73646 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Dvorapa, Xqt, Aklapper, gerritbot, Mpaa, JAnD, jayvdb, valhallasw, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, droid, Masti, Alchimista, Rxy, Jay8g ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Unassigned] T198452: Always enable namespace filtering in QueryGenerator
Mpaa removed Mpaa as the assignee of this task. TASK DETAIL https://phabricator.wikimedia.org/T198452 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: gerritbot, Dvorapa, Mpaa, zhuyifei1999, Aklapper, Xqt, 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] T132676: Impossible to upload a file that ends with the '\r' byte using Pywikibot
Mpaa added a subscriber: Anomie. Mpaa added a comment. In T132676#6577051 <https://phabricator.wikimedia.org/T132676#6577051>, @Anomie wrote: > In T132676#6575067 <https://phabricator.wikimedia.org/T132676#6575067>, @Mpaa wrote: > >> @Anomie is base64 encode supported by api action=upload? > > Not in itself, but you can use MIME's Content-Transfer-Encoding to encode the data as base64 rather than binary. > > Since I no longer work for the WMF, I'm not inclined to do much to do their work for them at this time. OK, thanks. As info for future readers, I tried but if I set base64 there is a mismatch with filesize. At the end it gives an error saying that filesize does not match (as if it is adding the size of the base64-encoded chunks, maybe, and then it gets more data than declared in filesize). TASK DETAIL https://phabricator.wikimedia.org/T132676 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Anomie, AntiCompositeNumber, Fae, Mpaa, Avicennasis, MarkTraceur, Multichill, Liuxinyu970226, pywikibot-bugs-list, Matanya, matmarex, czar, Aklapper, Steinsplitter, zhuyifei1999, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 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] T266117: Frequent chunk-too-small errors
Mpaa closed this task as a duplicate of T132676: Impossible to upload a file that ends with the '\r' byte using Pywikibot. TASK DETAIL https://phabricator.wikimedia.org/T266117 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: AntiCompositeNumber, Mpaa, zhuyifei1999, Aklapper, pywikibot-bugs-list, Fae, JohnsonLee01, SHEKH, Dijkstra, CBogen, Khutuck, Zkhalido, Viztor, Wenyi, Ramsey-WMF, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Poyekhali, Altostratus, Taiwania_Justo, Avicennasis, Ixocactus, Wong128hk, mys_721tx, El_Grafo, Dinoguy1000, jayvdb, Masti, Alchimista, Steinsplitter, Rxy, Keegan ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Merged] T132676: Impossible to upload a file that ends with the '\r' byte using Pywikibot
Mpaa merged a task: T266117: Frequent chunk-too-small errors. Mpaa added a subscriber: AntiCompositeNumber. TASK DETAIL https://phabricator.wikimedia.org/T132676 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: AntiCompositeNumber, Fae, Mpaa, Anomie, Avicennasis, MarkTraceur, Multichill, Liuxinyu970226, pywikibot-bugs-list, Matanya, matmarex, czar, Aklapper, Steinsplitter, zhuyifei1999, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 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] T266117: Frequent chunk-too-small errors
Mpaa added a comment. In T266117#6576230 <https://phabricator.wikimedia.org/T266117#6576230>, @Fae wrote: > As my 'personal' work-around, just for UK legislation PDFs that the API flags with chunk-too-small and fails on a second upload, the pdf is trimmed of the final byte and re-attempted. In my view this is a terrible hack rather than a fix. > > However, this initially appears to be working with the files both uploading and displaying successfully, though it may later cause unpredictable errors as it's hardly an intelligent fix. Ref to this category <https://commons.wikimedia.org/w/index.php?title=Category:Work_around_of_byte_trimmed_for_chunk-too-small_API_error> for examples. > > Code snippet: > > rec = uptry(local, fn, dd, comment, False) > if rec in ['chunk-too-small']: > print "Chunk-too-small, so trying trimming off 1 byte" > with open(local, 'rb+') as filehandle: > filehandle.seek(-1, os.SEEK_END) > filehandle.truncate() > rec = uptry(local, fn, dd + "\n[[Category:Work around of byte trimmed for chunk-too-small API error]]", comment, False) I think a better workaround, if it works, is to use source_url in site.upload(). It delegates to API the task of fetching the file. If it works, the file is hopefully the original. TASK DETAIL https://phabricator.wikimedia.org/T266117 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: AntiCompositeNumber, Mpaa, zhuyifei1999, Aklapper, pywikibot-bugs-list, Fae, JohnsonLee01, SHEKH, Dijkstra, CBogen, Khutuck, Zkhalido, Viztor, Wenyi, Ramsey-WMF, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Poyekhali, Altostratus, Taiwania_Justo, Avicennasis, Ixocactus, Wong128hk, mys_721tx, El_Grafo, Dinoguy1000, jayvdb, Masti, Alchimista, Steinsplitter, Rxy, Keegan ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T132676: Impossible to upload a file that ends with the '\r' byte using Pywikibot
Mpaa added a comment. @Fae, strange, it worked for me, I tried this file and the byte was added. https://commons.wikimedia.org/w/index.php?title=File%3ABritish_Transport_Commission_Act_1949_%28UKLA_1949-29%29.pdf&type=revision&diff=500900036&oldid=500838588 site = pywikibot.Site('commons', 'commons') page = pywikibot.FilePage(site, 'File:British_Transport_Commission_Act_1949_(UKLA_1949-29).pdf') site.loadimageinfo(page, history=True) {'timestamp': '2020-10-25T13:52:37Z', 'user': 'Mpaa', 'size': 4873007, 'width': 1239, 'height': 1754, 'pagecount': 44, ... {'timestamp': '2020-10-25T13:00:08Z', 'user': 'Fæ', 'size': 4873006, 'width': 1239, 'height': 1754, 'pagecount': 44, ... TASK DETAIL https://phabricator.wikimedia.org/T132676 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Fae, Mpaa, Anomie, Avicennasis, MarkTraceur, Multichill, Liuxinyu970226, pywikibot-bugs-list, Matanya, matmarex, czar, Aklapper, Steinsplitter, zhuyifei1999, 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, 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] T266117: Frequent chunk-too-small errors
Mpaa added a comment. @Fae, I proposed a fix/hack at T132676 <https://phabricator.wikimedia.org/T132676>. TASK DETAIL https://phabricator.wikimedia.org/T266117 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: AntiCompositeNumber, Mpaa, zhuyifei1999, Aklapper, pywikibot-bugs-list, Fae, JohnsonLee01, SHEKH, Dijkstra, CBogen, Khutuck, Zkhalido, Viztor, Wenyi, Ramsey-WMF, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Poyekhali, Altostratus, Taiwania_Justo, Avicennasis, Ixocactus, Wong128hk, mys_721tx, El_Grafo, Dinoguy1000, jayvdb, Masti, Alchimista, Steinsplitter, Rxy, Keegan ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Changed Subscribers] T132676: Impossible to upload a file that ends with the '\r' byte using Pywikibot
Mpaa added subscribers: Anomie, Mpaa. Mpaa added a comment. @Anomie is base64 encode supported by api action=upload? TASK DETAIL https://phabricator.wikimedia.org/T132676 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Anomie, Avicennasis, MarkTraceur, Multichill, Liuxinyu970226, pywikibot-bugs-list, Matanya, matmarex, czar, Aklapper, Steinsplitter, zhuyifei1999, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 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] T266117: Frequent chunk-too-small errors
Mpaa added a comment. I think it is related to T132676 <https://phabricator.wikimedia.org/T132676>, I checked the first file and it ends in '\r'. TASK DETAIL https://phabricator.wikimedia.org/T266117 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, zhuyifei1999, Aklapper, pywikibot-bugs-list, Fae, JohnsonLee01, SHEKH, Dijkstra, CBogen, Khutuck, Zkhalido, Viztor, Wenyi, Ramsey-WMF, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Poyekhali, Altostratus, Taiwania_Justo, Avicennasis, Ixocactus, Wong128hk, mys_721tx, El_Grafo, Dinoguy1000, jayvdb, Masti, Alchimista, Steinsplitter, Rxy, Keegan ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T265946: scripts fail with -v option in python3.8
Mpaa added a comment. btw, I am using Anaconda distribution. TASK DETAIL https://phabricator.wikimedia.org/T265946 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Xqt, Aklapper, pywikibot-bugs-list, Mpaa, 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] T266084: Incorrect server time from pywitibot
Mpaa added a comment. The problem is that with expiry=True a CahcedRequest is called and there True is converted to 1 day def _request(self, **kwargs): """Create a request by forwarding all parameters directly.""" if 'expiry' in kwargs and kwargs['expiry'] is None: del kwargs['expiry'] return self._request_class(kwargs)(site=self, **kwargs) --> this creates a CachedRequest with expiry=True, which will become 1 day TASK DETAIL https://phabricator.wikimedia.org/T266084 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, JJMC89, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, 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] [Closed] T266000: http.py - error_handling_callback
Mpaa closed this task as "Resolved". TASK DETAIL https://phabricator.wikimedia.org/T266000 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Xqt, Mpaa, Aklapper, pywikibot-bugs-list, Rubin16, 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] [Reopened] T266000: http.py - error_handling_callback
Mpaa reopened this task as "Open". TASK DETAIL https://phabricator.wikimedia.org/T266000 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Rubin16, 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] T266000: http.py - error_handling_callback
Mpaa added a comment. Seems working, strange. Anyhow I have added Server414Error to the managed exceptions, so the bot won't crash. TASK DETAIL https://phabricator.wikimedia.org/T266000 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Rubin16, 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] [Closed] T265257: Pywikibot ImageTransfer script has features deprecated for 5 years
Mpaa closed this task as "Resolved". Mpaa claimed this task. Mpaa added a comment. OK, I will mark this as Resolved, shall be reopened if needed. TASK DETAIL https://phabricator.wikimedia.org/T265257 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Vicarage, 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] T266000: http.py - error_handling_callback
Mpaa added a comment. Or better, add another exception handling after line 620 except pywikibot.Server414Error as e: pywikibot.output("Server414Error --> Can't retrieve page {} : {}" .format(ref.url, e)) continue and see what is printed when this is triggered. TASK DETAIL https://phabricator.wikimedia.org/T266000 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Rubin16, 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] T266000: http.py - error_handling_callback
Mpaa added a comment. Print the url, if possible. Add pywikibot.output(ref.url) f = comms.http.fetch(ref.url, use_fake_user_agent=self._use_fake_user_agent) TASK DETAIL https://phabricator.wikimedia.org/T266000 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Rubin16, 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] T265257: Pywikibot ImageTransfer script has features deprecated for 5 years
Mpaa added a comment. @Vicarage, is this solved after the patch? TASK DETAIL https://phabricator.wikimedia.org/T265257 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Vicarage, 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] T266000: http.py - error_handling_callback
Mpaa added a comment. Not sure this is a pywikibot error. Could you find out which is the ref.url it is trying to fetch in: f = comms.http.(ref.url, use_fake_user_agent=self._use_fake_user_agent) and post it here? TASK DETAIL https://phabricator.wikimedia.org/T266000 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, pywikibot-bugs-list, Rubin16, 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] T265948: pywikibot can't write log file after size >1MB
Mpaa added a comment. It seems windows-specific, on Ubuntu 18.04 I get: -rw-r--r-- 1 user user 973087 Oct 19 22:39 listpages-bot.2.log -rw-r--r-- 1 user user 956838 Oct 19 22:39 listpages-bot.1.log -rw-r--r-- 1 user user 840062 Oct 19 22:39 listpages-bot.log TASK DETAIL https://phabricator.wikimedia.org/T265948 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, JAnD, 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] [Edited] T265946: scripts fail with -v option in python3.8
Mpaa updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T265946 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] T265946: scripts fail with -v option in python3.8
Mpaa added a comment. In PAWS with python3.6 there is no __file__ attribute. @PAWS:~$ python Python 3.6.9 (default, Jul 17 2020, 12:50:27) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> >>> import sys >>> vars(sys.modules['mpl_toolkits']) import sys vars(sys.modules['mpl_toolkits']) {'__name__': 'mpl_toolkits', '__doc__': None, '__package__': 'mpl_toolkits', '__loader__': <_frozen_importlib_external._NamespaceLoader at 0x7f6e27d83208>, '__spec__': ModuleSpec(name='mpl_toolkits', loader=None, origin='namespace', submodule_search_locations=_NamespacePath(['/srv/paws/lib/python3.6/site-packages/mpl_toolkits'])), '__path__': _NamespacePath(['/srv/paws/lib/python3.6/site-packages/mpl_toolkits'])} TASK DETAIL https://phabricator.wikimedia.org/T265946 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] [Created] T265946: scripts fail with -v option in python3.8
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION Scripts crash when called with -v option in python 3.8. Cannot say about other versions, except my comment below in **Expected Results**: Release version: 5.0.1.dev0 requests version: 2.24.0 cacerts: /home/user/anaconda3/lib/python3.8/site-packages/certifi/cacert.pem certificate test: ok Python: 3.8.3 (default, Jul 2 2020, 16:21:59) **Steps to Reproduce: ** python scripts/listpages.py -start:A -v **Actual Results:** user@pc:~/python/core$ python scripts/listpages.py -start:A -v === Pywikibot framework v5.0.1.dev0 -- Logging header === COMMAND: ['scripts/listpages.py', '-start:A', '-v'] DATE: 2020-10-19 20:01:07.414882 UTC VERSION: [ssh] pywikibot-core.git (4cdf2f0, g13425, 2020/10/19, 17:05:17, n/a) SYSTEM: posix.uname_result(sysname='Linux', nodename='pc', release='4.15.0-117-generic', version='#118-Ubuntu SMP Fri Sep 4 20:02:41 UTC 2020', machine='x86_64') CONFIG FILE DIR: /home/user/.pywikibot PACKAGES: Traceback (most recent call last): File "scripts/listpages.py", line 284, in main() File "scripts/listpages.py", line 190, in main local_args = pywikibot.handle_args(args) File "/home/user/python/core/pywikibot/bot.py", line 850, in handle_args pywikibot.Site() File "/home/user/python/core/pywikibot/tools/__init__.py", line 1450, in wrapper return obj(*__args, **__kw) File "/home/user/python/core/pywikibot/__init__.py", line 1203, in Site debug("Instantiated %s object '%s'" File "/home/user/python/core/pywikibot/logging.py", line 178, in debug logoutput(text, decoder, newline, DEBUG, layer, **kwargs) File "/home/user/python/core/pywikibot/logging.py", line 76, in logoutput _init() File "/home/user/python/core/pywikibot/logging.py", line 35, in _init init_routine() File "/home/user/python/core/pywikibot/bot.py", line 346, in init_handlers writelogheader() File "/home/user/python/core/pywikibot/bot.py", line 392, in writelogheader packages = version.package_versions(check_package_list) File "/home/user/python/core/pywikibot/version.py", line 519, in package_versions if os.path.normcase(package.__file__).startswith( File "/home/user/anaconda3/lib/python3.8/posixpath.py", line 54, in normcase return os.fspath(s) TypeError: expected str, bytes or os.PathLike object, not NoneType Found 1 wikisource:en processes running, including this one. Dropped throttle(s). Closing network session. CRITICAL: Exiting due to uncaught exception Network session closed. The offending package is (there might be others) {'__name__': 'mpl_toolkits', '__doc__': None, '__package__': 'mpl_toolkits', '__loader__': <_frozen_importlib_external._NamespaceLoader object at 0x7f03eb523f10>, '__spec__': ModuleSpec(name='mpl_toolkits', loader=<_frozen_importlib_external._NamespaceLoader object at 0x7f03eb523f10>, submodule_search_locations=_NamespacePath(['/home/user/anaconda3/lib/python3.8/site-packages/mpl_toolkits'])), '__file__': None, '__path__': _NamespacePath(['/home/user/anaconda3/lib/python3.8/site-packages/mpl_toolkits'])} where: __file__': None **Expected Results:** The script should work, e.g. in T265928 <https://phabricator.wikimedia.org/T265928> (python3.6), it is possible to see: PACKAGES: ... mpl_toolkits ([path unknown]) = ?? mwoauth (/srv/paws/lib/python3.6/site-packages/mwoauth/) = 0.3.7 ... TASK DETAIL https://phabricator.wikimedia.org/T265946 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] [Updated] T265842: http_tests.LiveFakeUserAgentTestCase fails
Mpaa added a comment. As reference for user agent, this task gives some background: T152075 <https://phabricator.wikimedia.org/T152075> TASK DETAIL https://phabricator.wikimedia.org/T265842 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Xqt, Aklapper, pywikibot-bugs-list, Mpaa, 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] [Created] T265842: http_tests.LiveFakeUserAgentTestCase fails
Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION This test is SKIPPED in travis. tests/http_tests.py::LiveFakeUserAgentTestCase::test_fetch_with_fake_useragent SKIPPED After installing locally fake_useragent, test failed. python -m unittest tests.http_tests.LiveFakeUserAgentTestCase tests: max_retries reduced from 15 to 1 F == FAIL: test_fetch_with_fake_useragent (tests.http_tests.LiveFakeUserAgentTestCase) Test method with fake_useragent module. -- Traceback (most recent call last): File "/home/user/python/core/tests/http_tests.py", line 352, in test_fetch_with_fake_useragent self._test_fetch_use_fake_user_agent() File "/home/user/python/core/tests/http_tests.py", line 336, in _test_fetch_use_fake_user_agent self.assertEqual(r.headers['user-agent'], http.user_agent()) AssertionError: 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/[57 chars]7.36' != 'python -m unittest Pywikibot/5.0.0.dev0 ([40 chars]al.0' - Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2309.372 Safari/537.36 + python -m unittest Pywikibot/5.0.0.dev0 (g13409) requests/2.24.0 Python/3.8.3.final.0 -- Ran 1 test in 3.103s FAILED (failures=1) This is almost certainly a regression of https://gerrit.wikimedia.org/r/c/pywikibot/core/+/634238 TASK DETAIL https://phabricator.wikimedia.org/T265842 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, 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] T265800: pywikibot sitelinks have changed?
Mpaa added a comment. https://gerrit.wikimedia.org/r/c/pywikibot/core/+/442169 https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.page.html?highlight=sitelink#pywikibot.page.SiteLink TASK DETAIL https://phabricator.wikimedia.org/T265800 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Xqt, matej_suchanek, Aklapper, pywikibot-bugs-list, Mike_Peel, 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] T265715: API error templatedata-invalid-parse: Syntax error in JSON
Mpaa added a comment. Seems so, could you try ti fix the page and retry? TASK DETAIL https://phabricator.wikimedia.org/T265715 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, Kizule, 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] T265715: API error templatedata-invalid-parse: Syntax error in JSON
Mpaa added a comment. I tried to validate the json data on https://jsonlint.com/ Error: Parse error on line 446: ...pe": "string" }, }, "maps": { "cit -^ Expecting 'STRING', got '}' I think you have an extra comma here: "osti-access": { "label": "HDL access level", "description": "If the full text is free to read on OSTI, type 'free'.", "type": "string" }, < extra comma ?! }, TASK DETAIL https://phabricator.wikimedia.org/T265715 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Aklapper, Kizule, 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] [Changed Subscribers] T227610: Outdated document on Page.protect method
Mpaa added subscribers: Xqt, Mpaa. Mpaa added a comment. @xqt I think edit, move, create and upload (and all the process_deprecated_arg) can be removed. There is a FutureWarning since https://github.com/wikimedia/pywikibot/commit/7ddfa6576d1e0b0169f934f96ebc1b0a9b7bab4e#diff-a0fb5343bf06e967de98a05792aa046e10f446974cd02aede6d91c88bf2ffe63L1999 What do you think? TASK DETAIL https://phabricator.wikimedia.org/T227610 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, MohammadtheEditor, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Urstrulykkr, 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] [Unassigned] T265257: Pywikibot ImageTransfer script has features deprecated for 5 years
Mpaa removed Mpaa as the assignee of this task. TASK DETAIL https://phabricator.wikimedia.org/T265257 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Vicarage, 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