Mpaa merged this change.
[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.