Silence the DeprecationWarning raised in httplib when mimetools is imported.

This commit is contained in:
Brett Cannon 2008-08-16 21:56:03 +00:00
parent abe423ed2c
commit 0a4128eae2
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -49,7 +49,7 @@ Library
-------
- Silence the DeprecationWarning raised when importing mimetools in
BaseHTTPServer.
BaseHTTPServer, httplib.
- Issue #2776: fixed small issue when handling an URL with double slash
after a 302 response in the case of not going through a proxy.