diff --git a/src/allmydata/test/_win_subprocess.py b/src/allmydata/test/_win_subprocess.py index 2c2cb60b4..bf9767e73 100644 --- a/src/allmydata/test/_win_subprocess.py +++ b/src/allmydata/test/_win_subprocess.py @@ -7,6 +7,9 @@ from future.utils import PY3 if PY3: raise RuntimeError("Just use subprocess.Popen") +# This is necessary to pacify flake8 on Python 3, while we're still supporting +# Python 2. +from past.builtins import unicode # -*- coding: utf-8 -*- diff --git a/src/allmydata/test/web/test_grid.py b/src/allmydata/test/web/test_grid.py index ef2718df4..edcf32268 100644 --- a/src/allmydata/test/web/test_grid.py +++ b/src/allmydata/test/web/test_grid.py @@ -660,7 +660,6 @@ class Grid(GridTestMixin, WebErrorMixin, ShouldFailMixin, testutil.ReallyEqualMi if line] except ValueError: print("response is:", res) - print("undecodeable line was '%s'" % line) raise self.failUnlessReallyEqual(len(units), 5+1) # should be parent-first diff --git a/src/allmydata/uri.py b/src/allmydata/uri.py index 70742b7b2..5641771d3 100644 --- a/src/allmydata/uri.py +++ b/src/allmydata/uri.py @@ -16,7 +16,7 @@ if PY2: # Don't import bytes or str, to prevent future's newbytes leaking and # breaking code that only expects normal bytes. from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, dict, list, object, range, max, min # noqa: F401 - str = unicode + from past.builtins import unicode as str from past.builtins import unicode, long diff --git a/src/allmydata/windows/registry.py b/src/allmydata/windows/registry.py index 2c7f03156..a5426cb75 100644 --- a/src/allmydata/windows/registry.py +++ b/src/allmydata/windows/registry.py @@ -32,7 +32,7 @@ def get_registry_setting(key, name, _topkey=None): regkey = winreg.OpenKey(topkey, key) sublen, vallen, timestamp = winreg.QueryInfoKey(regkey) - for validx in xrange(vallen): + for validx in range(vallen): keyname, value, keytype = winreg.EnumValue(regkey, validx) if keyname == name and keytype == winreg.REG_SZ: return value