Xqt created this task.
Xqt added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  With rPWBCb167da7 
<https://phabricator.wikimedia.org/rPWBCb167da7a50eed260198bf0886ce240fc75893729>
 a dependency of "report_success" and "ignore_warnings" parameters was 
introduced which is really unclear:
  
    @type ignore_warnings: bool or callable or iterable of str
    @type report_success: Optional[bool]
    ...
    if report_success is None:
        report_success = isinstance(ignore_warnings, bool)
    if report_success is True:
        if not isinstance(ignore_warnings, bool):
            raise ValueError('report_success may only be set to True when '
                             'ignore_warnings is a boolean')
        issue_deprecation_warning('"ignore_warnings" as a boolean and '
                                  '"report_success" is True or None',
                                  '"report_success=False" or define '
                                  '"ignore_warnings" as callable/iterable',
                                  3, warning_class=FutureWarning,
                                  since='20150823')
  
  if `report_success` is True it raises a ValueError if `ignore_warnings` is 
not a boolean but the same case if `ignore_warnings` is a boolean a 
DeprecationWarning/FutureWarning is printed that `ignore_warnings` must be a 
callable or iterable in that case. Strange

TASK DETAIL
  https://phabricator.wikimedia.org/T271899

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, 
Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to