]> granicus.if.org Git - python/commit
Silence the DeprecationWarning of rfc822 triggered by its importation in
authorBrett Cannon <bcannon@gmail.com>
Thu, 14 Aug 2008 05:00:03 +0000 (05:00 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 14 Aug 2008 05:00:03 +0000 (05:00 +0000)
commitbf3157b8e03f0a661f9f90fa0ab610f03fb2ea89
tree1d06931fa5e1e0203296ce18f9478ab92e7f5f52
parenteea8eda317ded5c519e663237c9850482c2cb06e
Silence the DeprecationWarning of rfc822 triggered by its importation in
mimetools.

This has an unfortunate side-effect of potentially not letting any warning
about rfc822's deprecation be seen by user-visible code if rfc822 is not
imported before mimetools. This is because modules are cached in sys.modules
and thus do not have their deprecation triggered more than once. But this
silencing would have happened by other code that silences the use of mimetools
or rfc822 anyway in the stdlib or user code, and thus seems justified to be
done here.
Lib/mimetools.py
Misc/NEWS