Family.cross_projects is implemented in compat, but not in implemented in core.
It indicates when to use the central auth tokens during login on a new site.
Family.cross_projects is implemented in compat, but not in implemented in core.
It indicates when to use the central auth tokens during login on a new site.
| Subject | Author | Repo | Branch | Lines +/- | |
|---|---|---|---|---|---|
| Update WikimediaFamily cross_projects | John Vandenberg | pywikibot/core | master | +49 -16 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T89451 Reducing complexity of the Family class | |||
| Declined | None | T103254 Investigate/Implement Family.cross_projects |
See https://www.mediawiki.org/wiki/API:Login#Handle_cookies
There is also SULv2 documented at https://www.mediawiki.org/wiki/Extension:CentralAuth#.22SUL2.22_behavior , but I dont think that is relevant for the API.
Fwiw, the Family variables cross_projects_cookies and cross_projects_cookie_username are not needed as-is, since CentralAuth has a paramter $wgCentralAuthCookiePrefix for the prefix and the suffix are all hardcoded.
So, only one variable, the prefix, needs to be defined per family. However we could use these existing variables to deduce the prefix, and deprecate the existing variables.
Two potential ways to dynamically get the list of all wikis in the SUL family, rendering cross_projects unnecessary):
https://www.mediawiki.org/w/api.php?action=sitematrix&smlangprop=code|site&smsiteprop=url
Change 219613 had a related patch set uploaded (by John Vandenberg):
Update WikimediaFamily cross_projects
I think cross_projects implementation can be removed completely:
de = pywikibot.Site('de')
de
APISite('de', 'wikipedia')
en = pywikibot.Site('en')
en
APISite('en', 'wikipedia')
de.logged_in()
False
en.logged_in()
False
de.login()
Password for user <redacted> on wikipedia:de (no characters will be shown): Warning: Password input may be echoed.
<redacted
WARNING: C:\Python\Python313\Lib\getpass.py:99: GetPassWarning: Can not control echo on the terminal.
return fallback_getpass(prompt, stream)
Du musst deinen Anmeldeversuch verifizieren. Ein Verifizierungscode wurde an
deine E-Mail-Adresse (***@***.***) versandt. Bitte gib hier diesen Code ein.
Verifizierungscode: Warning: Password input may be echoed.
<redacted>
de.logged_in()
True
en.logged_in()
False
en.login()
en.logged_in()
True