jayvdb created this task.
jayvdb added subscribers: pywikipedia-bugs, jayvdb.
jayvdb added a project: pywikibot-core.
TASK DESCRIPTION
If "generate interwiki links" is enabled when generating for wikidata or commons, all wikipedia sites are added to self.langs
```
$ python pwb.py generate_family_file.py https://commons.wikimedia.org/wiki/Main_Page commons_generated
Generating family file from https://commons.wikimedia.org/wiki/Main_Page
==================================
api url: https://commons.wikimedia.org/w/api.php
MediaWiki version: 1.25wmf12
==================================
Determining other languages...aa ab ace af ak als am an ang ar arc arz as ast av ay az ba bar bat-smg bcl be be-tarask be-x-old bg bh bi bjn bm bn bo bpy br bs bug bxr ca cbk-zam cdo ce ceb ch cho chr chy ckb co cr crh cs csb cu cv cy da de diq dsb dv dz ee egl el eml en eo es et eu ext fa ff fi fiu-vro fj fo fr frp frr fur fy ga gag gan gd gl glk gn got gsw gu gv ha hak haw he hi hif ho hr hsb ht hu hy hz ia id ie ig ii ik ilo io is it iu ja jbo jv ka kaa kab kbd kg ki kj kk kl km kn ko koi kr krc ks ksh ku kv kw ky la lad lb lbe lez lg li lij lmo ln lo lt ltg lv lzh mai map-bms mdf mg mh mhr mi min mk ml mn mo mr mrj ms mt mus mwl my myv mzn na nah nan nap nb nds nds-nl ne new ng nl nn no nov nrm nso nv ny oc om or os pa pag pam pap pcd pdc pfl pi pih pl pms pnb pnt ps pt qu rm rmy rn ro roa-rup roa-tara ru rue rup rw sa sah sc scn sco sd se sg sgs sh si simple sk sl sm sn so sq sr srn ss st stq su sv sw szl ta te tet tg th ti tk tl tn to tpi tr ts tt tum tw ty tyv udm ug uk ur
uz ve vec vep vi vls vo vro wa war wo wuu xal xh xmf yi yo yue za zea zh zh-classical zh-cn zh-min-nan zh-tw zh-yue zu
There are 301 languages available.
Do you want to generate interwiki links? This might take a long time. ([y]es/[N]o/[e]dit)y
Loading wikis...
* aa... downloaded
* ab... downloaded
* ace... downloaded
* af... downloaded
* ak... downloaded
...
* zh... downloaded
* zh-classical... in cache
* zh-cn... in cache
* zh-min-nan... downloaded
* zh-tw... in cache
* zh-yue... in cache
* zu... downloaded
* en... in cache
Writing pywikibot/families/commons_generated_family.py...
$ head -20 pywikibot/families/commons_generated_family.py
# -*- coding: utf-8 -*-
"""
This family file was auto-generated by $Id: 2dd21e4aaf7a93cf8749be841552881a80684b52 $
Configuration parameters:
url = https://commons.wikimedia.org/wiki/Main_Page
name = commons_generated
Please do not commit this to the Git repository!
"""
from pywikibot import family
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'commons_generated'
self.langs = {
'hu': 'hu.wikipedia.org',
'vec': 'vec.wikipedia.org',
'bpy': 'bpy.wikipedia.org',
```
TASK DETAIL
https://phabricator.wikimedia.org/T85657
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: Aklapper, jayvdb, pywikipedia-bugs
jayvdb added a comment.
In https://phabricator.wikimedia.org/T72970#1000805, @XZise wrote:
> There is a WARNING level which is always shown and there are warnings which aren't shown by default.
are you referring to the tools warnings shown on travis? I believe that is a separate problem relating to how some tests are run before 'bot' initialisation. There are ui_tests for warning, but they probably dont check that warnings are not shown if the logging subsystem is set at error level.
With regards to warnings.warn we should be setting the warnings filters to honour the config settings. The warnings regarding config are subclasses of UserWarning, which are shown by default. Currently, the warnings about config problems were using 'print' and thus were previously always shown (i.e. they were not warnings) . The warnings regarding arguments will likely change a bit when we move to argparse, so we should consider that in the implementation of warnings.
TASK DETAIL
https://phabricator.wikimedia.org/T72970
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: XZise, gerritbot, Nullzero, jayvdb, pywikipedia-bugs
valhallasw created this task.
valhallasw added a subscriber: valhallasw.
valhallasw added a project: pywikibot-core.
TASK DESCRIPTION
`bot.debug` has a different interface from all other logging functions:
```
def debug(text, layer, decoder=None, newline=True, **kwargs):
```
versus
```
def error(text, decoder=None, newline=True, **kwargs):
```
We should deprecate `layer`, for `_logger`, passed as kwarg (in debug) or the other way around (for all other functions).
TASK DETAIL
https://phabricator.wikimedia.org/T85620
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