mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 18:06:46 +00:00
Merge remote-tracking branch 'origin/master' into 3618.bb-tests-python-3
This commit is contained in:
commit
f75eda1255
0
newsfragments/3605.minor
Normal file
0
newsfragments/3605.minor
Normal file
0
newsfragments/3608.minor
Normal file
0
newsfragments/3608.minor
Normal file
1
newsfragments/3623.minor
Normal file
1
newsfragments/3623.minor
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
4
setup.py
4
setup.py
@ -152,9 +152,7 @@ tor_requires = [
|
|||||||
|
|
||||||
i2p_requires = [
|
i2p_requires = [
|
||||||
# txi2p has Python 3 support, but it's unreleased: https://github.com/str4d/txi2p/issues/10.
|
# txi2p has Python 3 support, but it's unreleased: https://github.com/str4d/txi2p/issues/10.
|
||||||
# URL lookups are in PEP-508 (via https://stackoverflow.com/a/54794506).
|
"txi2p; python_version < '3.0'",
|
||||||
# Also see the comment in tor_requires.
|
|
||||||
"txi2p @ git+https://github.com/str4d/txi2p@0611b9a86172cb70d2f5e415a88eee9f230590b3#egg=txi2p",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if len(sys.argv) > 1 and sys.argv[1] == '--fakedependency':
|
if len(sys.argv) > 1 and sys.argv[1] == '--fakedependency':
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
"""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 os, time, tempfile
|
import os, time, tempfile
|
||||||
from zope.interface import implementer
|
from zope.interface import implementer
|
||||||
@ -13,17 +23,17 @@ from twisted.python import log
|
|||||||
|
|
||||||
def get_memory_usage():
|
def get_memory_usage():
|
||||||
# this is obviously linux-specific
|
# this is obviously linux-specific
|
||||||
stat_names = ("VmPeak",
|
stat_names = (b"VmPeak",
|
||||||
"VmSize",
|
b"VmSize",
|
||||||
#"VmHWM",
|
#b"VmHWM",
|
||||||
"VmData")
|
b"VmData")
|
||||||
stats = {}
|
stats = {}
|
||||||
try:
|
try:
|
||||||
with open("/proc/self/status", "r") as f:
|
with open("/proc/self/status", "rb") as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
name, right = line.split(":",2)
|
name, right = line.split(b":",2)
|
||||||
if name in stat_names:
|
if name in stat_names:
|
||||||
assert right.endswith(" kB\n")
|
assert right.endswith(b" kB\n")
|
||||||
right = right[:-4]
|
right = right[:-4]
|
||||||
stats[name] = int(right) * 1024
|
stats[name] = int(right) * 1024
|
||||||
except:
|
except:
|
||||||
@ -34,8 +44,8 @@ def get_memory_usage():
|
|||||||
|
|
||||||
def log_memory_usage(where=""):
|
def log_memory_usage(where=""):
|
||||||
stats = get_memory_usage()
|
stats = get_memory_usage()
|
||||||
log.msg("VmSize: %9d VmPeak: %9d %s" % (stats["VmSize"],
|
log.msg("VmSize: %9d VmPeak: %9d %s" % (stats[b"VmSize"],
|
||||||
stats["VmPeak"],
|
stats[b"VmPeak"],
|
||||||
where))
|
where))
|
||||||
|
|
||||||
@implementer(IConsumer)
|
@implementer(IConsumer)
|
||||||
|
@ -29,6 +29,7 @@ PORTED_MODULES = [
|
|||||||
"allmydata._monkeypatch",
|
"allmydata._monkeypatch",
|
||||||
"allmydata.blacklist",
|
"allmydata.blacklist",
|
||||||
"allmydata.codec",
|
"allmydata.codec",
|
||||||
|
"allmydata.control",
|
||||||
"allmydata.crypto",
|
"allmydata.crypto",
|
||||||
"allmydata.crypto.aes",
|
"allmydata.crypto.aes",
|
||||||
"allmydata.crypto.ed25519",
|
"allmydata.crypto.ed25519",
|
||||||
|
4
tox.ini
4
tox.ini
@ -123,6 +123,10 @@ deps =
|
|||||||
mypy
|
mypy
|
||||||
git+https://github.com/Shoobx/mypy-zope
|
git+https://github.com/Shoobx/mypy-zope
|
||||||
git+https://github.com/warner/foolscap
|
git+https://github.com/warner/foolscap
|
||||||
|
# Twisted 21.2.0 introduces some type hints which we are not yet
|
||||||
|
# compatible with.
|
||||||
|
# https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3622
|
||||||
|
twisted<21.2.0
|
||||||
commands = mypy src
|
commands = mypy src
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user