Ported to Python 3.

This commit is contained in:
Itamar Turner-Trauring 2020-09-29 11:22:52 -04:00
parent 87838dd2bb
commit 867a1b71a1
3 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,13 @@
"""
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
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

View File

@ -1,3 +1,14 @@
"""
Ported to Python 3.
"""
from __future__ import division
from __future__ import absolute_import
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 itertools
from zope.interface import implementer
@ -257,7 +268,7 @@ class DownloadStatus(object):
# else ignore completed requests
if not total_outstanding:
return 1.0
return 1.0 * total_received / total_outstanding
return total_received / total_outstanding
def using_helper(self):
return False

View File

@ -33,6 +33,8 @@ PORTED_MODULES = [
"allmydata.crypto.util",
"allmydata.hashtree",
"allmydata.immutable.happiness_upload",
"allmydata.immutable.downloader",
"allmydata.immutable.downloader.status",
"allmydata.interfaces",
"allmydata.introducer.interfaces",
"allmydata.monitor",