]> granicus.if.org Git - python/commit
_warnings exposed two variables with the name 'default_action' and
authorBrett Cannon <bcannon@gmail.com>
Sat, 4 Sep 2010 18:24:04 +0000 (18:24 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sat, 4 Sep 2010 18:24:04 +0000 (18:24 +0000)
commitef0e6c3b0485e83444b15c07f9cb1d905203791a
tree60c853299db07d4639f9c379ef5849b28be3d2d9
parentd6399d2d19ef665a2893089be12e2214f73b643b
_warnings exposed two variables with the name 'default_action' and
'once_registry'. This is bad as the warnings module had variables named
'defaultaction' and 'onceregistry' which are what people should be looking at
(technically those variables shouldn't be mucked with as they are undocumented,
but we all know better than to believe that isn't happening). So the variables
from _warnings have been renamed to come off as private and to avoid confusion
over what variable should be used.

Closes issue #9766. Thanks to Antoine Pitrou for the discovery.
Lib/warnings.py
Misc/NEWS
Python/_warnings.c