-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sep 9, 2008, at 6:31 AM, Nick Coghlan wrote:
It's also a bug that was introduced by the late API changes made to
WarningsRecorder in r66135 (when WarningsRecorder was moved from
test.test_support to warnings to make it officially supported for use
outside the Python test suite, the API was also changed).
Instead of changing the API *again* could we please get the API
reverted
back to the way it was for the two months prior to r66135 and only
change the location from test_support to warnings? (obviously, the use
of @contextmanager should still be removed since we don't particularly
want warnings to depend on contextlib).
As I commented in the bug, if this function is added to warnings I
think it will be increasingly used as a way for code to suppress
warnings. If that's the behavior we want to allow, then I think
making every warning but the last inaccessible is a bug.
If that's not a behavior we want to encourage then naming this
function 'catch_warnings' and putting it in the warnings module sends
the wrong message. Better to stick it in unittest if test_support is
unacceptable. Or at least name it something that doesn't scream "use
me in a way I don't intend!".
- -Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
iQCVAwUBSMZrfHEjvBPtnXfVAQI6DgP8DyNKZyR846u1Qpgbr4X3wOM1J6EcqSlW
74WGUoU80MDWH5wvagAl7Er90oEh0QhX4ogX8UgF8iLSOC7jwa4CgpZsd9a5V8WB
8M0ia/G457vjGYg8XsaD5Dqvuv6NgMcW/2KJCJK3cuzEafan5C+I6n6lKQMAGOu0
j/9/PtIOKmI=
=btg/
-----END PGP SIGNATURE-----
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com