Page MenuHomePhabricator

Mpaa (Mpaa)
User

Projects

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Monday

  • Clear sailing ahead.

User Details

User Since
Oct 24 2014, 11:18 PM (364 w, 1 h)
Availability
Available
LDAP User
Unknown
MediaWiki User
Mpaa [ Global Accounts ]

Recent Activity

Tue, Oct 5

Mpaa added a comment to T292539: djvutext.py failure => got multiple values for keyword argument 'site'.

See T292367

Tue, Oct 5, 8:20 PM · Pywikibot

Sun, Oct 3

Mpaa added a comment to T292367: djvutxt.py raising TypeError.

Probably a regression from I1e89af25a6e606cb6fab6d7d37fb41d6c146261d

Sun, Oct 3, 1:52 PM · Pywikibot-Scripts, Pywikibot
Mpaa created T292367: djvutxt.py raising TypeError.
Sun, Oct 3, 1:51 PM · Pywikibot-Scripts, Pywikibot

Sep 7 2021

Mpaa closed T290400: pagefromfile.py: skip page if content has not changed as Invalid.
Sep 7 2021, 8:55 PM · Pywikibot

Sep 6 2021

Mpaa triaged T290400: pagefromfile.py: skip page if content has not changed as Low priority.
Sep 6 2021, 7:53 PM · Pywikibot

Sep 5 2021

Mpaa updated the task description for T290400: pagefromfile.py: skip page if content has not changed.
Sep 5 2021, 9:07 PM · Pywikibot
Mpaa created T290400: pagefromfile.py: skip page if content has not changed.
Sep 5 2021, 8:58 PM · Pywikibot

Jan 15 2021

Mpaa committed rPWBC527a7dfe6515: [IMPR] http.fetch() return requests.Response() (authored by Mpaa).
[IMPR] http.fetch() return requests.Response()
Jan 15 2021, 12:34 PM

Jan 14 2021

Mpaa committed rPWBC1eb2f1e08b0e: [IMPR] remove IDE warnings from __init__.py (authored by Mpaa).
[IMPR] remove IDE warnings from __init__.py
Jan 14 2021, 11:01 PM
Mpaa committed rPWBCba26aa2d5ff9: [IMPR] remove some IDE warnings for site.py (authored by Mpaa).
[IMPR] remove some IDE warnings for site.py
Jan 14 2021, 12:44 AM

Jan 10 2021

Mpaa committed rPWBCac3ef7cfa01c: site.py: delete page using pageid instead of title (authored by Mpaa).
site.py: delete page using pageid instead of title
Jan 10 2021, 9:11 PM

Dec 30 2020

Mpaa committed rPWBCfd6f8ce6530f: [IMPR] rename login.getCookie() to login.login_to_site() (authored by Mpaa).
[IMPR] rename login.getCookie() to login.login_to_site()
Dec 30 2020, 10:50 AM

Dec 26 2020

Mpaa claimed T57072: pagegenerators should accept pageids.
Dec 26 2020, 10:44 PM · Pywikibot, Pywikibot-pagegenerators.py

Dec 23 2020

Mpaa committed rPWBC4f2147f56833: [bugfix] fix api_tests.TestAPIMWException (authored by Mpaa).
[bugfix] fix api_tests.TestAPIMWException
Dec 23 2020, 6:28 AM

Dec 20 2020

Mpaa committed rPWBCc496bb1af164: [IMPR] fix docstring in http.error_handling_callback() (authored by Mpaa).
[IMPR] fix docstring in http.error_handling_callback()
Dec 20 2020, 10:50 PM
Mpaa committed rPWBC313655cf3bc3: [IMPR] remove unneeded explicit params in fetch() and request() (authored by Mpaa).
[IMPR] remove unneeded explicit params in fetch() and request()
Dec 20 2020, 6:30 PM
Mpaa committed rPWBCabadc41578eb: [IMPR] align http.fetch() params with requests (authored by Mpaa).
[IMPR] align http.fetch() params with requests
Dec 20 2020, 4:12 PM

Dec 15 2020

Mpaa committed rPWBCc8feae188ae9: [IMPR] use response in http.error_handling_callback() (authored by Mpaa).
[IMPR] use response in http.error_handling_callback()
Dec 15 2020, 7:03 AM

Dec 13 2020

Mpaa updated the task description for T270051: Unify Http Exceptions across pywikibot?.
Dec 13 2020, 6:14 PM · Pywikibot
Mpaa triaged T270051: Unify Http Exceptions across pywikibot? as Low priority.
Dec 13 2020, 6:05 PM · Pywikibot
Mpaa created T270051: Unify Http Exceptions across pywikibot?.
Dec 13 2020, 6:05 PM · Pywikibot

Dec 12 2020

Mpaa added a comment to T269503: login.py doesn't work (critical error "due to uncaught exception").

Really strange: The current wikipedia:it release is '1.36.0-wmf.18' and the response should have 'messagecode' key.

Dec 12 2020, 6:32 PM · MediaWiki-API, Pywikibot-login.py, Pywikibot

Dec 7 2020

Mpaa committed rPWBC9c212a5bf471: [IMPR] remove deprecated args for Page.protect() (authored by Mpaa).
[IMPR] remove deprecated args for Page.protect()
Dec 7 2020, 8:17 AM

Dec 6 2020

Mpaa committed rPWBC84e781bfa809: [IMPR] improve self.toJSON() methods in page.__init__.py (authored by Mpaa).
[IMPR] improve self.toJSON() methods in page.__init__.py
Dec 6 2020, 4:48 PM
Mpaa committed rPWBC37a180c78a0f: [IMPR] reduce code complexity of pagegenerators.py (authored by Mpaa).
[IMPR] reduce code complexity of pagegenerators.py
Dec 6 2020, 4:48 PM

Nov 24 2020

Mpaa added a comment to T268645: Pywikibot crashing on ratelimit after the ratelimit removal from bot group in 2020.

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

Nov 24 2020, 9:00 PM · Wikidata, Pywikibot

Nov 23 2020

Mpaa committed rPWBCdc1f0fbb5140: [IMPR] Add repr() method to BaseDataDict and ClaimCollection (authored by Mpaa).
[IMPR] Add repr() method to BaseDataDict and ClaimCollection
Nov 23 2020, 10:10 AM

Nov 22 2020

Mpaa renamed T268398: OptionHandler.set_options fails if available_options is overridden in initializer instead as a class attribute 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.
Nov 22 2020, 9:02 PM · Pywikibot
Mpaa committed rPWBCcf5aa593cef9: [IMPR] remove code duplication in page.__init__.py (authored by Mpaa).
[IMPR] remove code duplication in page.__init__.py
Nov 22 2020, 11:21 AM

Nov 15 2020

Mpaa committed rPWBC9c006a75516b: [IPMR] reduce code duplication in throttle.py (authored by Mpaa).
[IPMR] reduce code duplication in throttle.py
Nov 15 2020, 11:25 AM

Nov 13 2020

Mpaa added a comment to T228594: [phetools] Wikisource OCR deletes old contents of a page, but does not generate new text..

@Xover, I think it is a misunderstanding
data.text.substring(0,5) != "<?xml" -> XML is accepted, if it is not XML, then is considered error.

Nov 13 2020, 6:22 PM · Upstream, All-and-every-Wikisource, Tools

Nov 12 2020

Mpaa committed rPWBC7d1fd10c4468: [IMPR] reduce code complexity of pagegenerators.py (authored by Mpaa).
[IMPR] reduce code complexity of pagegenerators.py
Nov 12 2020, 3:33 PM
Mpaa committed rPWBCe079472eab6d: [bugfix] fix import of httplib after release of requests 2.25 (authored by Mpaa).
[bugfix] fix import of httplib after release of requests 2.25
Nov 12 2020, 9:15 AM

Nov 11 2020

Mpaa added a comment to T267762: cannot import name 'httplib' from 'urllib3.response during "pywikibot-core-tox-fasttest-py37-docker".

OK, it might be this:
https://github.com/urllib3/urllib3/commit/d71c784053dbf53b7cf2511f81232102a6a2ec76#diff-008f01f06c84456177464927734cc849c073b1f3d13bfab947ff812a5b4ac965L27

Nov 11 2020, 10:43 PM · Pywikibot
Mpaa added a comment to T267762: cannot import name 'httplib' from 'urllib3.response during "pywikibot-core-tox-fasttest-py37-docker".

Definitely. I tried to install from scratch:

Nov 11 2020, 10:22 PM · Pywikibot
Mpaa added a comment to T267762: cannot import name 'httplib' from 'urllib3.response during "pywikibot-core-tox-fasttest-py37-docker".

New versions of requests and urllib3 were released today.

Nov 11 2020, 10:15 PM · Pywikibot
Mpaa created T267762: cannot import name 'httplib' from 'urllib3.response during "pywikibot-core-tox-fasttest-py37-docker".
Nov 11 2020, 9:46 PM · Pywikibot
Mpaa added a comment to T267717: clean_sandbox.py: uncaught exception: TypeError: unsupported operand type(s) for -: 'NoneType' and 'datetime.timedelta'.

@Xqt shouldn't self.available_options['delay_td'] be accessible also via self.opt.delay_td also after setting a new value?

Nov 11 2020, 4:10 PM · Pywikibot-Scripts, Pywikibot
Mpaa committed rPWBCf567f3af1bde: [IMPR] reduce code complexity in pagegenerators.py (authored by Mpaa).
[IMPR] reduce code complexity in pagegenerators.py
Nov 11 2020, 11:43 AM

Nov 10 2020

Mpaa committed rPWBC9b9c92ff546d: [IMPR] add support for some 'wbset' actions in DataSite (authored by Mpaa).
[IMPR] add support for some 'wbset' actions in DataSite
Nov 10 2020, 10:08 AM
Mpaa committed rPWBCb167ffec457c: [IMPR] reduce code complexity of pagegenerators.py (authored by Mpaa).
[IMPR] reduce code complexity of pagegenerators.py
Nov 10 2020, 9:02 AM

Nov 9 2020

Mpaa committed rPWBC6e5711d41a61: [IMPR] reduce code complexity of pagegenerators.py (authored by Mpaa).
[IMPR] reduce code complexity of pagegenerators.py
Nov 9 2020, 6:02 PM
Mpaa committed rPWBC6827d02a11a1: [IMPR] Reduce code complexity in pagegenerators.py (authored by Mpaa).
[IMPR] Reduce code complexity in pagegenerators.py
Nov 9 2020, 4:18 PM
Mpaa committed rPWBC6bc3c9c203a3: [IMPR] reduce code complexity of pagegenerators.py (authored by Mpaa).
[IMPR] reduce code complexity of pagegenerators.py
Nov 9 2020, 7:43 AM
Mpaa committed rPWBCdad73b0144d0: [IMPR] deprecate site arg in CategoryFilterPageGenerator (authored by Mpaa).
[IMPR] deprecate site arg in CategoryFilterPageGenerator
Nov 9 2020, 7:43 AM

Nov 5 2020

Mpaa committed rPWBCc8bbf7061e9d: [IMPR] reduce code complexity of pagegenerators.py (authored by Mpaa).
[IMPR] reduce code complexity of pagegenerators.py
Nov 5 2020, 7:34 PM

Nov 4 2020

Mpaa committed rPWBC1c2809121d85: [IMPR] reduce code complexity of pagegenerators.py (authored by Mpaa).
[IMPR] reduce code complexity of pagegenerators.py
Nov 4 2020, 10:32 PM
Mpaa committed rPWBC7cb31f03b864: [IMPR] reduce code complexity of pagegenerators.py (authored by Mpaa).
[IMPR] reduce code complexity of pagegenerators.py
Nov 4 2020, 7:20 AM

Nov 3 2020

Mpaa committed rPWBCe5ba7edf8349: [IMPR] reduce code complexity of imageharvest.py (authored by Mpaa).
[IMPR] reduce code complexity of imageharvest.py
Nov 3 2020, 7:46 PM
Mpaa added a comment to T261549: -redirectonly pagegenerators option wasn't ported from compat.

@Xqt, I think this should be implemented as a filter.

Nov 3 2020, 7:05 PM · Pywikibot-compat-to-core, Pywikibot

Oct 31 2020

Mpaa committed rPWBC9dfbe26b2e17: [bugfix] Avoid conflicts between site and possible site keyword (authored by Mpaa).
[bugfix] Avoid conflicts between site and possible site keyword
Oct 31 2020, 9:29 PM

Oct 30 2020

Mpaa committed rPWBCdcbddc69bfb9: remove wrong param in Page.latest_revision_id (authored by Mpaa).
remove wrong param in Page.latest_revision_id
Oct 30 2020, 5:18 PM
Mpaa committed rPWBCd173169f5f85: [bugfix] do not raise Exception in Page.get_best_claim() (authored by Mpaa).
[bugfix] do not raise Exception in Page.get_best_claim()
Oct 30 2020, 5:18 PM

Oct 29 2020

Mpaa committed rPWBC9bfe5928f096: [IMPR] fix TODO in wikisourcetext.py (authored by Mpaa).
[IMPR] fix TODO in wikisourcetext.py
Oct 29 2020, 6:19 PM
Mpaa committed rPWBCb903d0aa260c: [IMPR] add type annotation in pywikibot.__init__.py (authored by Mpaa).
[IMPR] add type annotation in pywikibot.__init__.py
Oct 29 2020, 3:59 PM
Mpaa committed rPWBCc82d08eefce4: [IMPR] cleanup IDE warnings in api.py (authored by Mpaa).
[IMPR] cleanup IDE warnings in api.py
Oct 29 2020, 12:14 AM

Oct 28 2020

Mpaa committed rPWBCd8a73cc623dc: [IMPR] remove deprecated mime_params in api.Request() (authored by Mpaa).
[IMPR] remove deprecated mime_params in api.Request()
Oct 28 2020, 11:18 AM

Oct 27 2020

Mpaa placed T57072: pagegenerators should accept pageids up for grabs.
Oct 27 2020, 6:06 PM · Pywikibot, Pywikibot-pagegenerators.py
Mpaa placed T73646: replace.py: async output messages jumbled with user interaction on main thread up for grabs.
Oct 27 2020, 6:05 PM · Patch-For-Review, Pywikibot-General, Pywikibot-compat-to-core, Pywikibot
Mpaa placed T198452: Always enable namespace filtering in QueryGenerator up for grabs.
Oct 27 2020, 6:04 PM · Pywikibot

Oct 26 2020

Mpaa updated subscribers of T132676: Impossible to upload a file that ends with the '\r' byte using Pywikibot.

@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.

Oct 26 2020, 5:52 PM · Pywikibot

Oct 25 2020

Mpaa merged task T266117: Frequent chunk-too-small errors into T132676: Impossible to upload a file that ends with the '\r' byte using Pywikibot.
Oct 25 2020, 8:24 PM · Commons, Pywikibot
Mpaa merged T266117: Frequent chunk-too-small errors into T132676: Impossible to upload a file that ends with the '\r' byte using Pywikibot.
Oct 25 2020, 8:24 PM · Pywikibot
Mpaa committed rPWBC8fae0cf0af95: [bugfix] upload a file that ends with the '\r' byte (authored by Mpaa).
[bugfix] upload a file that ends with the '\r' byte
Oct 25 2020, 3:16 PM
Mpaa added a comment to T266117: Frequent chunk-too-small errors.

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 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)
Oct 25 2020, 2:25 PM · Commons, Pywikibot
Mpaa added a comment to T132676: Impossible to upload a file that ends with the '\r' byte using Pywikibot.

@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

Oct 25 2020, 2:19 PM · Pywikibot
Mpaa added a comment to T266117: Frequent chunk-too-small errors.

@Fae, I proposed a fix/hack at T132676.
As you have several cases, I would appreciate if you could use it and provide feedback.

Oct 25 2020, 12:18 PM · Commons, Pywikibot

Oct 23 2020

Mpaa committed rPWBC92cb1ecf42a7: [IMPR] reduce code complexity of HttpRequest.encoding() (authored by Mpaa).
[IMPR] reduce code complexity of HttpRequest.encoding()
Oct 23 2020, 6:44 PM
Mpaa updated subscribers of T132676: Impossible to upload a file that ends with the '\r' byte using Pywikibot.

@Anomie is base64 encode supported by api action=upload?

Oct 23 2020, 6:03 PM · Pywikibot

Oct 22 2020

Mpaa committed rPWBC9de91b591c35: [bugfix] convert expiry=True to expiry=0 in siteinfo.get() (authored by Mpaa).
[bugfix] convert expiry=True to expiry=0 in siteinfo.get()
Oct 22 2020, 8:01 PM
Mpaa added a comment to T266117: Frequent chunk-too-small errors.

I think it is related to T132676, I checked the first file and it ends in '\r'.

Oct 22 2020, 6:02 PM · Commons, Pywikibot
Mpaa committed rPWBC3b1b07dbe875: [bugfix] support Namespace packages in version.py (authored by Mpaa).
[bugfix] support Namespace packages in version.py
Oct 22 2020, 10:05 AM
Mpaa committed rPWBC11b20e108196: [IMPR] delete.py: switch to new OptionHandler interface (authored by Mpaa).
[IMPR] delete.py: switch to new OptionHandler interface
Oct 22 2020, 10:05 AM

Oct 21 2020

Mpaa added a comment to T265946: scripts fail with -v option in python3.8.

btw, I am using Anaconda distribution.

Oct 21 2020, 5:10 PM · Pywikibot
Mpaa added a comment to T266084: Incorrect server time from pywitibot.

The problem is that with expiry=True in self.siteinfo.get('time', expiry=True)
a CachedRequest is called and there True is converted to 1 day

Oct 21 2020, 9:35 AM · Pywikibot

Oct 20 2020

Mpaa closed T266000: http.py - error_handling_callback as Resolved.
Oct 20 2020, 7:04 PM · Pywikibot-Scripts, Pywikibot
Mpaa committed rPWBC7a517b67402b: [bugfix] Add Server414Error to pywikibot.__init__() (authored by Mpaa).
[bugfix] Add Server414Error to pywikibot.__init__()
Oct 20 2020, 6:07 PM
Mpaa reopened T266000: http.py - error_handling_callback as "Open".
Oct 20 2020, 5:22 PM · Pywikibot-Scripts, Pywikibot
Mpaa committed rPWBCcff01d63c1e3: [IMPR] switch to new OptionHandler interface (authored by Mpaa).
[IMPR] switch to new OptionHandler interface
Oct 20 2020, 4:21 PM
Mpaa committed rPWBC488550dd25a9: [IMPR] add Server414Error in reflink.py and close file (authored by Mpaa).
[IMPR] add Server414Error in reflink.py and close file
Oct 20 2020, 4:15 PM
Mpaa added a comment to T266000: http.py - error_handling_callback.

Seems working, strange.
Anyhow I have added Server414Error to the managed exceptions, so the bot won't crash.

Oct 20 2020, 2:06 PM · Pywikibot-Scripts, Pywikibot
Mpaa closed T265257: Pywikibot ImageTransfer script has features deprecated for 5 years as Resolved.

OK, I will mark this as Resolved, shall be reopened if needed.

Oct 20 2020, 1:10 PM · Pywikibot
Mpaa added a comment to T266000: http.py - error_handling_callback.

Or better, add another exception handling after line 620

Oct 20 2020, 1:07 PM · Pywikibot-Scripts, Pywikibot
Mpaa added a comment to T266000: http.py - error_handling_callback.

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)

I hope you can reproduce the error without going through 100000 links :-)

Oct 20 2020, 12:54 PM · Pywikibot-Scripts, Pywikibot
Mpaa added a comment to T265257: Pywikibot ImageTransfer script has features deprecated for 5 years.

@Vicarage, is this solved after the patch?

Oct 20 2020, 12:51 PM · Pywikibot
Mpaa added a comment to T266000: http.py - error_handling_callback.

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.fetch(ref.url, use_fake_user_agent=self._use_fake_user_agent)

and post it here?

Oct 20 2020, 12:46 PM · Pywikibot-Scripts, Pywikibot

Oct 19 2020

Mpaa added a comment to T265948: pywikibot can't write log file after size >1MB.

It seems windows-specific, on Ubuntu 18.04 I get:

Oct 19 2020, 8:43 PM · Pywikibot
Mpaa added a comment to T265946: scripts fail with -v option in python3.8.

In PAWS with python3.6 there is no

Oct 19 2020, 8:35 PM · Pywikibot
Mpaa updated the task description for T265946: scripts fail with -v option in python3.8.
Oct 19 2020, 8:35 PM · Pywikibot
Mpaa created T265946: scripts fail with -v option in python3.8.
Oct 19 2020, 8:15 PM · Pywikibot
Mpaa committed rPWBC6323ca68fa24: [bugfix] fix http_tests.LiveFakeUserAgentTestCase (authored by Mpaa).
[bugfix] fix http_tests.LiveFakeUserAgentTestCase
Oct 19 2020, 5:08 PM
Mpaa committed rPWBCb2aa9a11ae16: [IMPR] remove callback param from fetch and simplify (authored by Mpaa).
[IMPR] remove callback param from fetch and simplify
Oct 19 2020, 9:04 AM
Mpaa committed rPWBCc64c9068c014: [IMPR] Reduce code complexity of HttpRequest.header_encoding() (authored by Mpaa).
[IMPR] Reduce code complexity of HttpRequest.header_encoding()
Oct 19 2020, 3:39 AM

Oct 18 2020

Mpaa added a comment to T265842: http_tests.LiveFakeUserAgentTestCase fails.

As reference for user agent, this task gives some background: T152075

Oct 18 2020, 9:26 PM · Pywikibot-tests, Pywikibot
Mpaa updated subscribers of T265842: http_tests.LiveFakeUserAgentTestCase fails.
Oct 18 2020, 9:24 PM · Pywikibot-tests, Pywikibot
Mpaa created T265842: http_tests.LiveFakeUserAgentTestCase fails.
Oct 18 2020, 9:23 PM · Pywikibot-tests, Pywikibot
Mpaa committed rPWBC2ab313e7192b: [IMPR] remove IDE warning for unfilled params (authored by Mpaa).
[IMPR] remove IDE warning for unfilled params
Oct 18 2020, 3:14 PM

Oct 17 2020

Mpaa committed rPWBC8b5c837e4fc2: [IMPR] fix type in docstring (authored by Mpaa).
[IMPR] fix type in docstring
Oct 17 2020, 8:44 PM
Mpaa added a comment to T265800: pywikibot sitelinks have changed?.

https://gerrit.wikimedia.org/r/c/pywikibot/core/+/442169

Oct 17 2020, 7:10 PM · Pywikibot

Oct 16 2020

Mpaa committed rPWBC554fec9e0e50: [bugfix] api.APIError() called without enough args (authored by Mpaa).
[bugfix] api.APIError() called without enough args
Oct 16 2020, 3:11 PM