jenkins-bot submitted this change.

View Change

Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
[cleanup] remove deprecated namespace shortcuts

Change-Id: I19382a04fefe9592271a711175666576c3d68d03
---
M pywikibot/site/_basesite.py
M tests/site_tests.py
2 files changed, 0 insertions(+), 38 deletions(-)

diff --git a/pywikibot/site/_basesite.py b/pywikibot/site/_basesite.py
index 3a3a605..0b74060 100644
--- a/pywikibot/site/_basesite.py
+++ b/pywikibot/site/_basesite.py
@@ -22,7 +22,6 @@
from pywikibot.tools import (
ComparableMixin,
SelfCallString,
- deprecated,
first_upper,
normalize_username,
)
@@ -402,33 +401,6 @@
name2 = first_upper(name2)
return name1 == name2

- # namespace shortcuts for backwards-compatibility
-
- @deprecated('namespaces.SPECIAL.custom_name', since='20160407')
- def special_namespace(self):
- """Return local name for the Special: namespace."""
- return self.namespace(-1)
-
- @deprecated('namespaces.FILE.custom_name', since='20160407')
- def image_namespace(self):
- """Return local name for the File namespace."""
- return self.namespace(6)
-
- @deprecated('namespaces.MEDIAWIKI.custom_name', since='20160407')
- def mediawiki_namespace(self):
- """Return local name for the MediaWiki namespace."""
- return self.namespace(8)
-
- @deprecated('namespaces.TEMPLATE.custom_name', since='20160407')
- def template_namespace(self):
- """Return local name for the Template namespace."""
- return self.namespace(10)
-
- @deprecated('namespaces.CATEGORY.custom_name', since='20160407')
- def category_namespace(self):
- """Return local name for the Category namespace."""
- return self.namespace(14)
-
# site-specific formatting preferences

def category_on_one_line(self):
diff --git a/tests/site_tests.py b/tests/site_tests.py
index ef485a5..73eac0b 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -60,16 +60,6 @@
self.assertFalse(page.isRedirectPage())
self.assertOneDeprecation()

- def test_namespace_shortcuts(self):
- """Test namespace shortcuts."""
- self.assertEqual(self.site.image_namespace(), self.site.namespace(6))
- self.assertEqual(self.site.mediawiki_namespace(),
- self.site.namespace(8))
- self.assertEqual(self.site.template_namespace(),
- self.site.namespace(10))
- self.assertEqual(self.site.category_namespace(),
- self.site.namespace(14))
-

class TestSiteDryDeprecatedFunctions(DefaultDrySiteTestCase,
DeprecationTestCase):

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I19382a04fefe9592271a711175666576c3d68d03
Gerrit-Change-Number: 735953
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged