diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-06-05 19:11:25 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-06-05 19:11:25 -0400 |
commit | c9326aa2b82258226986f6b2fe38dbe5d4e189ab (patch) | |
tree | 5442be93bddd98ec03bf8569617387356f796d12 /cherrypy/lib/encoding.py | |
parent | 1265e9de717f8bfd5266e69c32affda05ea055c8 (diff) | |
download | cherrypy-git-c9326aa2b82258226986f6b2fe38dbe5d4e189ab.tar.gz |
Remove StringIO and BytesIO from compatibility module and use io module directly.
Diffstat (limited to 'cherrypy/lib/encoding.py')
-rw-r--r-- | cherrypy/lib/encoding.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cherrypy/lib/encoding.py b/cherrypy/lib/encoding.py index de793a82..88f25634 100644 --- a/cherrypy/lib/encoding.py +++ b/cherrypy/lib/encoding.py @@ -1,10 +1,11 @@ import struct import time +import io import six import cherrypy -from cherrypy._cpcompat import basestring, BytesIO, ntob +from cherrypy._cpcompat import basestring, ntob from cherrypy.lib import file_generator from cherrypy.lib import is_closable_iterator from cherrypy.lib import set_vary_header @@ -303,7 +304,7 @@ def compress(body, compress_level): def decompress(body): import gzip - zbuf = BytesIO() + zbuf = io.BytesIO() zbuf.write(body) zbuf.seek(0) zfile = gzip.GzipFile(mode='rb', fileobj=zbuf) |