jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/669009 )
Change subject: [cleanup] remove deprecated Site.language() method in favour of lang property ......................................................................
[cleanup] remove deprecated Site.language() method in favour of lang property
Change-Id: Iee5ee681960957450ac005124011a1982132e417 --- M pywikibot/site/_apisite.py M tests/site_tests.py 2 files changed, 0 insertions(+), 10 deletions(-)
Approvals: Matěj Suchánek: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py index d81d35f..72e4325 100644 --- a/pywikibot/site/_apisite.py +++ b/pywikibot/site/_apisite.py @@ -956,11 +956,6 @@ """Return this site's internal id.""" return self.siteinfo['wikiid']
- @deprecated('APISite.lang', since='20150629', future_warning=True) - def language(self): # pragma: no cover - """Return the code for the language of this Site.""" - return self.lang - @property def lang(self): """Return the code for the language of this Site.""" diff --git a/tests/site_tests.py b/tests/site_tests.py index 6535c63..3a5337d 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -65,11 +65,6 @@ self.assertOneDeprecationParts('Calling siteinfo', 'itself as a dictionary')
- def test_language_method(self): - """Test if the language method returns the same as lang property.""" - self.assertEqual(self.site.language(), self.site.lang) - self.assertOneDeprecation() - def test_allpages_filterredir_True(self): """Test that filterredir set to 'only' is deprecated to True.""" for page in self.site.allpages(filterredir='only', total=1):