Port to Python 3.

This commit is contained in:
Itamar Turner-Trauring 2020-11-11 14:25:58 -05:00
parent d238242d73
commit d0d7a82734
2 changed files with 14 additions and 1 deletions

View File

@ -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 random
from zope.interface import implementer
@ -1141,7 +1153,7 @@ class MutableFileVersion(object):
start_segments = {} # shnum -> start segment
end_segments = {} # shnum -> end segment
blockhashes = {} # shnum -> blockhash tree
for (shnum, original_data) in update_data.items():
for (shnum, original_data) in list(update_data.items()):
data = [d[1] for d in original_data if d[0] == self._version]
# data is [(blockhashes,start,end)..]

View File

@ -55,6 +55,7 @@ PORTED_MODULES = [
"allmydata.monitor",
"allmydata.mutable.checker",
"allmydata.mutable.common",
"allmydata.mutable.filenode",
"allmydata.node",
"allmydata.storage_client",
"allmydata.storage.common",