Currently the `add_warning()` is located in trac.web.api due to troublesome imports from `trac.versioncontrol.api` and trac.mimeview.api`. Resolve and move to trac.web.chrome?
The old `req.warnings()` is not yet removed. Changes so far should therefore not break any behavior for existing plugins.