jenkins-bot has submitted this change and it was merged.
Change subject: Remove site NotImplementedYet methods ......................................................................
Remove site NotImplementedYet methods
These methods are largely copied from compat and rely on attributes and data files which do not exist.
They have been unneeded for years and have only seen maintenance edits to 'fix' the structure of the code as other methods change, pepifying, etc.
If the algorithms are needed again, they can be found in compat.
Change-Id: Iad18a29b9b02bdb4164b3d810fe3dd482280765b --- M pywikibot/site.py 1 file changed, 0 insertions(+), 45 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index fb51fdf..93c9eba 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -4123,48 +4123,3 @@
def newimages(self, *args, **kwargs): raise NotImplementedError - - -# ### METHODS NOT IMPLEMENTED YET #### -class NotImplementedYet: - - # TODO: is this needed any more? can it be obtained from the http module? - def cookies(self, sysop=False): - """Return a string containing the user's current cookies.""" - self._loadCookies(sysop=sysop) - index = self._userIndex(sysop) - return self._cookies[index] - - def _loadCookies(self, sysop=False): - """Retrieve session cookies for login""" - index = self._userIndex(sysop) - if self._cookies[index] is not None: - return - try: - if sysop: - try: - username = config.sysopnames[self.family.name][self.code] - except KeyError: - raise NoUsername("""\ -You tried to perform an action that requires admin privileges, but you haven't -entered your sysop name in your user-config.py. Please add -sysopnames['%s']['%s']='name' to your user-config.py""" - % (self.family.name, self.code)) - else: - username = pywikibot.config2.usernames[self.family.name - ][self.code] - except KeyError: - self._cookies[index] = None - self._isLoggedIn[index] = False - else: - tmp = '%s-%s-%s-login.data' % (self.family.name, self.code, - username) - fn = config.datafilepath('login-data', tmp) - if not os.path.exists(fn): - self._cookies[index] = None - self._isLoggedIn[index] = False - else: - f = open(fn) - self._cookies[index] = '; '.join([x.strip() - for x in f.readlines()]) - f.close()
pywikibot-commits@lists.wikimedia.org