From 6196a1c6505ec409c6447a1df526a54cfe278a03 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Mon, 14 Sep 2020 14:06:27 -0400 Subject: [PATCH] Port to Python 3. --- src/allmydata/storage/lease.py | 13 +++++++++++++ src/allmydata/util/_python3.py | 1 + 2 files changed, 14 insertions(+) diff --git a/src/allmydata/storage/lease.py b/src/allmydata/storage/lease.py index 4d2dce8c4..187f32406 100644 --- a/src/allmydata/storage/lease.py +++ b/src/allmydata/storage/lease.py @@ -1,3 +1,16 @@ +""" +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 struct, time class LeaseInfo(object): diff --git a/src/allmydata/util/_python3.py b/src/allmydata/util/_python3.py index 51cf8018e..10cc69431 100644 --- a/src/allmydata/util/_python3.py +++ b/src/allmydata/util/_python3.py @@ -38,6 +38,7 @@ PORTED_MODULES = [ "allmydata.storage.common", "allmydata.storage.crawler", "allmydata.storage.expirer", + "allmydata.storage.lease", "allmydata.storage.mutable", "allmydata.test.common_py3", "allmydata.uri",