jenkins-bot merged this change.
Add timestamp to deprecated methods
Remove trailing '.' due to missing since parameter when creating message
Change-Id: Ibfbe25abf3a9e0297b14b532addc0b110553d59a
---
M pywikibot/bot.py
M pywikibot/exceptions.py
M pywikibot/site.py
M tests/aspects.py
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 7bbdc81..27efb43 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -1480,7 +1480,8 @@
initialized_page = self.init_page(item)
except SkipPageError as e:
issue_deprecation_warning('Use of SkipPageError',
- 'BaseBot.skip_page() method', 2)
+ 'BaseBot.skip_page() method', 2,
+ since='20180522')
pywikibot.warning('Skipped "{0}" due to: {1}'.format(
item, e.reason))
if PY2:
diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index af759ba..b69a057 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -586,7 +586,7 @@
pass
-@__deprecated
+@__deprecated(since='20141214')
class DeprecatedPageNotFoundError(Error):
"""Page not found (deprecated)."""
@@ -594,7 +594,7 @@
pass
-@__deprecated
+@__deprecated(since='20141218')
class _EmailUserError(UserRightsError, NotEmailableError):
"""Email related error."""
diff --git a/pywikibot/site.py b/pywikibot/site.py
index a37dadb..d074b6c 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3146,7 +3146,7 @@
)
self._update_page(page, query)
- @deprecated('page.exists()')
+ @deprecated('page.exists()', since='20180218')
def page_exists(self, page):
"""Return True if and only if page is an existing page on site."""
return page.pageid > 0
diff --git a/tests/aspects.py b/tests/aspects.py
index 6695894..09e817e 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -1586,8 +1586,7 @@
else:
msg = '{0} is deprecated'.format(deprecated)
if instead:
- msg += '; use {0} instead'.format(instead)
- msg += '.'
+ msg += '; use {0} instead.'.format(instead)
return msg
def assertDeprecationParts(self, deprecated=None, instead=None):
To view, visit change 510998. To unsubscribe, or for help writing mail filters, visit settings.