diff options
author | Tres Seaver <tseaver@palladion.com> | 2015-01-13 14:21:29 -0500 |
---|---|---|
committer | Tres Seaver <tseaver@palladion.com> | 2015-01-13 14:22:05 -0500 |
commit | f336d4b7a5c1d369ed508e513d482c885705e939 (patch) | |
tree | 4d0b2d191780864b6c787780193e071f2ea7f434 /python/google/protobuf/internal/text_format_test.py | |
parent | 052e0205a76717f39fc65e303fd2b92ab1df3028 (diff) |
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').
Diffstat (limited to 'python/google/protobuf/internal/text_format_test.py')
-rwxr-xr-x | python/google/protobuf/internal/text_format_test.py | 5 |
1 files changed, 3 insertions, 2 deletions
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')) |