This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author benjamin.peterson
Recipients benjamin.peterson, bethard
Date 2008-03-18.21:35:51
SpamBayes Score 0.0
Marked as misclassified No
Message-id <1205876152.35.0.262285693253.issue2402@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2009-11-16 15:05:13georg.brandlsetspambayes_score: 0.660874 -> 0.0
2008-03-18 21:35:52benjamin.petersonsetspambayes_score: 0.660874 -> 0.660874
recipients: + benjamin.peterson, bethard
2008-03-18 21:35:52benjamin.petersonsetspambayes_score: 0.660874 -> 0.660874
messageid: <1205876152.35.0.262285693253.issue2402@psf.upfronthosting.co.za>
2008-03-18 21:35:51benjamin.petersonlinkissue2402 messages
2008-03-18 21:35:51benjamin.petersoncreate