From f336d4b7a5c1d369ed508e513d482c885705e939 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 13 Jan 2015 14:21:29 -0500 Subject: Prepare for Python2-Python3 straddle. - Remove PY25 cruft. - Selectively apply cleanups from 'python-modernize': - New exception syntax. - Use 'six' to handle module renames. - Use 'six' to handle text / binary stuff. This PR covers most of the work from #66 which falls inside `python` (rather than the Python code generation stuff in 'src'). --- python/google/protobuf/internal/text_format_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python/google/protobuf/internal/text_format_test.py') diff --git a/python/google/protobuf/internal/text_format_test.py b/python/google/protobuf/internal/text_format_test.py index 55e3c2c8..3455a000 100755 --- a/python/google/protobuf/internal/text_format_test.py +++ b/python/google/protobuf/internal/text_format_test.py @@ -36,9 +36,10 @@ __author__ = 'kenton@google.com (Kenton Varda)' import re +import six + from google.apputils import basetest from google.protobuf import text_format -from google.protobuf.internal import api_implementation from google.protobuf.internal import test_util from google.protobuf import unittest_pb2 from google.protobuf import unittest_mset_pb2 @@ -143,7 +144,7 @@ class TextFormatTest(basetest.TestCase): 'repeated_string: "\\303\\274\\352\\234\\237"\n') def testPrintExoticUnicodeSubclass(self): - class UnicodeSub(unicode): + class UnicodeSub(six.text_type): pass message = unittest_pb2.TestAllTypes() message.repeated_string.append(UnicodeSub(u'\u00fc\ua71f')) -- cgit v1.2.3