← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-testing-xmlrpc-bytesio into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-testing-xmlrpc-bytesio into launchpad:master.

Commit message:
Port lp.testing.xmlrpc to BytesIO

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/391332
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-testing-xmlrpc-bytesio into launchpad:master.
diff --git a/lib/lp/testing/xmlrpc.py b/lib/lp/testing/xmlrpc.py
index 066297e..5eb8ab3 100644
--- a/lib/lp/testing/xmlrpc.py
+++ b/lib/lp/testing/xmlrpc.py
@@ -7,7 +7,7 @@ __all__ = [
     'XMLRPCTestTransport',
     ]
 
-from cStringIO import StringIO
+import io
 
 from six.moves import (
     http_client,
@@ -34,7 +34,7 @@ class _FakeSocket(object):
         self._output = output
 
     def makefile(self, mode='rb', bufsize=0):
-        return StringIO(self._output)
+        return io.BytesIO(self._output)
 
 
 class TestHTTPConnection(http_client.HTTPConnection):