summary refs log tree commit diff
path: root/pkgs/applications/science/math/sage/patches/python3-syntax-without-write.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science/math/sage/patches/python3-syntax-without-write.patch')
-rw-r--r--pkgs/applications/science/math/sage/patches/python3-syntax-without-write.patch40
1 files changed, 0 insertions, 40 deletions
diff --git a/pkgs/applications/science/math/sage/patches/python3-syntax-without-write.patch b/pkgs/applications/science/math/sage/patches/python3-syntax-without-write.patch
deleted file mode 100644
index ff1dcd22acf3..000000000000
--- a/pkgs/applications/science/math/sage/patches/python3-syntax-without-write.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/src/sage/tests/py3_syntax.py b/src/sage/tests/py3_syntax.py
-index e564860b48..86ab3725f9 100644
---- a/src/sage/tests/py3_syntax.py
-+++ b/src/sage/tests/py3_syntax.py
-@@ -179,15 +179,30 @@ class Python3SyntaxTest(SortedDirectoryWalkerABC):
-             sage: py3_syntax = Python3SyntaxTest()
-             sage: py3_syntax.test(src.name)
-             Invalid Python 3 syntax found:
--              File "...py", line 1
--                print "invalid print statement"
--                                              ^
--            SyntaxError: Missing parentheses in call to 'print'
-+            Missing parentheses in call to 'print'...
-             sage: os.unlink(src.name)
-         """
-+
-+        # compile all given files in memory, printing all errors
-+        # inspired by the py_compile module (but without writing to file)
-+        script = """
-+import sys
-+import importlib.machinery
-+rv = 0
-+for file in sys.argv[1:]:
-+    loader = importlib.machinery.SourceFileLoader('<sage_test>', file)
-+    source_bytes = loader.get_data(file)
-+    try:
-+        code = loader.source_to_code(source_bytes, file)
-+    except Exception as err:
-+        print(err)
-+        rv = 1
-+sys.exit(rv)
-+"""
-         cmd = [
-             'python3',
--            '-m', 'py_compile'
-+            '-c',
-+            script,
-         ] + list(filenames)
-         process = subprocess.Popen(
-             cmd,