From 04fc8e704650e1758a2eac6e5f146092aa04f310 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 7 May 2021 13:21:23 -0400 Subject: [PATCH] Port to Python 3. --- integration/test_servers_of_happiness.py | 12 ++++++++++++ src/allmydata/util/_python3.py | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/integration/test_servers_of_happiness.py b/integration/test_servers_of_happiness.py index 594397999..b9de0c075 100644 --- a/integration/test_servers_of_happiness.py +++ b/integration/test_servers_of_happiness.py @@ -1,3 +1,15 @@ +""" +Ported to Python 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 sys from os.path import join diff --git a/src/allmydata/util/_python3.py b/src/allmydata/util/_python3.py index 5f78af626..41270b430 100644 --- a/src/allmydata/util/_python3.py +++ b/src/allmydata/util/_python3.py @@ -22,6 +22,12 @@ 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 + +PORTED_INTEGRATION_TESTS = [ + "integration.test_servers_of_happiness", +] + + # Keep these sorted alphabetically, to reduce merge conflicts: PORTED_MODULES = [ "allmydata",