Bug 1547730 - do py3 for cStringIO r=#build
☠☠ backed out by ee4b88439111 ☠ ☠
authorJustin Wood <Callek@gmail.com>
Sun, 14 Apr 2019 21:54:36 -0400
changeset 533005 fa39fb43fd1284eb017291717bb4ae85fdb4b09b
parent 533004 35e2dc6ad3474355bdeb4d1639fba65d61c24cf6
child 533006 aa2acfd554fccc899c45ab29d5fb4f7062b00167
push id11276
push userrgurzau@mozilla.com
push dateMon, 20 May 2019 13:11:24 +0000
treeherdermozilla-beta@847755a7c325 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1547730
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1547730 - do py3 for cStringIO r=#build Differential Revision: https://phabricator.services.mozilla.com/D28100
python/mozbuild/mozpack/test/test_errors.py
python/mozbuild/mozpack/test/test_mozjar.py
--- a/python/mozbuild/mozpack/test/test_errors.py
+++ b/python/mozbuild/mozpack/test/test_errors.py
@@ -6,23 +6,23 @@ from __future__ import absolute_import, 
 
 from mozpack.errors import (
     errors,
     ErrorMessage,
     AccumulatedErrors,
 )
 import unittest
 import mozunit
+import six
 import sys
-from cStringIO import StringIO
 
 
 class TestErrors(object):
     def setUp(self):
-        errors.out = StringIO()
+        errors.out = six.moves.cStringIO()
         errors.ignore_errors(False)
 
     def tearDown(self):
         errors.out = sys.stderr
 
     def get_output(self):
         return [l.strip() for l in errors.out.getvalue().splitlines()]
 
--- a/python/mozbuild/mozpack/test/test_mozjar.py
+++ b/python/mozbuild/mozpack/test/test_mozjar.py
@@ -13,17 +13,17 @@ from mozpack.mozjar import (
     JarWriter,
     Deflater,
     JarLog,
 )
 from collections import OrderedDict
 from mozpack.test.test_files import MockDest
 import unittest
 import mozunit
-from cStringIO import StringIO
+import six
 import mozpack.path as mozpath
 import os
 
 
 test_data_path = mozpath.abspath(mozpath.dirname(__file__))
 test_data_path = mozpath.join(test_data_path, 'data')
 
 
@@ -286,17 +286,17 @@ class TestPreload(unittest.TestCase):
 
         self.assertEqual(files[0].filename, 'baz/qux')
         self.assertEqual(files[1].filename, 'bar')
         self.assertEqual(files[2].filename, 'foo')
 
 
 class TestJarLog(unittest.TestCase):
     def test_jarlog(self):
-        s = StringIO('\n'.join([
+        s = six.moves.cStringIO('\n'.join([
             'bar/baz.jar first',
             'bar/baz.jar second',
             'bar/baz.jar third',
             'bar/baz.jar second',
             'bar/baz.jar second',
             'omni.ja stuff',
             'bar/baz.jar first',
             'omni.ja other/stuff',