Skip to content

Commit

Permalink
Merge "[cleanup] drop unused use_hard_category_redirects"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Oct 23, 2023
2 parents 9723f8f + 10293b2 commit 2da34d5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
3 changes: 0 additions & 3 deletions pywikibot/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ def instance(cls):
'_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': []
Expand Down
17 changes: 14 additions & 3 deletions pywikibot/site/_basesite.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
ComparableMixin,
SelfCallString,
cached,
deprecated,
first_upper,
normalize_username,
)
Expand Down Expand Up @@ -90,13 +91,23 @@ def __init__(self, code: str, fam=None, user=None) -> None:

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[str] = 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):
Expand Down

0 comments on commit 2da34d5

Please sign in to comment.