Mpaa merged this change.

View Change

Approvals: jenkins-bot: Verified Dvorapa: Looks good to me, but someone else must approve Mpaa: Looks good to me, approved
[cleanup] Remove unsupported removeImage and placeImage Page methods

removeImage and placeImage Page methods where never part of the
rewrite/core release. A deprecation warning is shown if the one
tries to use it but the method does just nothing.

Remove this part of code after this long time (since 27.02.08),
because it seems better to raise an attribute error instead of
having a wrong behaviour for old scripts.

Bug: T106121
Change-Id: Ieb1d6a0cad06732699fff0aac01e91c358538540
---
M pywikibot/page.py
1 file changed, 0 insertions(+), 8 deletions(-)

diff --git a/pywikibot/page.py b/pywikibot/page.py
index df0de1d..b6dffa4 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2250,14 +2250,6 @@
restrictions = self.protection()
return {k: list(restrictions[k]) for k in restrictions}

- def __getattr__(self, name):
- """Generic disabled method warnings."""
- if name in ('removeImage', 'replaceImage'):
- issue_deprecation_warning(name, None, 2, since='20080227')
- return lambda x: None
- raise AttributeError("'{0}' object has no attribute '{1}'"
- .format(self.__class__.__name__, name))
-

class Page(BasePage):


To view, visit change 449025. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb1d6a0cad06732699fff0aac01e91c358538540
Gerrit-Change-Number: 449025
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki@gmail.com>
Gerrit-Reviewer: Multichill <maarten@mdammers.nl>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444@gmail.com>
Gerrit-Reviewer: jenkins-bot (75)