Skip to content

Commit 5869ed0

Browse files
committed
Add a version number in the qlmanage cache key
1 parent 7a9e97d commit 5869ed0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/matplotlib/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,12 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
385385
stdout=subprocess.DEVNULL,
386386
stderr=subprocess.DEVNULL
387387
)
388+
# qlmanage has no version number, use the OS version
389+
version = subprocess.check_output(["sw_vers", "-productVersion"])
388390
except (FileNotFoundError, subprocess.CalledProcessError):
389391
raise ExecutableNotFoundError()
390-
return _ExecInfo("qlmanage", "")
391-
392+
else:
393+
return _ExecInfo("qlmanage", version)
392394
else:
393395
raise ValueError("Unknown executable: {!r}".format(name))
394396

lib/matplotlib/testing/compare.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def __init__(self):
126126
self._proc = None
127127
self._tmpdir = TemporaryDirectory()
128128
self._tmppath = Path(self._tmpdir.name)
129-
self._version = 'qlmanage'
129+
self._version = mpl._get_executable_info("qlmanage").version
130130

131131
def __call__(self, orig, dest):
132132
try:

0 commit comments

Comments
 (0)