[pywikibot] Re: Parallel gets?

2023-03-27 Thread Roy Smith
Mostly for the sake of the archives, I ended up with this , which is pretty much straight out of the example in the python library manual: > def _is_approved(nom): > return

[pywikibot] Re: Parallel gets?

2023-03-27 Thread info
This is for the page_put_queue [1] which holds the pages which are saved asynchronously. To use it take asynchronous=True parameter for Page.save() [2] or BaseBot.userPut() [3] method. The later sets it if the parameter is not given but always parameter is set to True. There are other methods

[Pywikipedia-bugs] [Maniphest] [Updated] T233438: script_tests collector function should be validated

2023-03-27 Thread Pppery
Pppery edited projects, added Patch-Needs-Improvement; removed Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T233438 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Pppery Cc: Dvorapa, Aklapper, Xqt, pywikibot-bugs-list,

[Pywikipedia-bugs] [Maniphest] [Updated] T106952: commonscat ignoreTemplates with tuples only checks first parameter

2023-03-27 Thread Pppery
Pppery edited projects, added Patch-Needs-Improvement; removed Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T106952 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Pppery Cc: Dvorapa, gerritbot, Aklapper, Steinsplitter,

[Pywikipedia-bugs] [Maniphest] [Updated] T125372: Add documentation to textlib.replace_links

2023-03-27 Thread Pppery
Pppery edited projects, added Patch-Needs-Improvement; removed Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T125372 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Pppery Cc: Dvorapa, gerritbot, Stigmj, jayvdb, Ricordisamoa, XZise,

[Pywikipedia-bugs] [Maniphest] [Updated] T212704: Convert english template titles to localised ones with cosmetic_changes.py

2023-03-27 Thread Pppery
Pppery edited projects, added Patch-Needs-Improvement; removed Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T212704 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Pppery Cc: Framawiki, gerritbot, Dvorapa, Xqt, Aklapper,

[Pywikipedia-bugs] [Maniphest] [Updated] T57174: Category name misinterpreted if it starts with an interwiki prefix

2023-03-27 Thread Pppery
Pppery edited projects, added Patch-Needs-Improvement; removed Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T57174 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Pppery Cc: Dvorapa, Cyberpower678, gerritbot, Malafaya, Aklapper,

[Pywikipedia-bugs] [Maniphest] [Updated] T192215: Fix sort key handling in category move

2023-03-27 Thread Pppery
Pppery edited projects, added Patch-Needs-Improvement; removed Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T192215 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Pppery Cc: gerritbot, Aklapper, pywikibot-bugs-list, Dvorapa,

[pywikibot] Re: Parallel gets?

2023-03-27 Thread Roy Smith
Thanks for the replies. I've got something basically working with concurrent.futures, so I guess I'll go with that. I see there's a max_queue_size setting available in user_config.py. I assume that is related to one or another of these examples? > On Mar 27, 2023, at 5:24 PM, i...@gno.de

[pywikibot] Re: Parallel gets?

2023-03-27 Thread info
Pywikibot uses request for io methods. I had have a look at several similar libraries with asyncio support but none of them were long term supported.It is a good advice to ensure that pages are preloaded. Anyway Pywikibot does not use asyncio (yet) but it used Threads to save pages asynchronously.

[pywikibot] Re: Parallel gets?

2023-03-27 Thread John
I’ve not checked in the v3+ version but there used to be a preload page generator that batch retrieved stuff from the API. Then pass the preloaded page object on to the parallel processing part. On Mon, Mar 27, 2023 at 3:58 PM Roy Smith wrote: > I need to issue a bunch of Page.get() requests in

[pywikibot] Parallel gets?

2023-03-27 Thread Roy Smith
I need to issue a bunch of Page.get() requests in parallel. My understanding is that pywikibot uses the requests library which is incompatible with async_io, so that's out. So what do people use? Threading ? Or, I see there's an async_io

[pywikibot] Re: Huwiki has new namespaces today, Pywikibot does not handle them

2023-03-27 Thread info
Another way is to run the cache script as:pwb cache -deleteA third way is to use API_config_expiry as global option:pwb -API_config_expiry:0

[pywikibot] Re: Huwiki has new namespaces today, Pywikibot does not handle them

2023-03-27 Thread Bináris
Solved: I emptied the apicache-py3 directory, and it works. It always helps if you write about a problem publicly, the solution comes after. :-) Bináris ezt írta (időpont: 2023. márc. 27., H, 20:52): > Today in wikipedia:hu namespaces 118, 119 were set. See T33308. >

[pywikibot] Huwiki has new namespaces today, Pywikibot does not handle them

2023-03-27 Thread Bináris
Today in wikipedia:hu namespaces 118, 119 were set. See T33308. https://phabricator.wikimedia.org/T333083 Now I have problems with the new namespaces. Message: KeyError: '118 is not a known namespace. Maybe you should clear the api cache.' Source: Pywikibot\pywikibot\site\_namespace.py >>>

[Pywikibot-commits] [Gerrit] ...i18n[master]: Localisation updates from https://translatewiki.net.

2023-03-27 Thread Xqt (Code Review)
Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/903230 ) Change subject: Localisation updates from https://translatewiki.net. .. Localisation updates from https://translatewiki.net.

[Pywikibot-commits] [Gerrit] ...i18n[master]: Localisation updates from https://translatewiki.net.

2023-03-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/903280 ) Change subject: Localisation updates from https://translatewiki.net. .. Localisation updates from https://translatewiki.net.

[Pywikipedia-bugs] [Maniphest] [Commented On] T328769: Enhance Pywikibot.Page with is_person method

2023-03-27 Thread binbot
binbot added a comment. In T328769#8724653 , @matej_suchanek wrote: > This is too Wikimedia-specific (or even Wikipedia-specific). I'd prefer having this as a utility function or application logic rather than making it part of the