jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/966120 )

Change subject: [cleanup] drop unused use_hard_category_redirects
......................................................................

[cleanup] drop unused use_hard_category_redirects

- depreate BaseSite.use_hard_category_redirects
- remove Family.use_hard_category_redirects

Bug: T348953
Change-Id: Ifcbc0d8086c50d5c887f273f65f817af052a8621
---
M pywikibot/family.py
M pywikibot/site/_basesite.py
2 files changed, 27 insertions(+), 6 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/pywikibot/family.py b/pywikibot/family.py
index 52c6d3a..93cd1df 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -118,9 +118,6 @@
         '_default': []
     }

-    # A list of languages that use hard (not soft) category redirects
-    use_hard_category_redirects = []
-
     # A list of disambiguation template names in different languages
     disambiguationTemplates: Dict[str, Sequence[str]] = {
         '_default': []
diff --git a/pywikibot/site/_basesite.py b/pywikibot/site/_basesite.py
index ea47b94..8175ebe 100644
--- a/pywikibot/site/_basesite.py
+++ b/pywikibot/site/_basesite.py
@@ -25,6 +25,7 @@
     ComparableMixin,
     SelfCallString,
     cached,
+    deprecated,
     first_upper,
     normalize_username,
 )
@@ -90,14 +91,24 @@

         self._username = normalize_username(user)

-        self.use_hard_category_redirects = (
-            self.code in self.family.use_hard_category_redirects)
-
         # following are for use with lock_page and unlock_page methods
         self._pagemutex = threading.Condition()
         self._locked_pages = set()

     @property
+    @deprecated(since='8.5.0')
+    def use_hard_category_redirects(self):
+        """Hard redirects are used for this site.
+
+        Originally create as property for future use for a proposal to
+        replace category redirect templates with hard redirects. This
+        was never implemented and is not used inside the framework.
+
+        .. deprecated:: 8.5
+        """
+        return False
+
+    @property
     @cached
     def throttle(self):
         """Return this Site's throttle. Initialize a new one if needed."""

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/966120
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ifcbc0d8086c50d5c887f273f65f817af052a8621
Gerrit-Change-Number: 966120
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to