Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1307560?usp=email )
Change subject: cleanup Family: dreprecate cross_projects Family settings
......................................................................
cleanup Family: dreprecate cross_projects Family settings
Bug: T431178
Change-Id: I8a581b012f7d450e571fed80d9c53a0053ae07b4
---
M pywikibot/family.py
1 file changed, 47 insertions(+), 18 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
diff --git a/pywikibot/family.py b/pywikibot/family.py
index 4a7e791..1b97223 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -137,16 +137,6 @@
"""A dict of tuples for different sites with names of archive templates
that indicate an edit of non-archive bots should be avoided."""
- #: A set of projects that share cross-project sessions.
- cross_projects: set[str] = set()
-
- #: A list with the name for cross-project cookies, default for
- #: wikimedia centralAuth extensions.
- cross_projects_cookies = ['centralauth_Session',
- 'centralauth_Token',
- 'centralauth_User']
- cross_projects_cookie_username = 'centralauth_User'
-
#: A list with the name in the cross-language flag permissions.
cross_allowed: list[str] = []
@@ -330,6 +320,38 @@
"""
return []
+ @classproperty
+ @deprecated(since='11.5.0')
+ def cross_projects(cls) -> set[str]:
+ """A set of projects that share cross-project sessions.
+
+ .. version-deprecated:: 11.5
+ This attribute was never used.
+ """
+ return set()
+
+ @classproperty
+ @deprecated(since='11.5.0')
+ def cross_projects_cookies(cls) -> list[str]:
+ """A list with the name for cross-project cookies.
+
+ Default for wikimedia centralAuth extensions.
+
+ .. version-deprecated:: 11.5
+ This attribute was never used.
+ """
+ return ['centralauth_Session', 'centralauth_Token', 'centralauth_User']
+
+ @classproperty
+ @deprecated(since='11.5.0')
+ def cross_projects_cookie_username(cls) -> str:
+ """The cross-project cookies username.
+
+ .. version-deprecated:: 11.5
+ This attribute was never used.
+ """
+ return 'centralauth_User'
+
@staticmethod
def load(fam: str | None = None):
"""Import the named family.
@@ -912,14 +934,6 @@
+ wikimedia_org_other_families
)
- # CentralAuth cross available projects.
- cross_projects = set(
- multi_language_content_families
- + wikimedia_org_content_families
- + wikimedia_org_meta_families
- + other_content_families
- )
-
# Known Wikimedia site codes
known_codes = [
'aa', 'ab', 'ace', 'ady', 'af', 'ak', 'als', 'alt', 'am', 'ami', 'an',
@@ -1003,6 +1017,21 @@
shared_urlshortner_wiki = ('meta', 'meta')
@classproperty
+ @deprecated(since='11.5.0')
+ def cross_projects(cls) -> set[str]:
+ """A set of projects that share cross-project sessions.
+
+ .. version-deprecated:: 11.5
+ This attribute was never used.
+ """
+ return set(
+ cls.multi_language_content_families
+ + cls.wikimedia_org_content_families
+ + cls.wikimedia_org_meta_families
+ + cls.other_content_families
+ )
+
+ @classproperty
def domain(cls):
"""Domain property."""
if cls.name in (cls.multi_language_content_families
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1307560?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I8a581b012f7d450e571fed80d9c53a0053ae07b4
Gerrit-Change-Number: 1307560
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]