[Apply SF patch #504943]

This patch makes it possible to pass Warning instances as the first
argument to warnings.warn. In this case the category argument
will be ignored. The message text used will be str(warninginstance).
3 files changed