8000 Ignore ImageMagick deprecation of "convert" command. · matplotlib/matplotlib@fcdeb46 · GitHub
[go: up one dir, main page]

Skip to content

Commit fcdeb46

Browse files
committed
Ignore ImageMagick deprecation of "convert" command.
Ignoring the deprecation warning (present since IM 7.1.1-33, May 2024) is the quickest fix. The proper fix would be to switch to using "magick" everywhere but the command's syntax is a bit different and the CLI usage thus needs to be verified; moreover this would break users with very old installs of imagemagick (unless adding some version sniffing code) although IMv7 has been out since 2016 so that is likely acceptable. (That proper fix likely also needs some fiddling around the special-casing of `rcParams["animation.convert_path"] = "convert"` in ImageMagickBase.bin_path; e.g. should the rcParams be renamed to `"animation.magick_path"` and have "magick" be the special case...)
1 parent dd8dbca commit fcdeb46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,8 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
474474
"Failed to find an ImageMagick installation")
475475
else:
476476
path = " 5B4E ;convert"
477-
info = impl([path, "--version"], r"^Version: ImageMagick (\S*)")
477+
# Ignore deprecation warning for "convert" on IM>=7.1.1-33.
478+
info = impl([path, "--version"], r"(?sm:.*^)Version: ImageMagick (\S*)")
478479
if info.raw_version == "7.0.10-34":
479480
# https://github.com/ImageMagick/ImageMagick/issues/2720
480481
raise ExecutableNotFoundError(

0 commit comments

Comments
 (0)
0