From e92b88195c6554257602442b83b5a721270811ba Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 1 Apr 2021 10:51:13 -0400 Subject: [PATCH] Port to Python 3. --- src/allmydata/util/_python3.py | 1 + src/allmydata/util/rrefutil.py | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/allmydata/util/_python3.py b/src/allmydata/util/_python3.py index e8783aee7..56d9e6aec 100644 --- a/src/allmydata/util/_python3.py +++ b/src/allmydata/util/_python3.py @@ -136,6 +136,7 @@ PORTED_MODULES = [ "allmydata.util.observer", "allmydata.util.pipeline", "allmydata.util.pollmixin", + "allmydata.util.rrefutil", "allmydata.util.spans", "allmydata.util.statistics", "allmydata.util.time_format", diff --git a/src/allmydata/util/rrefutil.py b/src/allmydata/util/rrefutil.py index de0f2fbd5..5d57a2f45 100644 --- a/src/allmydata/util/rrefutil.py +++ b/src/allmydata/util/rrefutil.py @@ -1,3 +1,14 @@ +""" +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 from foolscap.api import Violation, RemoteException, SturdyRef