mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
Silence the DeprecationWarning raised in httplib when mimetools is imported.
This commit is contained in:
parent
abe423ed2c
commit
0a4128eae2
2 changed files with 6 additions and 2 deletions
|
|
@ -66,10 +66,14 @@
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue