diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-08-16 21:56:03 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-08-16 21:56:03 +0000 |
commit | 0a4128eae2dd808750b7196151ab3d7a99585353 (patch) | |
tree | 0ebd9b8987e3795ed71fdb36f2a2d39095e19c11 /Lib/httplib.py | |
parent | abe423ed2cbf0ee118f6d060890258c2898fea1d (diff) | |
download | cpython-git-0a4128eae2dd808750b7196151ab3d7a99585353.tar.gz |
Silence the DeprecationWarning raised in httplib when mimetools is imported.
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 81020b7810..62cd0c7497 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -66,10 +66,14 @@ Req-started-unread-response _CS_REQ_STARTED <response_class> Req-sent-unread-response _CS_REQ_SENT <response_class> """ -import mimetools import socket from urlparse import urlsplit import warnings +from test.test_support import catch_warning +with catch_warning(record=False): + warnings.filterwarnings("ignore", ".*mimetools has been removed", + DeprecationWarning) + import mimetools try: from cStringIO import StringIO |