In some circumstances pywikibot.replaceExcept() may hang or have an infinite loop. Neigher keyboard interrupt nor any other event works anymore an the workstation must be restarted. Maybe this is caused by a malformed undetected regex. On the otherhand any interrupt should be possible to kill the task.
I found this on compat, maybe it is also the same problem in core.