[New-bugs-announce] [issue14784] Re-importing _warnings changes warnings.filters

Brett Cannon report at bugs.python.org
Fri May 11 21:40:16 CEST 2012

New submission from Brett Cannon <brett at python.org>:

If you run test.test_warnings it reports that warnings.filters changed. If you comment out the import of c_warnings in that module, the warning goes away (this happens with running on tests).

It looks like _PyWarnings_Init() itself doesn't trigger a reprocessing of the sys.warnoptions as an import of warnings.py does, and thus the change in warnings.filter.

components: Library (Lib)
messages: 160446
nosy: brett.cannon
priority: low
severity: normal
stage: test needed
status: open
title: Re-importing _warnings changes warnings.filters
type: behavior
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list