Port to Python 3.

This commit is contained in:
Itamar Turner-Trauring 2021-04-06 10:29:29 -04:00
parent ae7680759d
commit 044c79c4db
2 changed files with 10 additions and 0 deletions

View File

@ -1,12 +1,21 @@
"""
Tools aimed at the interaction between tests and Eliot.
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
# Python 2 compatibility
# Can't use `builtins.str` because it's not JSON encodable:
# `exceptions.TypeError: <class 'future.types.newstr.newstr'> is not JSON-encodeable`
from past.builtins import unicode as str
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, max, min # noqa: F401
from six import ensure_text
__all__ = [

View File

@ -101,6 +101,7 @@ PORTED_MODULES = [
"allmydata.test.cli_node_api",
"allmydata.test.common",
"allmydata.test.common_web",
"allmydata.test.eliotutil",
"allmydata.test.no_network",
"allmydata.test.matchers",
"allmydata.test.mutable",