https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
--- Comment #2 from Sorawee Porncharoenwase nullzero.free@gmail.com --- By the way, here is my workaround. It's ugly, though
# In APISite def performAsSysop(self, user) self.logout() self._username[False] = user self.login(False)