From 7de84e32a3536024ceb244739629b09913f46c34 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 11 Sep 2020 15:02:42 -0400 Subject: [PATCH] Port to Python 3. --- src/allmydata/storage/immutable.py | 13 ++++++++++++- src/allmydata/util/_python3.py | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/allmydata/storage/immutable.py b/src/allmydata/storage/immutable.py index 8d83ec1b3..778c0ddf8 100644 --- a/src/allmydata/storage/immutable.py +++ b/src/allmydata/storage/immutable.py @@ -1,4 +1,15 @@ -from future.utils import bytes_to_native_str +""" +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, bytes_to_native_str +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, stat, struct, time diff --git a/src/allmydata/util/_python3.py b/src/allmydata/util/_python3.py index afdbea1f0..5a26d2cbc 100644 --- a/src/allmydata/util/_python3.py +++ b/src/allmydata/util/_python3.py @@ -37,6 +37,7 @@ PORTED_MODULES = [ "allmydata.monitor", "allmydata.storage.crawler", "allmydata.storage.expirer", + "allmydata.storage.immutable", "allmydata.test.common_py3", "allmydata.uri", "allmydata.util._python3",