valhallasw added a comment.
I've thought a bit about what a sensible user interface would look like.
First an assumption: I think our code internally never uses the 'en:wikipedia' -> set family to 'commons' -> 'en:commons' -> 'commons:commons' magic. After all, otherwise wikidata wouldn't work at all. If this is **not** the case, I think we should **make** this the dase.
Then the only interface we have is the command line, where one can pass
1. -family:XX -lang:YY, or
2. -lang:YY, (implicit family), or
3. -family:XX (implicit lang)
My suggested behavior would be:
1. Always explicitly defines YY:XX. If that doesn't exist, we should raise an exception. So:
- -family:wikidata -lang:wikidata gives wikidata:wikidata, but
- -family:wikidata -lang:en raises an exception
2. is (1) where the family is specified in the user-config.py 3. a) if the family file does not specify a default: use the mylang specified in the user-config file, i.e.
- mylang=en, -family:wiktionary --> en.wiktionary
- mylang=ru, -family:myrandomwiki (where myrandomwiki does not specify a default, and does not have a ru site) --> error b) if the family file specifies a default, always use that default, so
- mylang=test, -family:wikidata ->wikidata:wikidata [we can still reach test.wikidata with -family:wikidata -lang:wikidata]
for specifying what the default is, I think m4tx's implementation makes sense.
TASK DETAIL
https://phabricator.wikimedia.org/T71255
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: m4tx, valhallasw
Cc: pywikipedia-bugs, Ladsgroup, jayvdb, Mpaa, Ricordisamoa, XZise, Xqt, valhallasw
Ricordisamoa reassigned this task from Ladsgroup to m4tx.
Ricordisamoa added a comment.
Assigning to the patch uploader.
TASK DETAIL
https://phabricator.wikimedia.org/T71255
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: m4tx, Ricordisamoa
Cc: pywikipedia-bugs, Ladsgroup, jayvdb, Mpaa, Ricordisamoa, XZise, Xqt, valhallasw
Gallaecio created this task.
Gallaecio added a subscriber: Gallaecio.
Gallaecio added a project: pywikibot-core.
Gallaecio changed Security from none to none.
TASK DESCRIPTION
I have several calls to register_family_file() on my user-config.py file.
When I use replace.py, having a print statement on the register_family_file() implementation, I can see that the calls are made, and that the family_files keys increase, however by the time execution reaches family.py:Family.load(), config.family_files does not contain but the default families.
TASK DETAIL
https://phabricator.wikimedia.org/T78777
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Gallaecio
Cc: Aklapper, Gallaecio, jayvdb, pywikipedia-bugs
jayvdb added a subscriber: jayvdb.
jayvdb added a project: easy.
jayvdb added a comment.
With the new connect(read_default_file=config.db_connect_file,...) , I suspect the ( https://phabricator.wikimedia.org/tag/easy/ ) fix for this bug is to now add a default in config2.py : db_connect_file = os.path.expanduser('~.my.cnf')
TASK DETAIL
https://phabricator.wikimedia.org/T75147
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: pywikipedia-bugs, gpaumier, valhallasw, eranroz, jayvdb
eranroz closed this task as "Resolved".
eranroz claimed this task.
eranroz removed a subscriber: Unknown Object (????).
eranroz set Security to none.
TASK DETAIL
https://phabricator.wikimedia.org/T75151
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: eranroz
Cc: pywikipedia-bugs, gpaumier, jayvdb, valhallasw, eranroz