Page MenuHomePhabricator does not show when a page is saved
Closed, ResolvedPublic


When saving a page with template the saving comment is missing:

C:\pwb\GIT\core> template Persondata -remove -page:"%D8%A2%D8%AF%D8%A7%D9%85_%D9%87%D8%A7%D9%85%D9%84" -lang:ar
WARNING: was not set before being retrieved.
WARNING: Using the default site: wikipedia:ar
Retrieving 1 pages from wikipedia:ar.
WARNING: was not set before being retrieved.
WARNING: Using the default site: wikipedia:ar

>>> آدام هامل <<<
@@ -17,5 +17 @@
- {{Persondata
- |NAME=آدام هامل
- |SHORT DESCRIPTION=لاعب كرة قدم إنجليزي
- |DATE OF BIRTH={{تاريخ الميلاد|1988|1|25|df=y}}

Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in [b]rowser, [a
]ll, [q]uit): y
Sleeping for 4.9 seconds, 2016-04-08 09:26:40

I expect sth like
Page [[آدام هامل]] saved.
at the end.

Also site setting should be improved to avoid this warnings.

Event Timeline

Xqt triaged this task as Medium priority.Apr 8 2016, 9:05 AM

A changed behaviour was introduced by I suppose to let quiet=False by default.

I think the problem appears when throttling is > 0.
The queue in is empty and the exits before the save() callback (which would fill the queue of the pending pages) is triggered.
And when answer is yes, as async=True.

Also, the behavior of stopme was changed:, it does not clear async_manager by default.

Change 282433 had a related patch set uploaded (by Mpaa):
Allow stopme() to clear async_manager

If the behaviour of stopme was changed, is it a regression, or was it an intentional breaking change?

If intentional, we need to justify the breaking change. Did the changed behaviour make it more similar to compat?
If the breaking change is appropriate, we need to Pywikibot-Announce an explanation to our userbase that they need to update their code if they used the async thread ??

The intention of stopme() is to drop the bot PID out of the throttle list. Unfortunately it didn't work when the script is not terminated after that. Therefore the _flush was introduced to flush async_manager at exit time only. The implementation in looks like a dirty hack. I guess we can

  • keep printing inside save(). I do not understand why this should not be there.
  • put the print functionality into the callback method
  • add a print function to the queue and fix the calculation of the remaining pages and putting time.

Change 282433 abandoned by Mpaa:
ReplaceBot: use pywikibot._flush() to clear async_manager

Xqt will take care of it without too many hacks ...

Change 282818 had a related patch set uploaded (by Xqt):
[bugfix] Port cache_output from compat

Dvorapa subscribed.

Does not seems to be a dupe

Change 282818 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Port cache_output from compat