valhallasw created this task.
valhallasw added a subscriber: valhallasw.
valhallasw added a project: pywikibot-core.
TASK DESCRIPTION
There is no reason to use threads; we can also query generators in a round-robin fashion.
TASK DETAIL
https://phabricator.wikimedia.org/T85623
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: valhallasw
Cc: Aklapper, valhallasw, jayvdb, pywikipedia-bugs
XZise added a comment.
Well AFAIK is the code always the code of the chosen site. Bit APISite has also a value `lang` which mustn't return the same value as `APISite.code`.
TASK DETAIL
https://phabricator.wikimedia.org/T85645
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: XZise
Cc: pywikipedia-bugs, Aklapper, Unicornisaurous, jayvdb, XZise, Ricordisamoa
jayvdb added a comment.
ok; interesting, and thanks for trying. So, for the moment, for your task skip the new date tests if the test site is Wikidata (it is a very special case, for other reasons).
TASK DETAIL
https://phabricator.wikimedia.org/T85645
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, Aklapper, Unicornisaurous, jayvdb, XZise
Unicornisaurous added a comment.
Hmm,
I commented out one of the self.langs lines in the wikidata family file and my user-config.py has
family = 'wikidata'
mylang = 'en'
...but now I'm back to the original error (same stacktrace)
KeyError: 'wikidata'
TASK DETAIL
https://phabricator.wikimedia.org/T85645
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: Unicornisaurous
Cc: pywikipedia-bugs, Aklapper, Unicornisaurous, jayvdb, XZise
jayvdb added a comment.
Grr. Sorry you're right.
So, to test, remove either the 'test' or 'wikidata' entry in self.langs of the official pywikibot/families/wikidata_family.py , so only the one you are testing is in the dict
i.e. to test the production wikidata, use:
self.langs = {
'wikidata': 'www.wikidata.org',
# 'test': 'test.wikidata.org',
}
Then you can use family = 'wikidata' ; mylang = 'en'
Or to run test on the test wikidata site, use:
self.langs = {
# 'wikidata': 'www.wikidata.org',
'test': 'test.wikidata.org',
}
And then you can use family = 'wikidata' ; mylang = 'en'
As there are lots of unit tests that depend on both test and production wikidata, to test your new date pagegen tests without lots of errors from other tests, use the following syntax to invoke only your test methods:
$ python -m unittest tests.pagegeerators_tests.YourTestClass.test_your_test_method
(see tests/README.rst for more info)
TASK DETAIL
https://phabricator.wikimedia.org/T85645
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, Aklapper, Unicornisaurous, jayvdb, XZise