1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

Replaced cStringIO.StringIO by io.BytesIO.

Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
This commit is contained in:
Claude Paroz
2012-05-05 19:47:03 +02:00
parent 1583d40224
commit d7dfab59ea
26 changed files with 94 additions and 167 deletions

View File

@@ -1,9 +1,6 @@
import sys
from io import BytesIO
from threading import Lock
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django import http
from django.core import signals
@@ -116,7 +113,7 @@ class LimitedStream(object):
if not chunk:
break
self.buffer += chunk
sio = StringIO(self.buffer)
sio = BytesIO(self.buffer)
if size:
line = sio.readline(size)
else: