_warnings was importing itself to get an attribute. That's bad if warnings gets
called in a thread that was spawned by an import itself.

Last part to close #1665206.
3 files changed