Page MenuHomePhabricator

API to use Warning system
Open, HighPublic


Currently the API module uses a custom warning system, and some parts of the codebase dont correctly handle multiple warnings:

The API should be migrated to using the Python core warning system

Version: core-(2.0)
Severity: normal
See Also:
T72970: use DeprecationWarning system



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:50 AM
bzimport set Reference to bz71738.
bzimport added a subscriber: Unknown Object (????).
jayvdb created this task.Oct 7 2014, 7:25 AM
XZise added a subscriber: XZise.Feb 5 2015, 5:07 PM

This seems similar to T72970 which has been resolved with I95000736f3fc9ccb80fe32106fb6516abc62cdd6. But the rest of the API (all calls to pywikibot(.bot).warning) are still not going via warnings.warn.

Hmm. Changeset is about this. The outstanding problem is how to integrate the upload script warning management (905b276c7e0ec284872ab66c06b2fabdad397795)

AbdealiJK added a subscriber: AbdealiJK.EditedMar 14 2016, 1:22 PM

Why are we replacing only warn() when we could also replace the log(), critical(), error() functions using the inbuilt logging module ?

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 14 2016, 1:22 PM
Xqt triaged this task as High priority.May 28 2017, 11:56 AM