mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +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
|
|
@ -370,10 +370,7 @@ def _datetime_type(data):
|
|||
# @param data An 8-bit string containing arbitrary data.
|
||||
|
||||
import base64
|
||||
try:
|
||||
import cStringIO as StringIO
|
||||
except ImportError:
|
||||
import StringIO
|
||||
import io
|
||||
|
||||
class Binary:
|
||||
"""Wrapper for binary data."""
|
||||
|
|
@ -404,7 +401,7 @@ class Binary:
|
|||
|
||||
def encode(self, out):
|
||||
out.write("<value><base64>\n")
|
||||
base64.encode(StringIO.StringIO(self.data), out)
|
||||
base64.encode(io.StringIO(self.data), out)
|
||||
out.write("</base64></value>\n")
|
||||
|
||||
def _binary(data):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue