From 276acc26faa205772fc86e29ba7886efd8272dea Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 28 Oct 2019 21:46:46 +0100 Subject: [PATCH] Fix test suite compat with ghostscript 9.50. ghostscript 9.50 defaults to -dSAFER (https://www.ghostscript.com/doc/9.50/Use.htm#Safer) which prevents the converter from writing png files resulting from conversion from pdf. Fix that by passing -dNOSAFER, which was the default on older ghostscripts (and backcompatible). Needed to pass the test suite on e.g. an up-to-date Arch Linux. --- lib/matplotlib/testing/compare.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/testing/compare.py b/lib/matplotlib/testing/compare.py index 81577e4803b6..7fffedf7721f 100644 --- a/lib/matplotlib/testing/compare.py +++ b/lib/matplotlib/testing/compare.py @@ -130,7 +130,7 @@ def __call__(self, orig, dest): if not self._proc: self._proc = subprocess.Popen( [mpl._get_executable_info("gs").executable, - "-dNOPAUSE", "-sDEVICE=png16m"], + "-dNOSAFER", "-dNOPAUSE", "-sDEVICE=png16m"], # As far as I can see, ghostscript never outputs to stderr. stdin=subprocess.PIPE, stdout=subprocess.PIPE) try: