mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
Change some uses of cStringIO.StringIO to io.StringIO.
This is undoubtedly insufficient and in some cases just as broken as before.
This commit is contained in:
parent
7ac9d40201
commit
68937b4cbc
19 changed files with 26 additions and 89 deletions
|
|
@ -105,7 +105,7 @@ def encode(input, output, quotetabs, header = 0):
|
|||
def encodestring(s, quotetabs = 0, header = 0):
|
||||
if b2a_qp is not None:
|
||||
return b2a_qp(s, quotetabs = quotetabs, header = header)
|
||||
from cStringIO import StringIO
|
||||
from io import StringIO
|
||||
infp = StringIO(s)
|
||||
outfp = StringIO()
|
||||
encode(infp, outfp, quotetabs, header)
|
||||
|
|
@ -159,7 +159,7 @@ def decode(input, output, header = 0):
|
|||
def decodestring(s, header = 0):
|
||||
if a2b_qp is not None:
|
||||
return a2b_qp(s, header = header)
|
||||
from cStringIO import StringIO
|
||||
from io import StringIO
|
||||
infp = StringIO(s)
|
||||
outfp = StringIO()
|
||||
decode(infp, outfp, header = header)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue