From b87fca27261f79be20ab06a222ed2330d60d9f2c Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Sat, 25 Mar 2017 10:11:43 +0000 Subject: MAINT: Remove asbytes where a b prefix would suffice Since we only need to support python 2, we can remove any case where we just pass a single string literal and use the b prefix instead. What we can't do is transform asbytes("tests %d" % num), because %-formatting fails on bytes in python 3.x < 3.5. --- numpy/f2py/tests/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/f2py/tests/util.py') diff --git a/numpy/f2py/tests/util.py b/numpy/f2py/tests/util.py index 0c9e91568..fe608d898 100644 --- a/numpy/f2py/tests/util.py +++ b/numpy/f2py/tests/util.py @@ -213,7 +213,7 @@ sys.exit(99) stderr=subprocess.STDOUT) out, err = p.communicate() - m = re.search(asbytes(r'COMPILERS:(\d+),(\d+),(\d+)'), out) + m = re.search(br'COMPILERS:(\d+),(\d+),(\d+)', out) if m: _compiler_status = (bool(int(m.group(1))), bool(int(m.group(2))), bool(int(m.group(3)))) -- cgit v1.2.1