From 95f2d53f92391bb8e427d93b245a64890d1b3092 Mon Sep 17 00:00:00 2001 From: Ross Patterson Date: Wed, 7 Oct 2020 12:01:35 -0700 Subject: [PATCH] chore(refs #3455) Address feedback, BBB comments https://github.com/tahoe-lafs/tahoe-lafs/pull/845#issuecomment-704469561 --- misc/python3/Makefile | 2 +- newsfragments/3464.minor | 1 + src/allmydata/node.py | 2 +- src/allmydata/scripts/common.py | 2 +- src/allmydata/scripts/stats_gatherer.py | 2 +- src/allmydata/scripts/tahoe_check.py | 2 +- src/allmydata/stats.py | 2 +- src/allmydata/test/check_load.py | 2 +- src/allmydata/test/check_memory.py | 2 +- src/allmydata/test/eliotutil.py | 2 +- src/allmydata/test/mutable/test_version.py | 2 +- src/allmydata/test/test_auth.py | 2 +- src/allmydata/test/test_deepcheck.py | 2 +- 13 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 newsfragments/3464.minor diff --git a/misc/python3/Makefile b/misc/python3/Makefile index 018d20035..f0ef8b12a 100644 --- a/misc/python3/Makefile +++ b/misc/python3/Makefile @@ -1,4 +1,4 @@ -# BBB: Python 3 porting targets +# Python 3 porting targets # # NOTE: this Makefile requires GNU make diff --git a/newsfragments/3464.minor b/newsfragments/3464.minor new file mode 100644 index 000000000..bc79dee53 --- /dev/null +++ b/newsfragments/3464.minor @@ -0,0 +1 @@ +Cleanup comments that don't match the project convention. diff --git a/src/allmydata/node.py b/src/allmydata/node.py index 68175aa9e..26fc6fc97 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -13,7 +13,7 @@ from io import StringIO import tempfile from base64 import b32decode, b32encode -# BBB: Python 2 compatibility +# Python 2 compatibility from six.moves import configparser from future.utils import PY2 if PY2: diff --git a/src/allmydata/scripts/common.py b/src/allmydata/scripts/common.py index 13f67abab..b2bb8a1e6 100644 --- a/src/allmydata/scripts/common.py +++ b/src/allmydata/scripts/common.py @@ -4,7 +4,7 @@ import os, sys, urllib, textwrap import codecs from os.path import join -# BBB: Python 2 compatibility +# Python 2 compatibility from future.utils import PY2 if PY2: from future.builtins import str # noqa: F401 diff --git a/src/allmydata/scripts/stats_gatherer.py b/src/allmydata/scripts/stats_gatherer.py index 57136f872..26848a23c 100644 --- a/src/allmydata/scripts/stats_gatherer.py +++ b/src/allmydata/scripts/stats_gatherer.py @@ -2,7 +2,7 @@ from __future__ import print_function import os -# BBB: Python 2 compatibility +# Python 2 compatibility from future.utils import PY2 if PY2: from future.builtins import str # noqa: F401 diff --git a/src/allmydata/scripts/tahoe_check.py b/src/allmydata/scripts/tahoe_check.py index 6531ec285..997ee6e9e 100644 --- a/src/allmydata/scripts/tahoe_check.py +++ b/src/allmydata/scripts/tahoe_check.py @@ -3,7 +3,7 @@ from __future__ import print_function import urllib import json -# BBB: Python 2 compatibility +# Python 2 compatibility from future.utils import PY2 if PY2: from future.builtins import str # noqa: F401 diff --git a/src/allmydata/stats.py b/src/allmydata/stats.py index e8e3e2965..f669b0861 100644 --- a/src/allmydata/stats.py +++ b/src/allmydata/stats.py @@ -6,7 +6,7 @@ import pprint import time from collections import deque -# BBB: Python 2 compatibility +# Python 2 compatibility from future.utils import PY2 if PY2: from future.builtins import str # noqa: F401 diff --git a/src/allmydata/test/check_load.py b/src/allmydata/test/check_load.py index 3a8e835de..4058ddf77 100644 --- a/src/allmydata/test/check_load.py +++ b/src/allmydata/test/check_load.py @@ -37,7 +37,7 @@ a mean of 10kB and a max of 100MB, so filesize=min(int(1.0/random(.0002)),1e8) import os, sys, httplib, binascii import urllib, json, random, time, urlparse -# BBB: Python 2 compatibility +# Python 2 compatibility from future.utils import PY2 if PY2: from future.builtins import str # noqa: F401 diff --git a/src/allmydata/test/check_memory.py b/src/allmydata/test/check_memory.py index 174b69d4f..41cf6e1d7 100644 --- a/src/allmydata/test/check_memory.py +++ b/src/allmydata/test/check_memory.py @@ -2,7 +2,7 @@ from __future__ import print_function import os, shutil, sys, urllib, time, stat, urlparse -# BBB: Python 2 compatibility +# Python 2 compatibility from future.utils import PY2 if PY2: from future.builtins import str # noqa: F401 diff --git a/src/allmydata/test/eliotutil.py b/src/allmydata/test/eliotutil.py index 21e109164..9c12629f9 100644 --- a/src/allmydata/test/eliotutil.py +++ b/src/allmydata/test/eliotutil.py @@ -2,7 +2,7 @@ Tools aimed at the interaction between tests and Eliot. """ -# BBB: Python 2 compatibility +# Python 2 compatibility # Can't use `builtins.str` because it's not JSON encodable: # `exceptions.TypeError: is not JSON-encodeable` from past.builtins import unicode as str diff --git a/src/allmydata/test/mutable/test_version.py b/src/allmydata/test/mutable/test_version.py index 35dea9411..dd871aeb1 100644 --- a/src/allmydata/test/mutable/test_version.py +++ b/src/allmydata/test/mutable/test_version.py @@ -2,7 +2,7 @@ from __future__ import print_function import os -# BBB: Python 2 compatibility +# Python 2 compatibility from future.utils import PY2 if PY2: from future.builtins import str # noqa: F401 diff --git a/src/allmydata/test/test_auth.py b/src/allmydata/test/test_auth.py index d6daba24e..5670933df 100644 --- a/src/allmydata/test/test_auth.py +++ b/src/allmydata/test/test_auth.py @@ -1,4 +1,4 @@ -# BBB: Python 2 compatibility +# Python 2 compatibility from future.utils import PY2 if PY2: from future.builtins import str # noqa: F401 diff --git a/src/allmydata/test/test_deepcheck.py b/src/allmydata/test/test_deepcheck.py index dcfe1ea35..e3b712715 100644 --- a/src/allmydata/test/test_deepcheck.py +++ b/src/allmydata/test/test_deepcheck.py @@ -1,6 +1,6 @@ import os, json, urllib -# BBB: Python 2 compatibility +# Python 2 compatibility # Can't use `builtins.str` because something deep in Twisted callbacks ends up repr'ing # a `future.types.newstr.newstr` as a *Python 3* byte string representation under # *Python 2*: