Merge branch 'master' into 3463.more-immutable-python-3

This commit is contained in:
Itamar Turner-Trauring 2020-10-07 13:22:04 -04:00 committed by GitHub
commit d519d4b2fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

0
newsfragments/3462.minor Normal file
View File

View File

@ -1,5 +1,18 @@
# -*- test-case-name: allmydata.test.test_encode -*-
"""
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 time
from zope.interface import implementer
from twisted.internet import defer
@ -468,7 +481,7 @@ class Encoder(object):
(self,
self.segment_size*(segnum+1),
self.segment_size*self.num_segments,
100 * (segnum+1) / self.num_segments,
100 * (segnum+1) // self.num_segments,
),
level=log.OPERATIONAL)
elapsed = time.time() - start

View File

@ -41,6 +41,7 @@ PORTED_MODULES = [
"allmydata.immutable.downloader.segmentation",
"allmydata.immutable.downloader.share",
"allmydata.immutable.downloader.status",
"allmydata.immutable.encode",
"allmydata.immutable.filenode",
"allmydata.immutable.happiness_upload",
"allmydata.immutable.layout",