jenkins-bot merged this change.

View Change

Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified
[cleanup] Announce Site.has_api method to be removed

Pywikibot core only supports MediaWiki which has API.
Therefore the compat method has_api can be removed after 5 years.

Change-Id: I847894bda56536b70b8609b8d487aee2f4c55b55
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pywikibot/site.py b/pywikibot/site.py
index a3e72bb..a2bde12 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -783,7 +783,7 @@
self._pagemutex = threading.Condition()
self._locked_pages = set()

- @deprecated(since='20141225')
+ @deprecated(since='20141225', future_warning=True)
def has_api(self):
"""Return whether this site has an API."""
return False
@@ -1883,7 +1883,7 @@
return pywikibot.Site(url=site['url'] + '/w/index.php')
raise ValueError('Cannot parse a site out of %s.' % dbname)

- @deprecated(since='20141225')
+ @deprecated(since='20141225', future_warning=True)
def has_api(self):
"""Return whether this site has an API."""
return True

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I847894bda56536b70b8609b8d487aee2f4c55b55
Gerrit-Change-Number: 564433
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Mpaa <mpaa.wiki@gmail.com>
Gerrit-Reviewer: jenkins-bot (75)