From 4cb7a65aa1d82fdb6cf9206fa3ba7a75d13d0979 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Sat, 27 Feb 2021 15:40:36 -0500 Subject: [PATCH 1/3] Port check_results.py to Python 3 --- newsfragments/3620.minor | 0 src/allmydata/check_results.py | 11 +++++++++++ src/allmydata/util/_python3.py | 1 + 3 files changed, 12 insertions(+) create mode 100644 newsfragments/3620.minor diff --git a/newsfragments/3620.minor b/newsfragments/3620.minor new file mode 100644 index 000000000..e69de29bb diff --git a/src/allmydata/check_results.py b/src/allmydata/check_results.py index f33c3afc0..4f997b614 100644 --- a/src/allmydata/check_results.py +++ b/src/allmydata/check_results.py @@ -1,3 +1,14 @@ +"""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 + from past.builtins import unicode from zope.interface import implementer diff --git a/src/allmydata/util/_python3.py b/src/allmydata/util/_python3.py index 88a7d8125..ffdae63e3 100644 --- a/src/allmydata/util/_python3.py +++ b/src/allmydata/util/_python3.py @@ -28,6 +28,7 @@ PORTED_MODULES = [ "allmydata._auto_deps", "allmydata._monkeypatch", "allmydata.blacklist", + "allmydata.check_results", "allmydata.codec", "allmydata.control", "allmydata.crypto", From 0125deb6032369ca19e0f098719bc49129eec35f Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 5 Mar 2021 09:41:49 -0500 Subject: [PATCH 2/3] Fix typo. --- src/allmydata/mutable/servermap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/allmydata/mutable/servermap.py b/src/allmydata/mutable/servermap.py index d793d1dcd..4f3226649 100644 --- a/src/allmydata/mutable/servermap.py +++ b/src/allmydata/mutable/servermap.py @@ -1212,7 +1212,7 @@ class ServermapUpdater(object): break more_queries.append(self.extra_servers.pop(0)) - self.log(format="sending %(more)d more queries: %(who)d", + self.log(format="sending %(more)d more queries: %(who)s", more=len(more_queries), who=" ".join(["[%r]" % s.get_name() for s in more_queries]), level=log.NOISY) From 061f886f4555633259ae519e47163fc715360e1a Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 5 Mar 2021 09:42:06 -0500 Subject: [PATCH 3/3] Fix typo. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index bc18ed519..33e5830ff 100644 --- a/tox.ini +++ b/tox.ini @@ -44,7 +44,7 @@ deps = # more useful results. usedevelop = False # We use extras=test to get things like "mock" that are required for our unit -# tests.8 +# tests. extras = test setenv =