pypi / cairosvg
cairosvg
What changed in cairosvg 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-30.
5 breaking1 security3 new APIs and options1 behavior and defaults3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcairosvg 213 changes
Breaking changes 5
Python 3.9 is no longer supported, and Python 3.14 is now supported.
Rendering stops when more than 100k use tags are rendered, preventing long rendering times from recursively nested use tags.
Gradients use bounding boxes.
pycairo support is removed.
Python 2 is no longer supported.
Security 1
Specially crafted SVGs with very long paths could cause exponential rendering times; this security update addresses that risk.
New APIs and options 3
Using this option allows rendering documents with more than 100k use tags.
A parent size option is added.
A scale option is added.
Behavior and default changes 1
The url parameter now supports path-like objects.
Fixes and other changes 3
Support for Windows paths is fixed.
Marker handling is fixed.
URL and id handling is fixed.