mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Patch for issue 2848, mostly by Humberto Diogenes, with a couple of
small fixes by Barry. This removes mimetools from the stdlib.
This commit is contained in:
parent
75f25f2c9a
commit
820c120059
23 changed files with 146 additions and 202 deletions
|
@ -193,9 +193,8 @@ class FakeResponse:
|
|||
"""
|
||||
headers: list of RFC822-style 'Key: value' strings
|
||||
"""
|
||||
import mimetools, io
|
||||
f = io.StringIO("\n".join(headers))
|
||||
self._headers = mimetools.Message(f)
|
||||
import email
|
||||
self._headers = email.message_from_string("\n".join(headers))
|
||||
self._url = url
|
||||
def info(self): return self._headers
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue