Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 276acc2

Browse files
committed
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.
1 parent 1c6ee08 commit 276acc2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/testing/compare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def __call__(self, orig, dest):
130130
if not self._proc:
131131
self._proc = subprocess.Popen(
132132
[mpl._get_executable_info("gs").executable,
133-
"-dNOPAUSE", "-sDEVICE=png16m"],
133+
"-dNOSAFER", "-dNOPAUSE", "-sDEVICE=png16m"],
134134
# As far as I can see, ghostscript never outputs to stderr.
135135
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
136136
try:

0 commit comments

Comments
 (0)