Mpaa has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/449025 )
Change subject: [cleanup] Remove unsupported removeImage and placeImage Page methods ......................................................................
[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(-)
Approvals: jenkins-bot: Verified Dvorapa: Looks good to me, but someone else must approve Mpaa: Looks good to me, approved
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):
pywikibot-commits@lists.wikimedia.org