mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 21:17:54 +00:00
Merge pull request #1023 from tahoe-lafs/3655.__init__-python-3
Port __init__.py modules to Python 3 Fixes ticket:3655.
This commit is contained in:
commit
75ca085f5d
0
newsfragments/3655.minor
Normal file
0
newsfragments/3655.minor
Normal file
@ -3,6 +3,16 @@ Decentralized storage grid.
|
||||
|
||||
community web site: U{https://tahoe-lafs.org/}
|
||||
"""
|
||||
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:
|
||||
# Don't import future str() so we don't break Foolscap serialization on Python 2.
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, max, min # noqa: F401
|
||||
from past.builtins import unicode as str
|
||||
|
||||
__all__ = [
|
||||
"__version__",
|
||||
|
@ -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
|
||||
|
||||
|
||||
from allmydata.introducer.server import create_introducer
|
||||
|
||||
|
@ -12,9 +12,17 @@ Some setup that should apply across the entire test suite.
|
||||
|
||||
Rather than defining interesting APIs for other code to use, this just causes
|
||||
some side-effects which make things better when the test suite runs.
|
||||
"""
|
||||
|
||||
from future.utils import PY3
|
||||
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, PY3
|
||||
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 warnings
|
||||
from traceback import extract_stack, format_list
|
||||
@ -124,4 +132,4 @@ if sys.platform == "win32":
|
||||
|
||||
from eliot import to_file
|
||||
from allmydata.util.jsonbytes import BytesJSONEncoder
|
||||
to_file(open("eliot.log", "w"), encoder=BytesJSONEncoder)
|
||||
to_file(open("eliot.log", "wb"), encoder=BytesJSONEncoder)
|
||||
|
@ -24,6 +24,7 @@ if PY2:
|
||||
|
||||
# Keep these sorted alphabetically, to reduce merge conflicts:
|
||||
PORTED_MODULES = [
|
||||
"allmydata",
|
||||
"allmydata.__main__",
|
||||
"allmydata._auto_deps",
|
||||
"allmydata._monkeypatch",
|
||||
@ -40,9 +41,11 @@ PORTED_MODULES = [
|
||||
"allmydata.crypto.util",
|
||||
"allmydata.deep_stats",
|
||||
"allmydata.dirnode",
|
||||
"allmydata.frontends",
|
||||
"allmydata.frontends.sftpd",
|
||||
"allmydata.hashtree",
|
||||
"allmydata.history",
|
||||
"allmydata.immutable",
|
||||
"allmydata.immutable.checker",
|
||||
"allmydata.immutable.downloader",
|
||||
"allmydata.immutable.downloader.common",
|
||||
@ -61,11 +64,13 @@ PORTED_MODULES = [
|
||||
"allmydata.immutable.repairer",
|
||||
"allmydata.immutable.upload",
|
||||
"allmydata.interfaces",
|
||||
"allmydata.introducer",
|
||||
"allmydata.introducer.client",
|
||||
"allmydata.introducer.common",
|
||||
"allmydata.introducer.interfaces",
|
||||
"allmydata.introducer.server",
|
||||
"allmydata.monitor",
|
||||
"allmydata.mutable",
|
||||
"allmydata.mutable.checker",
|
||||
"allmydata.mutable.common",
|
||||
"allmydata.mutable.filenode",
|
||||
@ -76,10 +81,12 @@ PORTED_MODULES = [
|
||||
"allmydata.mutable.servermap",
|
||||
"allmydata.node",
|
||||
"allmydata.nodemaker",
|
||||
"allmydata.scripts",
|
||||
"allmydata.scripts.create_node",
|
||||
"allmydata.scripts.types_",
|
||||
"allmydata.stats",
|
||||
"allmydata.storage_client",
|
||||
"allmydata.storage",
|
||||
"allmydata.storage.common",
|
||||
"allmydata.storage.crawler",
|
||||
"allmydata.storage.expirer",
|
||||
@ -88,12 +95,18 @@ PORTED_MODULES = [
|
||||
"allmydata.storage.mutable",
|
||||
"allmydata.storage.server",
|
||||
"allmydata.storage.shares",
|
||||
"allmydata.test",
|
||||
"allmydata.test.cli",
|
||||
"allmydata.test.no_network",
|
||||
"allmydata.test.matchers",
|
||||
"allmydata.test.mutable",
|
||||
"allmydata.test.mutable.util",
|
||||
"allmydata.test.web",
|
||||
"allmydata.testing",
|
||||
"allmydata.testing.web",
|
||||
"allmydata.unknown",
|
||||
"allmydata.uri",
|
||||
"allmydata.util",
|
||||
"allmydata.util._python3",
|
||||
"allmydata.util.abbreviate",
|
||||
"allmydata.util.assertutil",
|
||||
@ -125,6 +138,7 @@ PORTED_MODULES = [
|
||||
"allmydata.util.statistics",
|
||||
"allmydata.util.time_format",
|
||||
"allmydata.util.tor_provider",
|
||||
"allmydata.web",
|
||||
"allmydata.web.check_results",
|
||||
"allmydata.web.common",
|
||||
"allmydata.web.directory",
|
||||
@ -140,6 +154,7 @@ PORTED_MODULES = [
|
||||
"allmydata.web.storage_plugins",
|
||||
"allmydata.web.unlinked",
|
||||
"allmydata.webish",
|
||||
"allmydata.windows",
|
||||
]
|
||||
|
||||
PORTED_TEST_MODULES = [
|
||||
|
Loading…
Reference in New Issue
Block a user