Upgrading weasyprint 58 to 59
Breaking58.1 → 59.0Breaking2Deprecated1New4Changed1Fixed9Other1
BreakingUpgrade verdict
2 breaking changes.
In plain terms
- Python code that calls the rendering functions must be updated because options are now passed differently and some are renamed.
- The old optimize_size setting no longer works and is silently ignored.
- The single command-line switch for shrinking PDF size is being retired in favor of several more specific switches.
Must act 3 items need code or config changes
What you must change
Breaking2
Global rendering options are now passed in **options with renamed parameters, changing the signatures of HTML.render(), HTML.write_pdf() and Document.write_pdf().
HTML.render()HTML.write_pdf()Document.write_pdf()Removes the optimize_size parameter of HTML.render(), HTML.write_pdf() and Document(); it is now ignored.
optimize_sizeHTML.render()HTML.write_pdf()Document()uncompressed_pdffull_fontshintingdpiDeprecations to plan for
Deprecated1
Deprecates the --optimize-size option and its short equivalent -O in favor of separate size optimization options.
--optimize-size-O