You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MNT]: Create a new repository for binary dependencies #32655
The macOS runners have been broken for several days due to Inkscape's web server dropping connections. I was planing to move us temporarily to Inkscape 1.4.3; however, its link was broken too. It's a server-wide issue with "media.inkscape.org".
I propose that we create a new repository under the Matplotlib organization and use "Releases" to mirror any fragile downloads that we depend on. "mpl-dependencies"? "mpl-dependency-mirror"?
Proposed fix
No response
Reacted by hannah, Thomas A Caswell and Tim Hoffmann
Is it necessary to use Inkscape on Mac Os? Or on any of the os-es. I haven't tried it but google claim imagemagick can do that conversion and I suspect it is more robust than Inkscape to os changes. It can use Inkscape as a backend or librsvg
Mac's also have "sips" which will do command line conversion.
Is it necessary to use Inkscape on Mac Os? Or on any of the os-es.
I think we should use Inkscape's renderer on at least one platform. It was mentioned in the weekly meeting that people edit matplotlib SVGs in Inkscape. I don't think it is necessary to use it on all platforms.
We would need to investigate how ImageMagick wraps Inkscape. If it needs the binary, that puts us back into the same situation. I can't remember if librsvg supports everything that we do.
Mac's also have "sips" which will do command line conversion.
macOS has multiple different SVG implementations. sips uses the old CoreGraphics renderer which lacks several features we need. A lot of the SVGs rendered through sips end up as black shape.
The private CoreSVG framework is the newest addition, but it does not support embedded base64 images.
I'm working on a PR right now which uses WebKit's SVG renderer - it supports all of the features we use. Unfortunately, there isn't a command-line tool to invoke it so I have to do so programatically.
frompathlibimportPathimportresvg_pysvg_text=Path("figure.svg").read_text(encoding="utf-8")
# Returns raw PNG bytes directly in memorypng_bytes=resvg_py.svg_to_bytes(svg_string=svg_text)
Path("figure.png").write_bytes(png_bytes)
I think this is a good thing in general for supply chain hardening, but I am curious if dependabot will flag on these if CVEs pop up.
I doubt it would. I think the main issue here is that we could be mirroring software with known CVE exploits from an official Matplotlib repository.
I don't see a risk of actually running that software on a test runner. At least in the macOS case, the security of GitHub macOS runners is already non-existent (root access via sudo without a password, SIP off, all disk protections off), so we have to assume that people could already be running malicious code when they open a PR.
This would be only for test runners. Generating our own binaries should be done from a secure runner using the latest packages with all known CVEs applied.
Activity
scottshambaugh commentedon Nov 24, 2026
I think this is a good thing in general for supply chain hardening, but I am curious if dependabot will flag on these if CVEs pop up.
jklymak commentedon Nov 24, 2026
Is it necessary to use Inkscape on Mac Os? Or on any of the os-es. I haven't tried it but google claim imagemagick can do that conversion and I suspect it is more robust than Inkscape to os changes. It can use Inkscape as a backend or librsvg
Mac's also have "sips" which will do command line conversion.
timhoffm commentedon Nov 24, 2026
Currently, tests must use the same converter on all OS, but that will change with #32637
iccir commentedon Nov 24, 2026
I think we should use Inkscape's renderer on at least one platform. It was mentioned in the weekly meeting that people edit matplotlib SVGs in Inkscape. I don't think it is necessary to use it on all platforms.
We would need to investigate how ImageMagick wraps Inkscape. If it needs the binary, that puts us back into the same situation. I can't remember if librsvg supports everything that we do.
macOS has multiple different SVG implementations.
sipsuses the old CoreGraphics renderer which lacks several features we need. A lot of the SVGs rendered throughsipsend up as black shape.The private CoreSVG framework is the newest addition, but it does not support embedded base64 images.
I'm working on a PR right now which uses WebKit's SVG renderer - it supports all of the features we use. Unfortunately, there isn't a command-line tool to invoke it so I have to do so programatically.
jklymak commentedon Nov 24, 2026
What about resvg? https://github.com/linebender/resvg/ seems actively maintained and is pip-installable?
iccir commentedon Nov 24, 2026
I doubt it would. I think the main issue here is that we could be mirroring software with known CVE exploits from an official Matplotlib repository.
I don't see a risk of actually running that software on a test runner. At least in the macOS case, the security of GitHub macOS runners is already non-existent (root access via
sudowithout a password, SIP off, all disk protections off), so we have to assume that people could already be running malicious code when they open a PR.This would be only for test runners. Generating our own binaries should be done from a secure runner using the latest packages with all known CVEs applied.