In https://gerrit.wikimedia.org/r/#/c/139792
I noticed that Page.delete() and page.protect() have a lot of user interaction logic which would normally be in a script. e.g. asking a user what actions to take. Also, they set a flag in the site object. i.e. site._noDeletePrompt = True and site._noProtectPrompt = True
Is there any reason for it being in Page?