Add deprecation warning for `warnings`.

It's a boolean value and should be presented as a predicate.

Followup to #1445.