Patchwork [3,of,8] tests: remove special handling for undefined memoryview

login
register
mail settings
Submitter Gregory Szorc
Date May 13, 2017, 7:54 p.m.
Message ID <aeb25aafb4820c76aec6.1494705275@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/20607/
State Accepted
Headers show

Comments

Gregory Szorc - May 13, 2017, 7:54 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1494700296 25200
#      Sat May 13 11:31:36 2017 -0700
# Node ID aeb25aafb4820c76aec6d5093b7b1142a910b12e
# Parent  225547415e82c67e4d375d2e54277df1166cbf0a
tests: remove special handling for undefined memoryview

'memoryview' was introduced in Python 2.7. 4adc090fa2fb added code
to filterpyflakes.py to ignore "undefined name 'memoryview'" pyflakes
warnings. Since we no longer support <Python 2.7, we can remove this
workaround.

Patch

diff --git a/tests/filterpyflakes.py b/tests/filterpyflakes.py
--- a/tests/filterpyflakes.py
+++ b/tests/filterpyflakes.py
@@ -11,7 +11,7 @@  lines = []
 for line in sys.stdin:
     # We blacklist tests that are too noisy for us
     pats = [
-        r"undefined name '(WindowsError|memoryview)'",
+        r"undefined name 'WindowsError'",
         r"redefinition of unused '[^']+' from line",
     ]
 
@@ -33,7 +33,6 @@  for line in lines:
     sys.stdout.write(line)
 print()
 
-# self test of "undefined name" detection for other than 'memoryview'
+# self test of "undefined name" detection
 if False:
-    print(memoryview)
     print(undefinedname)