mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-25 23:51:07 +00:00
Pick off a couple of easy ports
This commit is contained in:
parent
91c055a821
commit
d04b6c103a
0
newsfragments/3474.minor
Normal file
0
newsfragments/3474.minor
Normal file
@ -1,3 +1,16 @@
|
|||||||
|
"""
|
||||||
|
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
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from allmydata.scripts.runner import run
|
from allmydata.scripts.runner import run
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
"""
|
||||||
|
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
|
||||||
|
|
||||||
# Note: please minimize imports in this file. In particular, do not import
|
# Note: please minimize imports in this file. In particular, do not import
|
||||||
# any module from Tahoe-LAFS or its dependencies, and do not import any
|
# any module from Tahoe-LAFS or its dependencies, and do not import any
|
||||||
# modules at all at global level. That includes setuptools and pkg_resources.
|
# modules at all at global level. That includes setuptools and pkg_resources.
|
||||||
|
@ -272,4 +272,4 @@ class T(unittest.TestCase):
|
|||||||
|
|
||||||
foolscap_stuffs = [stuff for (pkg, stuff) in vers_and_locs if pkg == 'foolscap']
|
foolscap_stuffs = [stuff for (pkg, stuff) in vers_and_locs if pkg == 'foolscap']
|
||||||
self.failUnlessEqual(len(foolscap_stuffs), 1)
|
self.failUnlessEqual(len(foolscap_stuffs), 1)
|
||||||
self.failUnless([e for e in errors if "dependency \'foolscap\' could not be imported" in e])
|
self.failUnless([e for e in errors if "\'foolscap\' could not be imported" in e])
|
||||||
|
@ -24,6 +24,8 @@ if PY2:
|
|||||||
|
|
||||||
# Keep these sorted alphabetically, to reduce merge conflicts:
|
# Keep these sorted alphabetically, to reduce merge conflicts:
|
||||||
PORTED_MODULES = [
|
PORTED_MODULES = [
|
||||||
|
"allmydata.__main__",
|
||||||
|
"allmydata._auto_deps",
|
||||||
"allmydata._monkeypatch",
|
"allmydata._monkeypatch",
|
||||||
"allmydata.codec",
|
"allmydata.codec",
|
||||||
"allmydata.crypto",
|
"allmydata.crypto",
|
||||||
@ -69,9 +71,9 @@ PORTED_MODULES = [
|
|||||||
"allmydata.util.configutil",
|
"allmydata.util.configutil",
|
||||||
"allmydata.util.connection_status",
|
"allmydata.util.connection_status",
|
||||||
"allmydata.util.deferredutil",
|
"allmydata.util.deferredutil",
|
||||||
"allmydata.util.fileutil",
|
|
||||||
"allmydata.util.dictutil",
|
"allmydata.util.dictutil",
|
||||||
"allmydata.util.encodingutil",
|
"allmydata.util.encodingutil",
|
||||||
|
"allmydata.util.fileutil",
|
||||||
"allmydata.util.gcutil",
|
"allmydata.util.gcutil",
|
||||||
"allmydata.util.happinessutil",
|
"allmydata.util.happinessutil",
|
||||||
"allmydata.util.hashutil",
|
"allmydata.util.hashutil",
|
||||||
|
Loading…
Reference in New Issue
Block a user