Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

I made a little decorator which silences py3k warnings. It could be
useful for test.test_support.

def silence_py3k(func):
    def decorator(*args, **kwargs):
        warnings.simplefilter("ignore", warnings.DeprecationWarning)
        func(*args, **kwargs)
        warnings.simplefilter("default", warnings.DeprecationWarning)
    if sys.flags_py3kwarning:
        return decorator
    else:
        return func

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2402>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to