diff --git a/src/allmydata/test/cli/test_invite.py b/src/allmydata/test/cli/test_invite.py index 452acbc9c..36021af13 100644 --- a/src/allmydata/test/cli/test_invite.py +++ b/src/allmydata/test/cli/test_invite.py @@ -1,4 +1,14 @@ -from past.builtins import unicode +""" +Ported to Pythn 3. +""" +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + +from future.utils import PY2 +if PY2: + from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401 import os import mock @@ -51,7 +61,7 @@ class _FakeWormhole(object): def _create_fake_wormhole(outgoing_messages): outgoing_messages = [ - m.encode("utf-8") if isinstance(m, unicode) else m + m.encode("utf-8") if isinstance(m, str) else m for m in outgoing_messages ] return _FakeWormhole(outgoing_messages) diff --git a/src/allmydata/util/_python3.py b/src/allmydata/util/_python3.py index 8cf6a61b3..5a29020b8 100644 --- a/src/allmydata/util/_python3.py +++ b/src/allmydata/util/_python3.py @@ -145,6 +145,7 @@ PORTED_MODULES = [ PORTED_TEST_MODULES = [ "allmydata.test.cli.test_alias", "allmydata.test.cli.test_create", + "allmydata.test.cli.test_invite", "allmydata.test.cli.test_status", "allmydata.test.mutable.test_checker",